Sign in to follow this  
Followers 0
torels

FileCreateShortcut Problem

3 posts in this topic

Hi there

I want to create a shortcut with the following link: "C:\some dir\autoit3.exe" "C:\some dir 2\myscript.au3" "parameter 1"

the problem is that using FileCreateShortcut what I get if I click on the Properties is this: ""C:\some dir\autoit3.exe" "C:\some dir 2\myscript.au3"" "parameter 1"... and it obviously doesn't work

here is the code

FileCreateShortcut('"C:\some dir\autoit3.exe" "C:\some dir 2\myscript.au3"', "C:\somelink", -1, '"Parameter 1"')

can somebody help please ?

thanks in advance


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hey,

check the helpfile for the correct syntax :)

; FileCreateShortcut ( "file", "lnk" [, "workdir" [, "args" [, "desc" [, "icon" [, "hotkey" [, icon number [, state]]]]]]] )

FileCreateShortcut(@AutoItExe, @ScriptDir & '\mylink.lnk', '', '"' & @ScriptDir & '\myscript.au3" "Param 1"')

The first param is the file to execute, AutoIt.exe

The second is the link to create

Third is the workdir

Then the fourth param is for the arguments, in this case the path to your script so that AutoIt.exe (from the first param) can execute the script

Edit: forgot the Param 1

Edited by Robjong

Share this post


Link to post
Share on other sites

I solved the problem, I was passing a wrong number of args, not considering that the only thing that wasn't meant to be a parameter was the autoit3.exe file :)


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

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