Henryz Posted December 7, 2006 Share Posted December 7, 2006 Hi all, I try to automate an installation of a third party program such as firefox2.exe. when I use send ("c:\firefox2.exe"), the Window firewall promts for permissons to run, so I use send ("%r") ..... Alt + R for the Run button Then, the main firefox program comes out, but my send function won't work anymore becasue current window is not active (I think), I use winactivate ("Mozilla firefox setup","") winwaitactive ("Mozilla firefox setup", "") but no reponses come out. thansk for the help in advance Link to comment Share on other sites More sharing options...
Henryz Posted December 7, 2006 Author Share Posted December 7, 2006 I used visual basic command on this,which was worng 1. run ("firefox.exe") 2. send ("!r") I still need help on this problem. Link to comment Share on other sites More sharing options...
Henryz Posted December 7, 2006 Author Share Posted December 7, 2006 here is my script, please advice $win_title = "PatchLink Update Agent - InstallShield Wizard" Run ("msiexec.exe /i c:\updateagent.msi") WinWaitActive ("Open File - Security Warning", "") ControlClick ("Open File - Security Warning", "", "Button2") ; step 1 WinWaitActive ($win_title, "will allow you to modify") ControlClick ($win_title, "&Next >", "Button1") MsgBox (0, "window", "done") after step#1, the main set up windows pops out but there is no acton. Is it the forcus not on this window? or somethingelse? Link to comment Share on other sites More sharing options...
MHz Posted December 8, 2006 Share Posted December 8, 2006 You do not need to activate a window for Control* functions so use WinWait instead. $win_title = "PatchLink Update Agent - InstallShield Wizard" Run ("msiexec.exe /i c:\updateagent.msi") WinWait ("Open File - Security Warning", "") ControlClick ("Open File - Security Warning", "", "Button2") ; step 1 WinWait ($win_title, "will allow you to modify") ControlClick ($win_title, "&Next >", "Button1") MsgBox (0, "window", "done") oÝ÷ Øò¢éÞyÖ§iËb½ì"Ú0¶§v¶¬Á¬ºÚ"µÍÚ[ØZ] BÚ[XÝ]]J BÚ[ØZ]XÝ]J BoÝ÷ Ù«"·¢¶Çè®Ø^Â)Ý£¶+ÚµëÛaz|Û.Ø¥iËb½äázǺ¸Ë§v"²z-¥ªí¡ûaz)쵩ejبº.¶)Þ²(ºWn±à&âƬz+]¡ë'¢Ö©¥æ«ìm¶)jëh×6 $win_title = "PatchLink Update Agent - InstallShield Wizard" Run ("msiexec.exe /i c:\updateagent.msi") AdlibEnable("_Adlib") WinWait ($win_title, "will allow you to modify") AdlibDisable() ControlClick ($win_title, "&Next >", "Button1") MsgBox (0, "window", "done") Func _Adlib() If WinExists("Open File - Security Warning") Then ControlClick ("Open File - Security Warning", "", "Button2") EndIf EndFunc 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