This is one of the scripts, the rest are similar. The scenario is that there is a part of Service Manager which was customized for our company. The tricky part is that vendor does not support the customized part of the app, so it hasn't been maintained properly. Last time when we had this situation, my company had to pay for 'Win Runner' license plus for vendor's fee for development - a lot of money. So, I decided to go Open Source and try to do this - half the job is already done. The updates are going great! Now I am working on a little more complex script that would search for obsolete values and delete them.
Below code is vary basic, could be done much better, but it is doing its' job perfectly. WinWaitDelay is of much help, even though I could probably use another option for that.
I did have a problem making Service Manager respond to Control calls - it is simply dead, script does not run when using and Control related command. I will post some examples, maybe someone can tell me what I am doing wrong.
I will post my story on LinkedIN, as I am a member of Open Source group there, I will say nothing but the best about AutoIt.
; Prompt the user to run the script - use a Yes/No prompt
Global $i=0
$answer = MsgBox(4, "Service Manager QCD Update script", "This script will update QCD. Run?")
; If "No" was clicked (7) then exit the script
If $answer = 7 Then
MsgBox(0, "AutoIt", "OK. Bye!")
Exit
EndIf
Global $i=0
For $i = 1 to 10 Step 1
Opt("WinWaitDelay", 2000)
WinWait("[CLASS:SWT_Window0]", "", 105)
Opt("WinWaitDelay", 500)
Send("{TAB 3}{DOWN} {ENTER}")
WinWait("[CLASS:SWT_Window0]", "", 5)
Send("BlahBLah_1")
Send("{ENTER}")
WinWait("[CLASS:SWT_Window0]", "", 5)
Send("BlahBLah_2")
Send("{ENTER}")
WinWait("[CLASS:SWT_Window0]", "", 5)
Send("BlahBLah_3")
WinWait("[CLASS:SWT_Window0]", "", 5)
Send("{ENTER}")
WinWait("[CLASS:SWT_Window0]", "", 5)
Send("BlahBLah_4")
WinWait("[CLASS:SWT_Window0]", "", 5)
Send("{F10}")
WinWaitActive("Question")
WinWait("[CLASS:#32770]", "", 50)
Send("{Space}")
Next
Exit