Sign in to follow this  
Followers 0
speedi

help creating an internet shortcut

6 posts in this topic

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



#2 ·  Posted (edited)

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

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

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

$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

#6 ·  Posted (edited)

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  
Followers 0