Hi all.
I'm still a beginner in programming & even more so in "Autoit". But I find it interesting & I need some simple automation task being done. So far, I've seen some videos on "Autoit" & well, I've been led by the hand until I come to this as shown below. The "#-----------------------------------------------" I just put on here, it's not part of the program. But I put it to segregate only to show the program.
My aim here is I tried to get an installer be it *.msi or *.exe from a specific location as shown. And then simulate once the software is opened to click on some buttons & choose. Then once finished it will close. Do advise on how I should continue with this. I've tried to break down, bit by bit, it seems like it's OK, there's no major error but just cannot seem to run, do advise, thanks. Any intelligent comments & assistance will be useful, thanks.
#-----------------------------------------------
Main()
Func Main()
Initialize();
AskUser();
DoInstall();
CleanUp();
EndFunc ; End:main()
Func Initialize()
$InstNSCPDest = ("C:\Users\kchan5\Desktop\OP5WA" & "\NSCP-0.5.0.65-x64.msi")
$NSCPSetup = ("NSClient++ (x64) Setup")
FileInstall("NSCP-0.5.0.65-x64.msi", $InstNSCPDest,1)
EndFunc ; End:Initialize()
Func AskUser()
EndFunc ; End:AskUser()
Func DoInstall()
Run($InstNSCPDest)
sleep(2000);
ProcessWaitClose("msiexec.exe")
WinActivate($NSCPSetup)
WinWaitActive($NSCPSetup)
Send("{ENTER}")
sleep(2000);
Send("{TAB}")
sleep(2000);
Send("{ENTER}")
sleep(2000);
Send("{TAB}")
sleep(1000);
Send("{TAB}")
sleep(1000);
Send("{ENTER}")
sleep(2000);
Send("{sgcorpop5p01}");
sleep(2000);
Send("{ENTER}")
sleep(2000);
#Send("{ENTER}")
EndFunc ; End:DoInstall()
Func CleanUp();
EndFunc ; End:CleanUp();
#-----------------------------------------------