Code: Select all
Label>Start
//Ask how many times to run
Input>NumTimes, How Many Pages Do You Want To Add:,10
Let>x=0
Repeat>x
Let>WW_TIMEOUT=30
//Switch to EasePublisher
SetFocus>EasePublisher
WaitWindowOpen>EasePublisher
//Move to end of Waveform
Press Alt
Press End
Release Alt
//Get macro to wait until waveform fully loaded
GetScreenRes>sX,sY
FindImagePos>C:\temp\loadingaudio.bmp,SCREEN,0,0,XArr,YArr,imgs
Let>maxwait=100
Let>counter=0
Repeat>imgs
Let>counter=counter+1
if>counter=maxwait
exit>
endif
wait>1
FindImagePos>C:\temp\loadingaudio.bmp,SCREEN,0,0,XArr,YArr,imgs
Until>imgs=0
//Open Add Page Dialogue
Press CTRL
Send>1
Release CTRL
WaitWindowOpen>Add page(s)
Endif
//Enter automatic page number
Wait>1
Press Enter
WaitWindowClosed>Add page(s)
SetFocus>EasePublisher
WaitWindowOpen>EasePublisher
GetScreenRes>sX,sY
FindImagePos>C:\temp\loadingaudio.bmp,SCREEN,0,0,XArr,YArr,imgs
Let>maxwait=100
Let>counter=0
Repeat>imgs
Let>counter=counter+1
if>counter=maxwait
exit>
endif
wait>1
FindImagePos>C:\temp\loadingaudio.bmp,SCREEN,0,0,XArr,YArr,imgs
Until>imgs=0
SetFocus>EasePublisher
//Move to next file in list
Press CTRL
Press Page Down
Release CTRL
//Get macro to wait until waveform fully loaded
GetScreenRes>sX,sY
FindImagePos>C:\temp\loadingaudio.bmp,SCREEN,0,0,XArr,YArr,imgs
Let>maxwait=100
Let>counter=0
Repeat>imgs
Let>counter=counter+1
if>counter=maxwait
exit>
endif
wait>1
FindImagePos>C:\temp\loadingaudio.bmp,SCREEN,0,0,XArr,YArr,imgs
Until>imgs=0
Let>x=x+1
if>x=NumTimes
Ask>Complete! Would You Like To Add More Pages?,strResponse
endif
if>strResponse=YES
Goto>Start
endif
if>strResponse=NO
exit>
endif
Until>x=NumTimes
If I say no the macro exits correctly, I can then relaunch it and ask it run another xx times and it will do this correctly again.
However if I say YES to adding more pages, no matter what number I enter the macro will ONLY run once. Once it has run that one more time I get another message asking if I want to add more pages and at this point no matter whether I click on No, the cross in the top right corner or enter 0 the macro continually runs one more time and so it becomes impossible to quit as that just makes it run once more again and so on and so on.
For the life of me I can't figure out why this is happening, any ideas?