PoLoLOo Posted July 14, 2010 Posted July 14, 2010 hi all,im new at all, so i will try to explain my problems as simple as i can. Well in my job im using a program call BussinesObject to make querys, when we launch a query, the control that contains the results become "disabled or blocked, it looks like CLOSE FOR VACATIONS " the point is that the control is like NOT RESPONDIG..., when the query finish its refresh the control and show the result. My question is here, how can i know that the query has finished?I try ControlEnable()While ControlEnable("XXXXXXXXXXXXXXX","",59648)=0 Sleep(60000)WEndbut sometimes works and other didnt,(it looks like it depend on how long is the query, if its short it still enable, but when is a long query become disable..) any one know if exists any kind of state that return the state of a control??like... 1=ENABLE 2= PROCESSING 3=BLOCKED (somothing like that)also i find the way that it works... if i move the mouse over the control, the cursor change to a clock, that shows me that the query still running.Do MouseMove(@DesktopWidth/2,@DesktopHeight/2) $cursor = MouseGetCursor() Sleep(3000)Until $cursor =2but i need to run this script on background, where i dont have the control of the mouse ;(any ideas?PD: i cant use winwaitactive() because the windows is already active and working, only the control that contains the result of the query is like BLOCKED or WAITING... i dont know!I think a clue to solution my problem is, why windows know that when i move the mouse over that control it has to change the cursor? is any state that indicates that the control is procesing and when the mouse move over that control it has to change the cursor?
Yoriz Posted July 14, 2010 Posted July 14, 2010 Hi, welcome to the forum You can use the following command to find out if a control is enabled or not. $Enabled = ControlCommand ("title", "text", "controlID", "IsEnabled", "") #cs Parameters "title" The title of the window to access. "text" The text of the window to access. "controlID" The control to interact with. See Controls. Returns 1 if Control is enabled, 0 otherwise #ce GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
PoLoLOo Posted July 15, 2010 Author Posted July 15, 2010 Hi, welcome to the forum You can use the following command to find out if a control is enabled or not. $Enabled = ControlCommand ("title", "text", "controlID", "IsEnabled", "") #cs Parameters "title" The title of the window to access. "text" The text of the window to access. "controlID" The control to interact with. See Controls. Returns 1 if Control is enabled, 0 otherwise #ce thanks for your answer but the main problems is that when i minimize the window that contains the control, the funciont ControlCommand() return 1 (ENABLE), but the control continue running the query. If i keep the window active, the function works perfect, but i need to run in background :S thanks again
PoLoLOo Posted July 29, 2010 Author Posted July 29, 2010 thanks for your answer but the main problems is that when i minimize the window that contains the control, the funciont ControlCommand() return 1 (ENABLE), but the control continue running the query. If i keep the window active, the function works perfect, but i need to run in background :Sthanks againup
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