Sign in to follow this  
Followers 0
beernuts

How do you execute a shortcut? (in a script)

3 posts in this topic

I can make autoit run programs fine, but I"m not sure how to get it to execute a shortcut.

Run("c:\path2shortcut\shortcutname.exe")

I was also wondering how to add a suffix to a string, say i have a prompt asking for a file name like:

$filename = InputBox("Name of file before suffix", "Enter name.", "", "")

How do I add a suffix like .exe to that filename after it has been entered and store that as the new $filename ?

Sorry for my nubbiness. Thanks in advance for any advice.

Share this post


Link to post
Share on other sites



Question 1:

$lnkShortcutLocation = @DesktopDir & '\Ad-Aware SE Personal.lnk'
Run(@ComSpec & ' /c "' & $lnkShortcutLocation & '"', '', @SW_HIDE)oÝ÷ ٲبf޶׫^Ê¡j÷­ç^²Ø§jب­«­¢+ØÀÌØí¥±¹µô%¹ÁÕÑ ½à ÅÕ½Ðí9µ½¥±½ÉÍÕ¥àÅÕ½Ðì°ÅÕ½Ðí¹Ñȹµ¸ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤)5Í  ½à ØаÌäí%¹¼Ìäì°ÀÌØí¥±¹µµÀìÌäì¹áÌäì¤

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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