markedagain Posted September 27, 2008 Posted September 27, 2008 Hey All, not even sure how to ask this. but im trying to accomplish something im used to do very easly in C++. i have a script that i modified with OCR. I want to create a class or object of this function and attach it to each time a chat box is opened. so if i have 5 chat box's the Ocr function will independently track all 5 windows with OCR. i dont think this is possible with AutoIt. So im thinking i prob will have a endless loop checking to see if any new chat box's open, if a new one opens run a new script on this active window. although i would like to pass a parameter to this script (something like the handle of the window to attach it to) or else im not sure how to start the autoti script specficaly for a windows or my second idea was have autoit rewrite a new script everytime a new chat box opens and name the script accordingly and run it.(at least ill get paramater hard coded into new script) does 2 ideas are in my head cause i dont think i can create many objects of the same script and have them all independently run in the same script. if i am mistaken please let me know this will save me dozens of hours
markedagain Posted September 29, 2008 Author Posted September 29, 2008 *Bump* Hey all , maybe my question was not well put. can i put autoit in a Class? so i can do something like ;when we detect new window is open $myObj = new myScript $myObj.hdl = window[k][1] $myObj.run so if i had many windows i want to create many objects and they all act independently
bluelamp Posted September 29, 2008 Posted September 29, 2008 no you can“t AutoIt is not objectoriented like C++
markedagain Posted September 29, 2008 Author Posted September 29, 2008 ok so second question , can i execute a autoit script from another autoit script but pass paramateres to it?? like run(myscript.exe -h "somthin")
bluelamp Posted September 29, 2008 Posted September 29, 2008 Yes, the things you are passing to the program are in the Variable $CmdLine
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