changing cursor to hourglass while script is waiting?
Moderators: JRL, Dorian (MJT support)
changing cursor to hourglass while script is waiting?
Is there a possibility to change the cursor to an hourglass while the script is waiting (wait>10) until a other action is performed (e.g. a restart of an SQL-Server)?
regards
migro
migro
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You can try using the SetCursor/GetCursor API functions as in the example in this thread:
http://www.mjtnet.com/forum/viewtopic.php?t=4044
http://www.mjtnet.com/forum/viewtopic.php?t=4044
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, sorry. Correct link is:
http://www.mjtnet.com/forum/viewtopic.php?t=4046
Look at the second post, from me:
However, I think that is not quite complete. Try the following code:
It probably needs some tweaking and may not take all scenarios into account - you may want to be more specific about how you set the cursor back, rather than setting it to whatever was active to begin with (there could be a danger you set the system cursor to the text caret, or hourglass for example, depending on what was active when the code ran).
http://www.mjtnet.com/forum/viewtopic.php?t=4046
Look at the second post, from me:
However, I think that is not quite complete. Try the following code:
Code: Select all
//Get current cursor and remember it in savCurs
LibFunc>user32,GetCursor,curCurs
LibFunc>user32,CopyIcon,savCurs,curCurs
//Set current system cursor to banana (look in WIN_DIR\cursors for others)
LibFunc>user32,LoadCursorFromFileA,newCurs,%WIN_DIR%\cursors\banana.ani
LibFunc>user32,SetSystemCursor,sscr,newCurs,32512
LibFunc>user32,SetCursor,scr,newCurs
//Do something
MessageModal>Press Ok to return cursor to normal ...
//Set system cursor back to original saved cursor
LibFunc>user32,SetSystemCursor,sscr,savCurs,32512
LibFunc>user32,SetCursor,scr,savCurs
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?