Jump to content
Sign in to follow this  
speedi

help creating an internet shortcut

Recommended Posts

speedi

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!

Share this post


Link to post
Share on other sites
Yashied

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

Share this post


Link to post
Share on other sites
speedi

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???

Share this post


Link to post
Share on other sites
Yashied

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)

Share this post


Link to post
Share on other sites
speedi

$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?

Share this post


Link to post
Share on other sites
Yashied

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.