Sign in to follow this  
Followers 0
Henryz

need help on activate a new window

4 posts in this topic

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

Share this post


Link to post
Share on other sites



I used visual basic command on this,which was worng

1. run ("firefox.exe")

2. send ("!r")

I still need help on this problem.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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][]]J
BÚ[ØZ]]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

;)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0