gr8BigGeek Posted May 17, 2010 Share Posted May 17, 2010 Hello, Me again; Boy I'm battin' 100 this week! I've gotten myself completely stumped. This time the problem is in the ShellExecute() function. With a batch file I can start the executable by the following: start "" "XYZPROGRAM.exe" -a "MY_GUI.mss" as long as the .bat file is setting in the same folder as the program (or XYZPROGRAM.exe file). The "target" location under "properties" of the shortcut on the desktop looks like this: C:\XYZPROGRAMFILE\XYZPROGRAM.exe MY_gui terminal How do I get Autoit to accept the "-a" attribute function? Or how can I use this -a function in Autoit to allow it to start like the .bat file? Yes, I've tried doing: ShellExecute(@ScriptDir & "\MYBAT.bat", 0) to start the batch file, but I get error messages when I use shortcuts to my Autoit executable. I literally have to open the .exe file manually *sigh*. Any help on this would be wonderful! Thanks, Matt~ Link to comment Share on other sites More sharing options...
99ojo Posted May 17, 2010 Share Posted May 17, 2010 Hi, have you tried: ShellExecute ("C:\XYZPROGRAMFILE\XYZPROGRAM.exe", "-a " & chr(34) & "MY_GUI.mss" & chr (34), "C:\XYZPROGRAMFILE") For running batches, see helpfile Run () / RunWait (). ;-)) Stefan Link to comment Share on other sites More sharing options...
gr8BigGeek Posted May 17, 2010 Author Share Posted May 17, 2010 Stefan, Thank you much! I just couldn't seem to find it in the help file either. I tip my hat to you; it works! Matt~ Link to comment Share on other sites More sharing options...
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