Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
Esabik
- Pro Scripter
- Posts: 52
- Joined: Wed Jun 15, 2005 8:03 pm
- Location: Fairfield, NJ
Post
by Esabik » Thu Jan 08, 2015 4:56 pm
Hi Is there a way to show a timer dialog that counts during any wait delay between steps?
For example if I have:
5] wait>10
6] execute>blah blah
7] wait>15
8] execute>more blah blah
9] wait>10
I am hoping to see the WAIT> 10 and 15 countdowns as they are happening. Is this possible to show this and associate it with line numbers, how long the wait is and how much time is left?

Just when you thought it was safe to go in the water........

-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Thu Jan 08, 2015 10:38 pm
Something like this?
Replace Wait>10
with
GoSub>Dwell,10
Code: Select all
VBSTART
VBEND
Let>RP_Wait=1
Dialog>Dialog1
object Dialog1: TForm
BorderIcons = [biSystemMenu]
Caption = 'Wait Time'
ClientHeight = 129
ClientWidth = 170
Position = poScreenCenter
object Label1: TLabel
Left = 40
Top = 40
Width = 36
Height = 13
Caption = 'Waiting'
end
object Label2: TLabel
Left = 40
Top = 64
Width = 32
Height = 13
end
end
EndDialog>Dialog1
Let>Num=_Line_num
GoSub>Dwell,10
RunProgram>cmd /c dir c:\
Let>Num=_Line_num
GoSub>Dwell,15
RunProgram>cmd /c dir c:\
Let>Num=_Line_num
GoSub>Dwell,10
SRT>Dwell
Show>Dialog1
VBEval>Timer,StartToDwell
Add>num,2
Label>DwellTimerLabel
Wait>0.01
VBEval>Timer-%StartToDwell%,TotalDwellSeconds
If>TotalDwellSeconds>%Dwell_var_1%
Goto>EndDwellTimerLabel
EndIf
Let>TotalDwellSeconds={trunc (%TotalDwellSeconds%)}
SetDialogProperty>Dialog1,Label2,Caption,%TotalDwellSeconds% of %Dwell_var_1%%crlf%%crlf%Line Number: %num%
Goto>DwellTimerLabel
Label>EndDwellTimerLabel
Let>Dwell_var_1=
CloseDialog>Dialog1
END>Dwell
-
Esabik
- Pro Scripter
- Posts: 52
- Joined: Wed Jun 15, 2005 8:03 pm
- Location: Fairfield, NJ
Post
by Esabik » Fri Jan 09, 2015 2:59 pm
Thanks JRL I am liking this. Originally I thought that maybe there was a function that I could turn on and didn't know where it was. Homegrown is good.

Just when you thought it was safe to go in the water........
