Is there any way to pause script?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
OlgaFB
Pro Scripter
Posts: 58
Joined: Mon Nov 01, 2004 3:04 pm
Contact:

Is there any way to pause script?

Post by OlgaFB » Mon Nov 01, 2004 3:11 pm

Hi,

First of all, thank you SO MUCH for your wonderful product, you can't imagine how worthy it is for me!

About this "pause" issue:

until now, if I see that the script does something with mistake, I just "Break" it and then if I want to resume the task, it'll do it from the very beginning.

But may be you created a way to just Pause script for some time and then resume it exactly from the place it stopped?

The question also is, how I can let the macro know, that it should resume?

Now, when I see problematic cases or pause need in the scripts, I just put these lines:

Wait>0.76
MessageModal>Choose Category
Macro>C:\Program Files\MJT Net Ltd\Macro Scheduler\WaitForContinue.scp
Wait>1.1

When WaitForContinue.scp is defined as following:

Let>WW_TIMEOUT=880
GetClipBoard>then
Label>Lab1
Wait>0.20
Let>compStr=c
GetClipBoard>now
If>compStr=now,prefinish

Goto>Lab1
Label>prefinish
If>then=now,finish
Wait>0.20
PutClipboard>then
Label>finish

I.e. when I want the script to continue, I select a letter "c" somewhere on the page and copy it to the clipboard and immediately release the mouse, as the script gets the sign and exits the WaitForContinue macro, and then continue to do what it should do after the call to WaitForContinue.

But probably there are other ways to let the script know I want to pause and resume?

I think now of just writing to a file, what function I'm implementing, and then just jump to a label which is written in the file - I was delighted to see that Goto works with variables as well.

But if you have any other insights to this, I'd be glad to know it. ;)

To share with you - I wrote another script that logs everything I put in my clipboard, to the file - I wrote it based on the existing script ion your database, but that exisiting script opened Notepad, and I made it not so disturbing:

DateStamp>c:\URLs1.txt,Macro Started
PutClipBoard>
Label>Lab1
GetClipBoard>then
Wait>2
GetClipBoard>now
If>then=now,Lab1
WriteLn>c:\URLs1.txt,result,%now%
Goto>Lab1

That's it.

Thank you again for your wonderful software!

Best,
Olga.

Lumumba

Post by Lumumba » Tue Nov 02, 2004 11:06 am

But may be you created a way to just Pause script for some time and then resume it exactly from the place it stopped?
Another scripting tool offers such an option at its TrayIcon

Image

Please check the announcement section of this forum if an equivalent has been stated for the following release of Macro Scheduler.

Guest

Post by Guest » Tue Nov 30, 2004 1:15 pm

Thank you.

I checked in 7.2 - WaitForKeyPressed (or what's its name) existed but didn't work. I'll try now in 7.3.3

Anyway, this way to track things with Clipboard is convenient when you need to tell script somethingdifferent through its running, not stopping for input.

Best,
Olga.

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