Error when running a repeated script over 50 times

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
bensonlr
Newbie
Posts: 4
Joined: Thu Jan 27, 2005 2:15 pm
Location: Oklahoma City, OK

Error when running a repeated script over 50 times

Post by bensonlr » Mon Jul 02, 2007 2:18 pm

The script I have was recorded live and not hand coded except for adding the repeat into the code.

I have dual monitors and have a notepad file open on the right screen that has just a list of files to open and perform a macro on.

This notepad file looks like this.

0101B Song Title 1
0103B Song Title 2

On the left screen I have Windows Explorer open to a directory I have created called C:\masterexe\

The macro starts by going to the right screen and with the shift held down I use the right arrow to highlite the 0101B text. This puts the text on to the clipboard.

Then it goes to the left screen and does a search for this number in a directory.

When the directory is searched there will always be three files to match that search string.

I then copy the three files from the search window and close that search window and paste these files in explorer.

I highlite all of the files and use Winzip to zip them to a single file.

This will leave the original 3 files plus the zipped file.

I delete the 3 original files and convert the zip file to an EXE using Winzip.

I go back to the second screen and copy the file name again and use it to rename the EXE file from temp.EXE to 0101B.exe

Then I do a "move to folder" in explorer and move this completed file to a 'done' directory.

The macro then goes back to the second screen and moves the cursor to the start of the text line and goes down one row to a fresh number.

I then use the repeat function to do this over and over.

My number file contains around 2000 lines so the macro repeats this conversion over and over.

This is all working except when I leave it to run for long periods I will come back to find the screen is all white and the macro is still trying to run but has stopped progressing in this process.

When I created the macro I went very slow to give each stage or copy proceedure plenty of time and I even watch as the macro runs and saw a few places that were still a little short on time so I increased those "waits" to give plenty of time.

I sit and watch the macro to try to find out what is happening but it runs fine while I am watching and cannot see a problem.

I assume that all of a sudden something needs more time and the macro gets out of sync.

I am still running the macro with Let>WW_TIMEOUT=5 and I'm playing back in normal speed.

Is there a problem in using dual monitors? The macro does work fine except for long runs.

I have had this same issue with many scripts I have recorded as all of the scripts are basically opening this list on the right and then editing on the left.

I started with version 7.X so I just upgraded this weekend to see if this could be in my old version BUT it did not change the issue. I do have the latest version running.

I will attach my code to see if you have any thoughts.

Thanks,


=================
// C:\Program Files\MJT Net Ltd\Macro Scheduler\Create EXE new 8.scp
// Recorded on Thursday, June 28, 2007, at 12:43 AM

//Recorded Events
Let>WW_TIMEOUT=5
CapsOff

Let>k=0
Repeat>k
Let>k=k+1

MouseMove>1961,6
Wait>1.63
LClick
Wait>0.94
Press Shift
Press Right
Wait>0.27
Press Right * 4
Wait>0.34
Release Shift
Wait>0.33
Press CTRL
Wait>0.56
Send>c
Wait>0.13
MouseMove>1892,6
Wait>0.1
Release CTRL
MouseMove>116,226
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
Wait>0.48
RClick
Wait>0.3
MouseMove>160,314
Wait>1.82
LClick
WaitWindowOpen>Search Results
MoveWindow>Search Results,454,297
ResizeWindow>Search Results,800,600
Wait>2.16
Press CTRL
Wait>0.58
Send>v
Wait>0.23
Release CTRL
Wait>0.84
Press Left
Wait>0.26
Press Del
Wait>1
Press Enter
Wait>0.06
MouseMove>726,541
Wait>4.34
LClick
Wait>0.62
Press CTRL
Wait>0.21
Send>a
Wait>0.18
Release CTRL
Wait>0.35
Press CTRL
Wait>0.52
Send>c
Wait>0.17
Release CTRL
Wait>1.83
Press ALT
Wait>0.32
Press F4
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
Wait>0.07
Release ALT
Wait>0.06


Wait>3.44
// wait longer for files to copy from search to temp folder

MouseMove>590,291
LClick
Wait>0.47


RClick
Wait>0.16
MouseMove>637,396
Wait>5.43




LClick
Wait>0.15
MouseMove>524,151
Wait>2.55
RClick
Wait>0.22
MouseMove>558,278
Wait>2.08
LDblClick
Wait>1.31

MouseMove>762,296
Wait>4.76
// was 2.76

LClick
WaitWindowOpen>WinZip - temp.zip
MoveWindow>WinZip - temp.zip,292,315
ResizeWindow>WinZip - temp.zip,566,339
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
MouseMove>563,315
Wait>1.39
LDblClick
Wait>0.94
LClick

Wait>10.57



Press Home
Wait>2.25
Press Shift
Press Down * 2
Wait>0.27
Release Shift
Wait>0.98
Press Shift
Press Del
WaitWindowOpen>Confirm Multiple File Delete
MoveWindow>Confirm Multiple File Delete,630,441
ResizeWindow>Confirm Multiple File Delete,419,142
Wait>0.18
Release Shift
Wait>1.54
Send>y
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
WaitWindowOpen>Deleting...
MoveWindow>Deleting...,30,59
ResizeWindow>Deleting...,381,169
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
Wait>0.2
MouseMove>504,140
Wait>5.22999999999999
LClick
Wait>0.44
RClick
Wait>0.22
MouseMove>2064,8
Wait>2.1
LDown
WaitWindowOpen>et song list 3 24 2007 combined versions 3 for MP3 tags backup.txt - Notepad
MoveWindow>et song list 3 24 2007 combined versions 3 for MP3 tags backup.txt - Notepad,1676,-4
ResizeWindow>et song list 3 24 2007 combined versions 3 for MP3 tags backup.txt - Notepad,1688,1058
Wait>0.13
LUp
Wait>0.64
Press CTRL
Wait>0.42
MouseMove>1757,50
Wait>0.29
Send>c
MouseMove>983,114
Wait>0.32
Release CTRL
MouseMove>501,9
Wait>1.48
LDown
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
Wait>0.13
LUp
Wait>0.14
MouseMove>507,139
Wait>1.34
RClick
Wait>0.24
MouseMove>556,447
Wait>1.98
LClick
Wait>0.14
MouseMove>977,445
Wait>1.92
Press Left * 8
Wait>1.08
Press Del
Wait>0.2
Press Del * 3
Wait>0.7
Press CTRL
Wait>0.45
Send>v
Wait>0.25
Release CTRL
Wait>1.19
Press Enter
Wait>0.02
MouseMove>506,138
Wait>3.46
RClick
Wait>0.22
MouseMove>537,214
Wait>1.88
LClick
Wait>0.6
MouseMove>681,316
Wait>2.59
LClick
WaitWindowOpen>WinZip Self-Extractor
MoveWindow>WinZip Self-Extractor,604,358
ResizeWindow>WinZip Self-Extractor,471,333
Wait>0.11
MouseMove>940,663
Wait>1.76
LDblClick
Wait>1.35
LDblClick
Wait>1.46
LClick
Wait>1.57
Send>\encoretrax\
Wait>0.63
LClick
Wait>1.94
Send>Explorer /e, \encoretrax\
Wait>0.99
LDblClick
Wait>2.76
Send>c:\encoretrax
Wait>0.08
Press Left * 4
Wait>0.53
Press Del
Wait>0.23
Press Del * 3
Wait>1.06
Send>.ico
Wait>1.12
LDblClick
Wait>2.45
LClick
Wait>0.16
MouseMove>776,662
Wait>6.27999999999999
LClick
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
Wait>0.03
MouseMove>575,549
Wait>1.02
LClick
Wait>1.77
Press Home
Wait>1.57
Press Shift
Press Del
WaitWindowOpen>Confirm File Delete
MoveWindow>Confirm File Delete,630,425
ResizeWindow>Confirm File Delete,419,140
Wait>0.19
Release Shift
Wait>1.18
Send>y
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
WaitWindowOpen>Deleting...
MoveWindow>Deleting...,30,59
ResizeWindow>Deleting...,381,169
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
Wait>0.56
MouseMove>543,214
Wait>1.51
LClick
Wait>0.69
Press CTRL
Wait>0.27
Send>a
Wait>0.2
Release CTRL
Wait>0.36
MouseMove>56,32
Wait>3.54
LClick
Wait>0.35
MouseMove>111,174
Wait>1.35
LClick
WaitWindowOpen>Move Items
MoveWindow>Move Items,677,349
ResizeWindow>Move Items,539,466
Wait>0.05
MouseMove>809,549
Wait>1.98
LClick
Wait>0.16
MouseMove>1089,786
Wait>1.33
LClick
WaitWindowOpen>temp
MoveWindow>temp,-4,-4
ResizeWindow>temp,1688,1028
Wait>0.52

Press F5
Wait>1.52
// Refresh explorer


MouseMove>2030,4
Wait>2.15
LDown
WaitWindowOpen>et song list 3 24 2007 combined versions 3 for MP3 tags backup.txt - Notepad
MoveWindow>et song list 3 24 2007 combined versions 3 for MP3 tags backup.txt - Notepad,1676,-4
ResizeWindow>et song list 3 24 2007 combined versions 3 for MP3 tags backup.txt - Notepad,1688,1058
Wait>0.19
LUp
Wait>1.08
Press Left * 5
Wait>0.47
Press Down
Wait>0.47

Until>k,100




Code: Select all


Code: Select all


LRB

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