PBar is born ...

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Ernest

PBar is born ...

Post by Ernest » Fri Dec 13, 2002 7:31 pm

Hi@all,
based on Bob's issue to pipe high bit Ascci keys to a MacroSchedulerMessage, I've played a litlle with that ProgressBar idea. Now you've got it! It's tricky - so use it at your own risk !

Check the commented lines in the code to get an idea of a task to use with PBar: e.g. copy the file "test.txt" from C: --> D:, while PBar is running.

Code: Select all

CapsOff
Let>sc=0
Let>maxsc=121

//Let>SourcePath=C:
//Let>DestinationPath=D:
//Let>File=test.txt

//FileSize>%SourcePath%\%File%,SourceFileSize
//CopyFile>%SourcePath%\%File%,%DestinationPath%\%File%

Message>
ResizeWindow>Macro Scheduler Message*,272,71
WaitWindowOpen>Macro Scheduler Message*
Press Tab
Send> Copy now! Stay tuned ...
Press Home
Wait>2
Press Shift
Press End
Press Del
Release Shift

Label>progress
If>sc=%maxsc%,GoOn
Add>sc,1
Press CTRL
Press ALT
Send Character/Text><
Release ALT
Release CTRL
Wait>0.2

//FileSize>%DestinationPath%\%File%,DetectedFileSize

//Unless a condition (like the following line) won't be defined, the PBar will loop indefinitely (e.g. for testing).
//If>DetectedFileSize=%SourceFileSize%,End
Goto>progress

Label>GoOn
Let>sc=0
Press Shift
Press Home
Press Del
Release Shift
Goto>progress

Label>End
Press Shift
Press Home
Press Del
Release Shift
Send>   Done !
Wait>5
CloseWindow>Macro Scheduler Message*
Have fun,
Ernest

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Dec 14, 2002 2:06 am

Good work Ernest. Nice to see someone play with code that you submit. Its a shared learning process.

That is a good example of what I am doing. I wasn't making a progress for itself, but to be called by a process like CopyFile, RdLine, loops, sub routines, etc. My line with the Wait> was just for testing the code section of the progress bar.

I have made a slight modification to my sample by replacing the 177 with O and the 178 with X. But I really want the traditional symbols and have not given up on that.

What is nice though is the new tool of pressing Tab to start entering text directly into the Message window. I like the way you did that here.

Thanks again to Marcus for the Tab and Ascii inputs to the Message window.

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