Brogsitter Posted February 13, 2009 Posted February 13, 2009 First of all: Hello community! I am completly new to AutoIt, so please allow me some questions. After searching the forums and helpfile, I was wondering if it is possible to handover variables from on script to another. Here is a snippet out of my script: #include <ImageSearch.au3> #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Define Variables AutoItSetOption("MouseCoordMode", 0) ; Global $x1 = 0 $y1 = 0 $result = 0 $bmpdir = "C:\_bmp\" [[.... AND MUCH MORE variables]] RunWait("GLOBAL_execute.exe") RunWait("GLOBAL_switch.exe") So I was wondering if it might be possible to use the defined variables in the scripts that will be called with the RunWait function without defining them again. I am not looking forward an #include due to the fact that I have the variables changing in different scripts. Any help will be apreciated. Cheers Brog
PsaltyDS Posted February 13, 2009 Posted February 13, 2009 First of all: Hello community! I am completly new to AutoIt, so please allow me some questions. After searching the forums and helpfile, I was wondering if it is possible to handover variables from on script to another. Here is a snippet out of my script: #include <ImageSearch.au3> #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Define Variables AutoItSetOption("MouseCoordMode", 0) ; Global $x1 = 0 $y1 = 0 $result = 0 $bmpdir = "C:\_bmp\" [[.... AND MUCH MORE variables]] RunWait("GLOBAL_execute.exe") RunWait("GLOBAL_switch.exe") So I was wondering if it might be possible to use the defined variables in the scripts that will be called with the RunWait function without defining them again. I am not looking forward an #include due to the fact that I have the variables changing in different scripts. Any help will be apreciated. Cheers Brog You could put the data in an .ini file, or the registry, or use WM_COPYDATA messages, or TCP networking, or write data to the other script's GUI controls, etc., etc... This topic is pretty well covered on the forum already. The search function is your friend. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Authenticity Posted February 13, 2009 Posted February 13, 2009 Try EnvGet and EnvSet if it's what you're looking for.... I don't know about any sort of export like in C in AutoIt ;]
Brogsitter Posted February 13, 2009 Author Posted February 13, 2009 Sorry, but I havent found something with the search engine. Probably I am blind or just too stupid.
Brogsitter Posted February 13, 2009 Author Posted February 13, 2009 Try EnvGet and EnvSet if it's what you're looking for.... I don't know about any sort of export like in C in AutoIt ;]This sounds good, I will give it a try and keep you informed if it is working or not. Thanks
Brogsitter Posted February 13, 2009 Author Posted February 13, 2009 Try EnvGet and EnvSet if it's what you're looking for.... I don't know about any sort of export like in C in AutoIt ;]Well here is my report: works fine! I have to alter alot of code now but.... it works. Thank you very much for this hint!
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