Help - Search - Members - Calendar
Full Version: Question about skapi.GetControlProperty
AC Tools Everything Macro > Other Scripting Tools > Skunkworks
SpeedFreak
So my understanding is that the return passes through OnControlProperty but my calls to get controlproperty happen at various stages like where I add a row, delete a row, get the data.

My question is how am I supposed to distinguish between these cases since they all apply to the same control? Obviously I wouldn't want the aco for a particular row to be selected if the operation was a deletion but I want it selected if it was clicked.
GKusnick
Every time you call GetControlProperty, wait for the result before continuing.

CODE
skapi.GetControlProperty(...);
skapi.WaitEvent(timeout, wemSpecific, evidOnControlProperty);
// do something with the returned value

Then there's no possibility of getting confused.

If you're doing this sort of thing a lot, you might find it useful to keep a data structure on the script side reflecting what's in the list. Then you can just query the local data structure to retrieve property values, instead of having to go through the GetControlProperty rigmarole every time. Just be sure to keep the data structure updated whenever you do a SetControlProperty.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.