sqa Posted September 21, 2013 Posted September 21, 2013 Hi, let say I have: c:/Parent folder/ Folder 1 start.au3 Folder 2 run.exe How can I navigate into run.exe folder without using in a script path 'c:/' part? In this case the whole <Parent folder> can be used on different computers. I can figure out a silly way doing it by checking @WorkingDir and extracting the path before <Parent folder>, that will be different for other computers, but this extracting thing tells me that there must be much better way. Thanks
JohnOne Posted September 21, 2013 Posted September 21, 2013 Not sure I understand the question, but you have @ScriptDir or maybe FileChangeDir() is what you are looking for. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
jguinch Posted September 21, 2013 Posted September 21, 2013 I think I understand your problem, but not sure.. If your runnig script is start.au3, and you want to access to run.exe, you can use a relative path from where you are. For example, Run(@ScriptDir & "..folder2run.exe") Is it right for you? Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
sqa Posted September 21, 2013 Author Posted September 21, 2013 exactly, you got it!!! sorry I never was a good writer
TheSaint Posted September 21, 2013 Posted September 21, 2013 Or ... Run(StringReplace(@ScriptDir, "Folder 1start.au3", "") & "Folder 2run.exe") or spread that over two lines to look nicer (easier to read). Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
jguinch Posted September 21, 2013 Posted September 21, 2013 However, I have a little trouble with English ... Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Gianni Posted September 22, 2013 Posted September 22, 2013 I think I understand your problem, but not sure.. If your runnig script is start.au3, and you want to access to run.exe, you can use a relative path from where you are. For example, Run(@ScriptDir & "..folder2run.exe") Is it right for you? there is not need of @ScriptDir & Run("..folder2run.exe") it is enough Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
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