Forum Discussion

RLRE's avatar
RLRE
Occasional Contributor
6 years ago
Solved

How to change cursor to hourglass from a TestComplete Extension

I wrote a TestComplete extension to update Keyword-Test signature from TestComplete in to an external tool. However, this action takes very long time. That's why I need to change the cursor from arrow to hourglass, and back to arrow after action is done. (Using a try-catch-finaly, of course.)

The module doing the opperation is writen in js. However, my script extension contains vbs modules too and methods, I can successfully call from the js module. 
If I try to use the following code, suggested by TestComplete code completition in the vbs module:
Win32API.SetCursor(Win32API.IDC_WAIT);
I got the error "Object expected". I.e., the TestComplete extension does not know About Win32API object, despite the code completition suggestion, and despite the correct installation and activation of the win32api extension. (checked via File | Install extensions)
Ommiting the Win32API. prefix has similar effect. 

I did not found any aq*.* methods allowing changing the cursor.
SmartBears description on writing extentions seems to contain no hint about changing the cursor in a ScriptExtension. Please appologize, if I overlook it.

(PS: I am using an old TestComplete 10.60x Version; however, I guess, this is not the Point.)
Any suggestions are appreciated.

Thanx in advice for your F1!