Hello everyone.
I'm trying to send commands to a toolbar button, which opens up a window. And then I want to press another button in that window to execute a command.
Here is the code that opens the window named "send settings" (bysending the button command)
ControlCommand ( $APP, "", $handleToolbar, "SendCommandID", 32820)
and here is the code that closes the window named "send settings" (again via button command")
ControlCommand ( "Send Set", "", "[CLASS:Static; INSTANCE:14]", "SendCommandID", 1)
Both of them works. When I run the first command only, it opens up the second window. When I open up the vindow by hand and send up the second code line, it "executes" and closes the second window action.
However, when the code is stucked like this, the second windows never closes, its like the second command is not even there:
ControlCommand ( $APP, "", $handleToolbar, "SendCommandID", 32820)
Sleep(1000)
ControlCommand ( "Send Set", "", "[CLASS:Static; INSTANCE:14]", "SendCommandID", 1)
Why can this be ? Do you have any ideas ?
I've tried playing with the sleep time too, it didnt do any change.