user32.dll and ShowCursor

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

user32.dll and ShowCursor

Post by Grovkillen » Thu Oct 18, 2018 9:27 am

Hello,

I'm trying to get this working but I don't understand the syntax I reckon.

https://docs.microsoft.com/en-us/window ... showcursor

Code: Select all

LibFunc>user32,ShowCursor,Test,true
Wait>1
MDL>Test
LibFunc>user32,ShowCursor,Test,false
Wait>1
MDL>Test
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: user32.dll and ShowCursor

Post by JRL » Sun Oct 21, 2018 4:05 am

Try this. Usually Boolean "false" needs to be 0 and "true" needs to be 1. Or rather, "true" needs to be anything other than 0. So the word False gives a plus 1 (true) result with this particular API function.

Code: Select all

Label>HideCursor
LibFunc>user32,ShowCursor,Test,0
If>{%test%>=0}
  Goto>HideCursor
EndIf

Wait>2

Label>ShowCusor
LibFunc>user32,ShowCursor,Test,1
If>{%test%<0}
  Goto>ShowCusor
EndIf

wait>2

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: user32.dll and ShowCursor

Post by Grovkillen » Mon Oct 22, 2018 7:42 pm

Super thank you for the support :)
Let>ME=%Script%

Running: 15.0.24
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts