Bamse Posted September 29, 2017 Share Posted September 29, 2017 (edited) I am trying to open a folder with the run command but I can't get it to work, I have the same problem with text files. #RequireAdmin Run(@ScriptDir & 'C:\Users\William\Desktop\BilderFinder') I think the problem is that I am trying to run a .exe file or that it's looking for one. And can someone explain @ScriptDir ? Edited September 29, 2017 by Bamse Link to comment Share on other sites More sharing options...
GordonFreeman Posted September 29, 2017 Share Posted September 29, 2017 ShellExecute("C:\Windows") Frabjous Installation Link to comment Share on other sites More sharing options...
Bamse Posted September 29, 2017 Author Share Posted September 29, 2017 1 minute ago, GordonFreeman said: ShellExecute("C:\Windows") Thank you! Link to comment Share on other sites More sharing options...
GordonFreeman Posted September 29, 2017 Share Posted September 29, 2017 You can also run directly like: $sFile = "C:\Windows\notepad.exe" ShellExecute($sFile) ; or Run(@ComSpec & " /c " & '"' & $sFile & '"', "", @SW_HIDE) Frabjous Installation Link to comment Share on other sites More sharing options...
Jfish Posted September 29, 2017 Share Posted September 29, 2017 @Bamse to answer your earlier question @scriptdir is a macro that will result in the path of your script (.e. c:\somepath\etc). Therefore, when you do @scriptdir & c:\whatever you are basically creating two paths and combining the strings: "c:\etcc:\etc". You can see this if you write it to the console or a message box. See the help file for more information on macros. Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
Bamse Posted September 29, 2017 Author Share Posted September 29, 2017 33 minutes ago, Jfish said: @Bamse to answer your earlier question @scriptdir is a macro that will result in the path of your script (.e. c:\somepath\etc). Therefore, when you do @scriptdir & c:\whatever you are basically creating two paths and combining the strings: "c:\etcc:\etc". You can see this if you write it to the console or a message box. See the help file for more information on macros. Thank you! 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