swin4ort Posted June 22, 2007 Posted June 22, 2007 When I attempt to run a .LNK shortcut, AutoIt returns: eg: Run("note.LNK","C:\") Error: Unable to execute the external program The system cannot find the file specified. NB - I want to directly run the LNK shortcut directly - not to extract the terms from the LNK shortcut and execute them.
swin4ort Posted June 22, 2007 Author Posted June 22, 2007 I assume that the absence of a '\' after 'C:' is a typo. In either case, ShellExecute("C:\note.lnk) generates: Unknown function name and I cannot find 'ShellExecute' in Help. Is this a function later than the AutoIt version I am running? Thanks for your help IAN
DW1 Posted June 22, 2007 Posted June 22, 2007 (edited) must be an old version of AutoIt and there is no typo "absence of a '\'" .... I see it on my screen.... let me copy and paste... this is what I see ______________ ShellExecute ( "C:\Note.lnk" ) ______________ Edited June 22, 2007 by danwilli AutoIt3 Online Help
Helge Posted June 22, 2007 Posted June 22, 2007 Is this a function later than the AutoIt version I am running?ShellExecute was added first in 3.2.1.7 beta and then later it made it into the stable versionswith 3.2.2.0. None of those are new so you must be running a pretty old version of AutoIt.The currently latest version is 3.2.4.9 so I would recommend you to download that here :http://www.autoitscript.com/forum/index.ph...&showfile=3
Kip Posted June 22, 2007 Posted June 22, 2007 (edited) Run("explorer.exe C:\Note.lnk") (ShellExecute is better) and for txt files: Run("Notepad.exe C:\Note.txt") and for images: Run("MSPaint.exe C:\Note.bmp") Edited June 22, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
swin4ort Posted June 22, 2007 Author Posted June 22, 2007 Uploaded new version of AutoIT & ShellExecute works perfectly with my LNK shortcuts. Thanks for the help
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now