Jump to content

help creating an internet shortcut


Recommended Posts

I need help creating an internet shortcut via autoit.. I know the autoit commands I need, but do not know what parameter to use to have the IE window maximized.

Here is an example internet shortcut file:

------------------------------------------------------

[internetShortcut]

URL=http://www.autoitscript.com/autoit3/

IconFile=http://www.autoitscript.com/favicon.ico

IconIndex=1

------------------------------------------------------

Is there a parameter to establish the window maximized??? Thanks!

Link to comment
Share on other sites

Global $aData[3][2]

$aData[0][0] = 'URL'
$aData[0][1] = 'http://www.autoitscript.com/autoit3'
$aData[1][0] = 'IconFile'
$aData[1][1] = 'C:\Icon1.ico'
$aData[2][0] = 'IconIndex'
$aData[2][1] = '0'

InetGet('http://www.autoitscript.com/favicon.ico', 'C:\Icon1.ico')

IniWriteSection('MyInternetShortcut.url', 'InternetShortcut', $aData, 0)

Is there a parameter to establish the window maximized??? Thanks!

ShowCommand=3, but works with IE only.

EDIT:

It may be easier to LNK?

Edited by Yashied
Link to comment
Share on other sites

Global $aData[3][2]

$aData[0][0] = 'URL'
$aData[0][1] = 'http://www.autoitscript.com/autoit3'
$aData[1][0] = 'IconFile'
$aData[1][1] = 'C:\Icon1.ico'
$aData[2][0] = 'IconIndex'
$aData[2][1] = '0'

InetGet('http://www.autoitscript.com/favicon.ico', 'C:\Icon1.ico')

IniWriteSection('MyInternetShortcut.url', 'InternetShortcut', $aData, 0)

ShowCommand=3, but works with IE only.

EDIT:

It may be easier to LNK?

ShowCommand=3 is what I was looking for thanks! but what is LNK???

Link to comment
Share on other sites

ShowCommand=3 is what I was looking for thanks! but what is LNK???

$Shortcut = @ScriptDir & '\MyShortcut.lnk'
$Browser = @ProgramFilesDir & '\Internet Explorer\iexplore.exe'
$Url = 'http://www.autoitscript.com/autoit3'
$Icon = @SystemDir & '\shell32.dll'
$IconIndex = 13

FileCreateShortcut($Browser, $Shortcut, '', $Url, '', $Icon, '', $IconIndex, @SW_SHOWMAXIMIZED)
Link to comment
Share on other sites

$Shortcut = @ScriptDir & '\MyShortcut.lnk'
$Browser = @ProgramFilesDir & '\Internet Explorer\iexplore.exe'
$Url = 'http://www.autoitscript.com/autoit3'
$Icon = @SystemDir & '\shell32.dll'
$IconIndex = 13

FileCreateShortcut($Browser, $Shortcut, '', $Url, '', $Icon, '', $IconIndex, @SW_SHOWMAXIMIZED)

That works great and I like it! Thanks! Will it work with any browser?
Link to comment
Share on other sites

That works great and I like it! Thanks! Will it work with any browser?

No. That you choose ($Browser).

EDIT:

You can use the _WinAPI_FindExecutable() function to find your default browser.

Edited by Yashied
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...