Jammer Posted April 3, 2008 Share Posted April 3, 2008 (edited) Hi,QUESTION 1So I have 2 files... One with the GUI... Other one with the functions.What includes I need to add so that I could see all the functions and variables (which are determined as global) that are available in the other file (one to another)QUESTION 2Also if I have a dialog file which is $Run = true While 1 Sleep(100) WEnd Func OnButton1Event() Do() EndFunc Func OnButton2Event() $Run = false EndFuncand also i have a function in the other file which isFunc Do() While $Run WEnd EndFuncWill the dialog be responsive while im in the Do() functions loop in the other file? So I could stop the loop in the other file by clicking a button of a dialog. Edited April 3, 2008 by Jammer Link to comment Share on other sites More sharing options...
DarkMatter Posted April 3, 2008 Share Posted April 3, 2008 (edited) To answer your first question:If you have 2 script files. The first one we will call 1.au3 and the second one we will call 2.au3. 2.au3 looks like this:Global $TestVar = "Test"To access the $TestVar variable in 2.au3 from 1.au3 it would look like this:#include <2.au3> MsgBox(0,0,$TestVar)To answer question two:What you are referring to would be considered "multi-threading" which AutoIT does not support. So no, your dialog would not be responsive.As for question 3 could you post the code where you call _ArrayDisplay? Edited April 3, 2008 by DarkMatter [sub]Quantum mechanics: The dreams stuff is made of[/sub] Link to comment Share on other sites More sharing options...
Jammer Posted April 3, 2008 Author Share Posted April 3, 2008 and if i add something like Sleep(1000) in the second file, maby it would be able to work everything out? Maby there is anykind of solution? Link to comment Share on other sites More sharing options...
Jammer Posted April 3, 2008 Author Share Posted April 3, 2008 Also if I want to access a variable i 1.au3 from 2.au3? Link to comment Share on other sites More sharing options...
Jammer Posted April 3, 2008 Author Share Posted April 3, 2008 As for question 3 could you post the code where you call _ArrayDisplay?Found a way my self. Thanks.The submit button value was changing randomly. Link to comment Share on other sites More sharing options...
DarkMatter Posted April 3, 2008 Share Posted April 3, 2008 (edited) Also if I want to access a variable i 1.au3 from 2.au3? 1.au3: #include <2.au3> Global $var = "Hey" DisplayVarFromScript1() 2.au3: Func DisplayVarFromScript1() MsgBox(0,0,$var) EndFunc The easiest way to explain this I guess would be to say that as long as you have "2.au3" included in script "1.au3" they technically can access the same variables as long as the variables in question are made public. Edited April 3, 2008 by DarkMatter [sub]Quantum mechanics: The dreams stuff is made of[/sub] 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