VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   How to used Milliseconds parameter in WaitForCursor (https://forums.vandyke.com/showthread.php?t=14424)

freeman 02-12-2021 07:51 AM

How to used Milliseconds parameter in WaitForCursor
 
I want to use Milliseconds in WaitForCursor,I find manual,but not used successfully.I don't know how to use Milliseconds in WaitForCursor

Code:

Do
    bCursorMoved = crt.Screen.WaitForCursor(100, bMilliseconds)
Loop until bCursorMoved = False


jdev 02-12-2021 09:13 AM

Quote:

Originally Posted by freeman (Post 54637)
I want to use Milliseconds in WaitForCursor,I find manual,but not used successfully.I don't know how to use Milliseconds in WaitForCursor

Code:

Do
    bCursorMoved = crt.Screen.WaitForCursor(100, bMilliseconds)
Loop until bCursorMoved = False


I'm sorry that the documentation for this parameter is currently inaccurate and confusing. I've created a ticket for getting the documentation sorted out and clarified.

In the mean time, you will need to define a value for bMilliseconds to be something other than False. Note that False is the default value for any undefined variable -- if you don't explicitly create/define a variable's value, VBScript will automatically create it on demand and assign it a value of empty/false/0).

Since you haven't explicitly declared/defined the bMilliseconds variable as True before attempting to use it, the VBScript interpreter is creating that variable on demand and defaulting its value to False.

Here's an example of what you can do:
Code:

bMilliseconds = True
Do
    bCursorMoved = crt.Screen.WaitForCursor(100, bMilliseconds)
Loop until bCursorMoved = False

Does this help you get further?

--Jake


All times are GMT -6. The time now is 07:37 PM.