Trouble updating a dialog while the script runs.

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mileswilliams
Junior Coder
Posts: 24
Joined: Sun Jun 11, 2006 9:50 am

Trouble updating a dialog while the script runs.

Post by mileswilliams » Sat Dec 23, 2006 1:49 am

I'm running a macro that checks some critical processes. It is no good just checking them and saying everything was fine, the bosses want to see what it checked, and the result. Eventually written to a log (easy part)

I am trying to have a dialogbox running that shows key parts of the checks, like when you install something...checking diskspace...loading drivers.... etc...

here is a cut down version of what I have so far :

Code: Select all

Dialog>dialog1
   Caption=Progress
   Width=445
   Height=631
   Top=106
   Left=16
   Max=1
   Min=1
   Close=1
   Resize=1
   Memo=progress,96,24,273,537,%log%
EndDialog>dialog1

SRT>mainloop
let>log=%log%%CRLF%%update%
wait>0.3
show>dialog1
wait>0.3
setfocus>Progress
wait>0.3
wait>2

END>mainloop

let>update=Kea Session Found and is running checks
gosub>mainloop

let>update=grepping for the process 'prv_nms_req2.4ge' on %server%
wait>0.3
resetdialogaction>dialog1
gosub>mainloop
The problem I'm facing is that only one update is made to the progress memo. I want a running commentary as checks are done etc.

Thanks in advance.
don't be a chicken little

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

Post by JRL » Sat Dec 23, 2006 5:59 am

Try this. "log" and "server" are not defined in this clip.

Code: Select all

Dialog>dialog1
   Caption=Progress
   Width=445
   Height=631
   Top=106
   Left=16
   Max=1
   Min=1
   Close=1
   Resize=1
   Memo=progress,96,24,273,537,
EndDialog>dialog1

show>dialog1

SRT>mainloop
wait>0.3
ResetDialogAction>dialog1
END>mainloop

let>dialog1.progress=%log%%CRLF%
gosub>mainloop

let>dialog1.progress=%dialog1.progress%Kea Session Found and is running checks%CRLF%
gosub>mainloop

let>dialog1.progress=%dialog1.progress%=grepping for the process 'prv_nms_req2.4ge' on %server%%CRLF%
gosub>mainloop

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