Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > General

Thread Tools Display Modes
Old 04-25-2011, 08:41 AM
dumbmick dumbmick is offline
Registered User
Join Date: Apr 2010
Posts: 4
looping on mapped keys

When I connect to equipment, I often have to run the same commands. I created keymappings for those commands, but I'd like to be able to add some frequency to have them repeat every 60 seconds or so. Is that do-able?
Reply With Quote
Old 04-25-2011, 09:21 AM
rtb rtb is offline
VanDyke Technical Support
Join Date: Aug 2008
Posts: 4,306
Hi Tom,

It would be possible to map a key to run a script which issues the command every 60 seconds.

Here is an example script:
crt.Screen.Synchronous = True
    crt.Screen.Send "command" & vbcr
    crt.Screen.WaitForString vbcr
    crt.Sleep 60000
You could also use a variable that you increment and only loop while the condition is true.

For example:
nCount = 0
crt.Screen.Synchronous = True
Do While nCount < 3
    crt.Screen.Send "command" & vbcr
    crt.Screen.WaitForString vbcr
    nCount = nCount + 1
    crt.Sleep 60000
Does this help to accomplish your goal?

VanDyke Software
Technical Support
Reply With Quote

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

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 11:16 AM.