Jump to content

Create Object many times for diffrent windows


 Share

Recommended Posts

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

Link to comment
Share on other sites

*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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...