Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-12-2021, 07:51 AM
freeman freeman is offline
Registered User
 
Join Date: Feb 2021
Posts: 1
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

Last edited by jdev; 02-12-2021 at 08:22 AM. Reason: Structure code formatting for easier understanding
Reply With Quote
  #2  
Old 02-12-2021, 09:13 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,091
Quote:
Originally Posted by freeman View Post
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
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:51 PM.