I have a script that is ran as the last script in a schedule. When this script is ran in the schedule it fails, however when I run it after that it doesn’t fail.
I’ve put the code below, the purpose of the script is to multiple select some items (by using the KeyDown ControlKey command) and drag them onto the apps desktop.
-- Clear all left over object menu arrows
put everyImageLocation("objectMenu") into overallLocations
put the number of items in overallLocations into i
Repeat while i > 0
MoveTo item i of overallLocations
Subtract 1 from i
End Repeat
MoveTo "fieldMaritalStatus"
WaitFor 10.0, "objectMenu"
MoveTo "objectMenu"
Click "objectMenu"
WaitFor 10.0, "valuesMenu"
MoveTo "valuesMenu"
WaitFor 10.0, "valuesMenuSelected"
MoveTo "valuesMenuSelected"
WaitFor 10.0, "valuesMaritalStatusDisplayed"
MoveTo "valuesMaritalStatusDivorced"
-- This click doesn't always happen
Click "valuesMaritalStatusDivorcedHover"
MoveTo "valuesMaritalStatusWidowed"
KeyDown ControlKey
Click "valuesMaritalStatusWidowedHover"
MouseButtonDown 1
Drop "desktopMoveLocation"
KeyUp ControlKey
WaitFor 10.0, "maritalStatusDivorcedWidowedOpenVerify"
Does anyone know why this is happening? I don’t think there is a problem with the code but I may be wrong! :?