Elbereth Posted October 12, 2004 Share Posted October 12, 2004 This will probably make you lough, but I cannot see what is wrong with this script: RunWait ("L:\saplogon.exe") WinActivate ("Archivio auto-estraente WinRAR") If WinActive("Archivio auto-estraente WinRAR") Then MsgBox(0, "", "La finestra è attiva") EndIf Send ("!i") Send ("!t") RunWait ("msiexec SAPSSO.msi", "L:") Send ("{ALT}e") Send ("{ALT}f") I always get to the program window, but it stops without receiving the ALT+i signal and hangs there. What am I missing? Thanks a lot Link to comment Share on other sites More sharing options...
nobby Posted October 12, 2004 Share Posted October 12, 2004 Have you tried without the message box? Or reactivate the window after the message box? sometimes it is good to put some sleep statments in as well. RunWait ("L:\saplogon.exe") WinActivate ("Archivio auto-estraente WinRAR") If WinActive("Archivio auto-estraente WinRAR") Then MsgBox(0, "", "La finestra è attiva") EndIf WinActivate ("Archivio auto-estraente WinRAR") sleep(250) Send ("!i") sleep(250) Send ("!t") RunWait ("msiexec SAPSSO.msi", "L:") Send ("{ALT}e") Send ("{ALT}f") You may also check Winrar as you can compress with options to run after exctraction. CheersNobby Link to comment Share on other sites More sharing options...
Elbereth Posted October 12, 2004 Author Share Posted October 12, 2004 Yes, I had inserted some waiting instructions and eliminated the IF clause, but it still stops at the same point in execution. Thanks for your quick support. Link to comment Share on other sites More sharing options...
SlimShady Posted October 12, 2004 Share Posted October 12, 2004 (edited) Don't use RunWait if you want to send keystrokes to the application. Try this: $Title = "Archivio auto-estraente WinRAR" Run ("L:\saplogon.exe") WinWait ($Title) Sleep(500) WinActivate ($Title) sleep(250) Send ("!i") sleep(250) Send ("!t") Run ("msiexec SAPSSO.msi", "L:") Send ("{ALT}e") Send ("{ALT}f") Edited October 12, 2004 by SlimShady Link to comment Share on other sites More sharing options...
Elbereth Posted October 12, 2004 Author Share Posted October 12, 2004 Thanks SlimShady, I have done as you suggested, I now have this code in use: Run ("L:\saplogon.exe") WinWait("Archivio auto-estraente WinRAR") Sleep(500) WinActivate ("Archivio auto-estraente WinRAR") sleep(250) Send ("!i") sleep(250) WinWait("Conferma sosituzione file") Sleep(500) WinActivate ("Conferma sosituzione file") sleep(250) Send ("{ALT}t") Run ("L:\msiexec SAPSSO.msi") WinWait("SAP Kerberos SSO Support Setup") Sleep(500) WinActivate ("SAP Kerberos SSO Support Setup") sleep(250) Send ("{ALT}e") sleep(250) Send ("{ALT}f") And it seems to work, except for an MSI error message that I will try to debug by myself. Thanks again to all of you. Link to comment Share on other sites More sharing options...
midiaxe Posted October 12, 2004 Share Posted October 12, 2004 (edited) For running MSI installers, I usually use the following: RunWait(@SystemDir & "\msiexec.exe /i filename.msi") Hope this helps! =MX= Edited October 12, 2004 by midiaxe Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now