Sign in to follow this  
Followers 0
PoLoLOo

CONTROL (running on background)

4 posts in this topic

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 :blink: " 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)

WEnd

but 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 =2

but 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?

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

up :blink:

Share this post


Link to post
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
Sign in to follow this  
Followers 0