Sign in to follow this  
Followers 0
RBCC

Script Problems

9 posts in this topic

Here is my script:

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

Run('McAfee.Spamkiller.exe')

WinWait("End User License Agreement","End User License Agr")

If Not WinActive("End User License Agreement","End User License Agr") Then WinActivate("End User License Agreement","End User License Agr")

WinWaitActive("End User License Agreement","End User License Agr")

MouseMove(339,323)

MouseDown("left")

MouseUp("left")

WinWait("McAfee SpamKiller Installation Wizard","")

If Not WinActive("McAfee SpamKiller Installation Wizard","") Then WinActivate("McAfee SpamKiller Installation Wizard","")

WinWaitActive("McAfee SpamKiller Installation Wizard","")

MouseMove(192,180)

MouseDown("left")

MouseUp("left")

MouseMove(444,364)

MouseDown("left")

MouseUp("left")

" Completing the Mcafee Spamkiller setup" Screen goes here but it doesn't get scripted. how do I solve this?

MouseMove(464,361)

MouseDown("left")

MouseUp("left")

John <_<:)

Share this post


Link to post
Share on other sites



Mkay... <_<

I don't get what the problem is..? Why do you use:

MouseDown("left")
MouseUp("left")

when you can use

MouseClick("left")

I don't know what you need. Try to make it clearer.

Share this post


Link to post
Share on other sites

Yeah, reading the FAQ is nice..and not expecting everything to be done for you.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
; Opt("MouseCoordMode", 0) ; irrelevant, not using MouseMove.
Dim $hwndTEMP, $control
ShellExecute('McAfee.Spamkiller.exe')
If WinWait("End User License Agreement", "End User License Agr", 30) Then
    $hwndTEMP = WinGetHandle("End User License Agreement", "End User License Agr")
Else
    MsgBox(0, "", "Error:  Spamkiller ELUA did not open")
    Exit
EndIf
If Not WinActive($hwndTEMP) Then WinActivate($hwndTEMP)
If Not WinWaitActive($hwndTEMP, "", 5) Then
    MsgBox(0, "", "Error activating ELUA Window")
    Exit
EndIf
$control = "Button1"   ; replace this with the buttons ClassnameNN as found in the Window Spy.
ControlClick($hwndTEMP, "", $control, "left", 1)
If WinWait("McAfee SpamKiller Installation Wizard", "") Then
    $hwndTEMP = WinGetHandle("McAfee SpamKiller Installation Wizard", "")
Else
    MsgBox(0, "", "Error:  Install Wizard did not open.")
    Exit
EndIf
If Not WinActive($hwndTEMP) Then WinActivate($hwndTEMP)
If Not WinWaitActive($hwndTEMP, "", 5) Then
    MsgBox(0, "", "Error activating ELUA Window")
    Exit
EndIf
$control = "Button1"   ; second verse, same as the first.
ControlClick($hwndTEMP, "", $control, "left", 1)
$control = "Button1"   ; third verse, same as the first.
ControlClick($hwndTEMP, "", $control, "left", 1)
; "Completing the Mcafee Spamkiller setup" Screen goes here but it doesn't get scripted. how do I solve this?
$control = "Button1"   ; fourth verse, same as the first.
ControlClick($hwndTEMP, "", $control, "left", 1)

Normally, I don't do this, but the OP made an effort to post his code. I still don't know what he wants with the "Completing Spamkiller Setup" ... probably needs to get ahold of the window's handle and use ControlClick on the buttons or ControlCommand to tinker with the other types of controls (check boxes, radio buttons, whatever).

RTFM4TW

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Mkay... <_<

I don't get what the problem is..? Why do you use:

MouseDown("left")
MouseUp("left")

when you can use

MouseClick("left")

I don't know what you need. Try to make it clearer.

I need to close a window at the end of setup, called "Completing Spamkiller...". And then click the close button. But this screen doesn't even get scripted with scriptwriter! How do I solve this? John

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

If you're using Scriptwriter....

Stop

Colaberate and Listen

Look at the code it creates, engage your brain and write something to fix it.

Examine your original code

Examine the code I wrote to replace it

Figure it out. The truth is out there.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

I get the feeling he knew <_<

Share this post


Link to post
Share on other sites

What can I say? I am a child of the 80's.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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