The macro works fine, but when it hits the loop end it just stops. (referring to the main loop at Loop, %loopcount% (I have tried a variable and regular number here with same result)
Any ideas?
Code: Select all
InputBox, outputDate, My Input Box, What is the Campaign Date?
InputBox, outputSubject, My Input Box, What is the Email Subject?
InputBox, outputSubject2, My Input Box, What is the Second Subject?
InputBox, outputID, My Input Box, What is the ID number?
InputBox, loopcount, My Input Box, How many times to run?
Loop, %loopcount%
{
MsgBox, 0, , Macro Start
/*
ChangeDateStart:
*/
Send, {End}
Sleep, 500
Click, 470, 802 Left, 1
Sleep, 10
Send, {Control Down}{a}{Control Up}
SendRaw, %outputdate%
Sleep, 1000
Click, 1903, 1080 Left, 1
Sleep, 10
Sleep, 1000
Send, {Home}
ImageLoopStart:
CoordMode, Pixel, Client
PixelSearch, FoundX, FoundY, 0, 0, 2048, 1152, 0x0078EF, 0, Fast RGB
If (ErrorLevel)
{
Goto, ImageLoopStart
}
Else
{
Goto, ImageLoopEnd
}
ImageLoopEnd:
Click, 775, 401 Left, 1
Sleep, 10
Send, {Control Down}{a}{Control Up}
SendRaw, %outputSubject% ; Change to Campaign Date
Click, 600, 463 Left, 1
Sleep, 10
Send, {Control Down}{a}{Control Up}
SendRaw, %outputSubject2% ; Change to Campaign Date
Click, 1084, 527 Left, 1
Sleep, 10
Send, {Backspace}
SendRaw, %outputID% ; Change to Campaign Date
Click, 1098, 652 Left, 1
Sleep, 10
Send, {Backspace}
SendRaw, %outputID% ; Change to Campaign Date
Click, 1904, 1076 Left, 1
Sleep, 10
Image2LoopStart:
CoordMode, Pixel, Client
PixelSearch, FoundX, FoundY, 1761, 1044, 2012, 1110, 0x041156, 0, Fast RGB
If (ErrorLevel)
{
Goto, Image2LoopStart
}
Else
{
Goto, Image2LoopEnd
}
Image2LoopEnd:
Send, {Control Down}{F4}{Control Up}
/*
Goto, ChangeDateStart
*/
}