Orangevolt ANT Tasks » Tasks » Win32 related tasks » win32.shortcut | ||
examples | Complete HotKey Code Reference |
The classic URL file format is pretty simple; it has a format similar to an INI file:
|
The syntax of the file format is like the following:
|
Each line terminates with CR and LF characters, and uses ANSI as it\u0092s character set. The files can be manipulated using basic file I\O or the GetPrivateProfileString, GetPrivateProfileSection, WritePrivateProfileSection, WritePrivateProfileSring API functions provided by Windows.
The URL field is self-explanatory. It\u0092s the address location of the page to load. It should be a fully qualifying URL with the format protocol://server/page. A URL file is not restricted to the HTTP protocol. In general, at least, whatever that can be saved as a favorite is a valid URL.
It\u0092s the \u0093working folder\u0094 that your URL file uses. The working folder is possibly the folder to be set as the current folder for the application that would open the file. However Internet Explorer does not seem to be affected by this field. This setting does not seem to appear in some versions of Internet Explorer/Windows.
The Icon Index within the icon library specified by IconFile. In an icon library, which can be generally be either a ICO, DLL or EXE file, the icons are indexed with numbers. The first icon index starts at 0.
Specifies the path of the icon library file. Generally the icon library can be an ICO, DLL or EXE file. The default icon library used tends to be the URL.DLL library on the system\u0092s Windows\System directory
This field is generally the most cryptic of all the fields.
example | |
|
Changes at a fast pace | Changes slowly | ? | ||||||
20 | F0 | 6B | A0 | 6D | 07 | BD | 01 | 4D |
The second character of the first word also never changes: possibly the resolution of the timer does not go this deep in detail. However the count is deep enough that it\u0092s smaller than a microsecond (or it seems). To be useful, the words above have to have it\u0092s order reversed, possibly the ninth can be removed. Therefore:
20 | F0 | 6B | A0 | 6D | 07 | BD | 01 | 4D |
Invert | Rem. | |||||||
01 | BD | 07 | 6D | A0 | 6B | F0 | 20 |
Then convert the first 4 words (most significant) from hex to a double precision number, do the same with the 4 last hex values (least significant), and apply the following formula:
|
The following functions can be used as a \u0093poor man\u0092s\u0094 date approximation tool:
|
The k constant here is \u0093guessed\u0094 as 10.2215, as it gave somewhat acceptably close months from 1995 to 2002. However it is far from being correct. While these functions are definitely crude, it provides a bit of insight how the Modified field was probably constructed. Creating your own functions to process these dates is recommended.
(Normal)
Minimized
Maximized
The HotKey field specifies what is the shortcut key used to automatically launch the Internet shortcut. The field uses a number to specify what hotkey is used.
|
Visits, "Make this page available offline\u0094, Synchronization settings, Download Settings and Schedule Settings are not kept in .url files.
It seems that Microsoft wants to hide the structure of the file format, even make it seem like it isn\u0092t even a file at all. The URL file in the newer Microsoft Windows operating systems behaves almost like a LNK file. For example, in Microsoft Windows 2000 Professional, the URL file is treated like a shortcut, even in Windows Notepad, making the file format harder to be revealed and viewed. In order to view a file in these operating systems, use the DOS EDIT.EXE program. By typing EDIT in a command prompt window.
Read more about creating and maintaining URL files using IshellLink related Windows interfaces http://msdn.microsoft.com/library/psdk/shellcc/shell/Internet_Shortcuts.htm