E1M1 Posted May 16, 2009 Posted May 16, 2009 (edited) This don't work, When run that exe file I still see "C:\Program Files\ra" as result of msgbox(1,1,@ScriptDir) ShellExecute(@ProgramFilesDir&"\ra\New AutoIt v3 Script (2).exe","",@WindowsDir) I also tried Run(@ProgramFilesDir&"\ra\New AutoIt v3 Script (2).exe",@WindowsDir) I should see C:\windows instead of "C:\Program Files\ra shouldn't I? Edited May 16, 2009 by E1M1 edited
Richard Robertson Posted May 16, 2009 Posted May 16, 2009 The script directory is the directory the script is in.
Valik Posted May 16, 2009 Posted May 16, 2009 That depends on what the script New AutoIt v3 Script (2).exe is.
E1M1 Posted May 16, 2009 Author Posted May 16, 2009 (edited) yes I know I Use @windowsdir as workingdir in my 1-st script that executes 2--nd script. second script is compiled to exe, and its source is as follows msgbox(1,1,@ScriptDir) So msgbox(1,1,@ScriptDir) is executed by Run(@ProgramFilesDir&"\ra\New AutoIt v3 Script (2).exe",@WindowsDir) .. If u cant understand my situation, I can post here installer that makes same situation as I have... Edited May 16, 2009 by E1M1 edited
Inverted Posted May 16, 2009 Posted May 16, 2009 (edited) I want to add that instead of using a launcher to set your working dir for the main script, you can just use this function in your main script : FileChangeDir(@WindowsDir) Edited May 16, 2009 by Inverted
E1M1 Posted May 16, 2009 Author Posted May 16, 2009 But then Whats the point of Run ( "filename" [, "workingdir" [, show_flag[, opt_flag ]]] )workingdir parameter is useless if it doesn't work. edited
Valik Posted May 16, 2009 Posted May 16, 2009 Here's a thought. Stop. Think. Your mistake is so glaringly obvious and stupid that I hope you feel embarrassed for missing something this obvious.
Inverted Posted May 16, 2009 Posted May 16, 2009 Scriptdir is the path to the script file. It doesn't depend on the working directory.
Valik Posted May 17, 2009 Posted May 17, 2009 Scriptdir is the path to the script file. It doesn't depend on the working directory.I despise people like you who feel the need to give out an answer to a stupidly obvious problem instead of letting somebody figure it out on his own.
E1M1 Posted May 17, 2009 Author Posted May 17, 2009 ok ... then can I set replace scriptdir variable with workingdir variable? edited
Inverted Posted May 17, 2009 Posted May 17, 2009 ok ... then can I set replace scriptdir variable with workingdir variable?Why do you ask instead of trying it. Valik's gonna have a mental breakdown !
Valik Posted May 17, 2009 Posted May 17, 2009 ok ... then can I set replace scriptdir variable with workingdir variable?You want to use @WorkingDir so use @WorkingDir. Stop being stupid; this is some obvious stuff and if you can't get this working then you need to just give up on the language.
Valik Posted May 17, 2009 Posted May 17, 2009 Why do you ask instead of trying it. Valik's gonna have a mental breakdown !This is exactly why I dislike that you answered the question. He needs to stop asking stupid questions and learn to try stuff and debug his own code.
E1M1 Posted May 17, 2009 Author Posted May 17, 2009 oops I was really stupid, sorry for these stupid posts. edited
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