Lilpimp Posted January 19, 2009 Share Posted January 19, 2009 Ok i'm realy new to AutoIt but i now alot but i'm trying to make AutoIt start a program in another folder but the folder is in the same place as the script i tried this Run("MySQL.bat","@ScriptDir\Resources\") But that did not work if some could help me I could apreciate it. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 19, 2009 Developers Share Posted January 19, 2009 Maybe: Run(@ScriptDir & "\Resources\MySQL.bat") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
FireFox Posted January 19, 2009 Share Posted January 19, 2009 @lilpimp Welcome to autoit forum Note that 'run' function work only for executable extensions like .exe, .bat, .com or .pif Take a look to ShellExecute Cheers, FireFox. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 19, 2009 Developers Share Posted January 19, 2009 @lilpimpWelcome to autoit forum Note that 'run' function work only for executable extensions like .exe, .bat, .com or .pifTake a look to ShellExecuteCheers, FireFox... and why did you feel you needed to share this info?He clearly wants to run an BAT file.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
FireFox Posted January 19, 2009 Share Posted January 19, 2009 @Jos For nothing... only one post and its a 'newbie' question, now he know something more ... Cheers, FireFox. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 19, 2009 Developers Share Posted January 19, 2009 @JosFor nothing... only one post and its a 'newbie' question, now he know something more ...Cheers, FireFox.I think you are trying to help as much as you can but also consider it could be confusing too.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
FireFox Posted January 19, 2009 Share Posted January 19, 2009 @Jos Sure... but as I said its a note , I wont reply after your reply until its usefull cos i would get kicked Cheers, FireFox. Link to comment Share on other sites More sharing options...
bo8ster Posted January 19, 2009 Share Posted January 19, 2009 Ok i'm realy new to AutoIt but i now alot but i'm trying to make AutoIt start a program in another folder but the folder is in the same place as the script i tried this Run("MySQL.bat","@ScriptDir\Resources\") But that did not work if some could help me I could apreciate it.The Remarks section of the help file has good tips for running DOS stuff. Hope it works for you. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
Varian Posted January 19, 2009 Share Posted January 19, 2009 It appears to be your syntax, not your logic, that's off. You have the macro inside the quotes. Try this: Run("MySQL.bat", @ScriptDir & "\Resources") 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