Jump to content
Sign in to follow this  
teunvisser

Having Trouble Clicking 2 buttons in 2 screen

Recommended Posts

teunvisser

Hi,

I've been working on a script to make the installation of "Windows Media Player 11" automatic.

Here is the script i've been making the start with:

#include <GUIConstantsEx.au3>
    GUISetState(@SW_SHOW)
Run('C:\Documents and Settings\ICT.SKOBA\Bureaublad\wmp11-windowsxp-x86-nl-nl.exe')
WinWaitActive("Windows Media Player 11", "Bezig met uitpakken")
WinWaitActive("Windows Media Player 11", "Vali&deren")
Send("!d")
WinWaitActive("Windows Media Player 11", "Ik ga &akkoord")
Send("!a")
WinWaitActive("Windows Media Player 11", "Systeemherstel is uitgeschakeld")
Send("{ENTER}")
Exit

But now i've bumped into the following problem:

Posted Image

Its a radio button and dont know how to check it. I know its checked now but I did this manually.

The point is that it needs to be checked automaticly.

Can someone help me out?

Thanx in advance,

teunvisser

Share this post


Link to post
Share on other sites
teunvisser

I'm able to check the Radio Button now..

But now i need to click the "Voltooien" Button after checking the radio button.

I've tried:

#include <GUIConstantsEx.au3>
    GUISetState(@SW_SHOW)
Run('C:\Documents and Settings\ICT.SKOBA\Bureaublad\wmp11-windowsxp-x86-nl-nl.exe')
WinWaitActive("Windows Media Player 11", "Bezig met uitpakken")
WinWaitActive("Windows Media Player 11", "Vali&deren")
Send("!d")
WinWaitActive("Windows Media Player 11", "Ik ga &akkoord")
Send("!a")
WinWaitActive("Windows Media Player 11", "Systeemherstel is uitgeschakeld")
Send("{ENTER}")
WinWaitActive("Windows Media Player 11", "&Snelle instellingen (aanbevolen)")
Send("!s")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Exit

But Tabbing doesnt seem to work.. it doesnt autoclick the "voltooien" button.

Any suggestions on what I should do?

Thanx in advance,

Teun

Share this post


Link to post
Share on other sites
whim

googling WMP silent install yielded this: M$ silent install maker

and: you're not supposed to bump your thread within 24h

whim

edit: oops, sorry - it doesn't support WMP 11

Edited by whim

Share this post


Link to post
Share on other sites
teunvisser

googling WMP silent install yielded this: M$ silent install maker

and: you're not supposed to bump your thread within 24h

whim

edit: oops, sorry - it doesn't support WMP 11

I started this thread 4 days ago..

And i'm sorry but this doesnt really help :D

I need to know how to press the "voltooien" button after checking the radio button. "Snelle instellingen aanbevolen".

Share this post


Link to post
Share on other sites
jvanegmond

Hi Teun,

there are a variety of functions available which can automate windows without directly reproducing user input. This involves simulating the messages which Windows sends to the window if a button or control is pressed.

You can use this to click the "Voltooien" button without someone actually clicking it. This means the window, in all likelyness, doesn't have to be active either.

The functions to do this all start with Control, and can be found in the help file under Function Reference > Window Management > Controls.

The function you are looking for to click the button is ingeniously named ControlClick.

Hope this helps,

Manadar

Edited by Manadar

Share this post


Link to post
Share on other sites
teunvisser

The problem is not that i dont know how to click the button..

But the problem is that the screen does my !o before the actual "voltooien" screen is active..

WinWaitActive does NOT work.. i've tried about everything.

Cant seem to figure it out!

some1 give me the golden tip please :D,

Teun

ps. I've been trying to do it with TAB TAB TAB ENTER.. also this does NOT work >.< its like it doesnt recognize the Voltooien button.

I'm out of ammo now.. dont know what to do!

Share this post


Link to post
Share on other sites
teunvisser

Hi again everyone,

I've been working on a script that makes the installing of the Dutch version of Windows Media Player 11 go automatic.

But i'm suck on this one bit now and its driving me insane.

The thing is:

Posted Image

I'm able to check the Radiobutton.. thats real easy.

But after I checked the radiobutton "Snelle Instellingen (Aanbevolen)"

I want the click the button: "Voltooien".

I've tried everything but i can't get the button to get clicked..

Its like it times-out after checking the Radiobutton and then it doesnt give his click to the "Voltooien" Button.

I think the click on the "Voltooien" is done before the actual screen is active.

I've tried everything but nothing seems to work.

Here is my code:

#include <GUIConstantsEx.au3>
    GUISetState(@SW_SHOW)
Run('C:\Documents and Settings\ICT.SKOBA\Bureaublad\wmp11-windowsxp-x86-nl-nl.exe')
WinWaitActive("Windows Media Player 11", "Bezig met uitpakken")
WinWaitActive("Windows Media Player 11", "Vali&deren")
Send("!d")
WinWaitActive("Windows Media Player 11", "Ik ga &akkoord")
Send("!a")
WinWaitActive("Windows Media Player 11", "Systeemherstel is uitgeschakeld")
Send("{ENTER}")
WinWaitActive("Windows Media Player 11", "&Snelle instellingen (aanbevolen)")
Send("!s")
WinWaitActive("Windows Media Player 11", "Volt&ooien")
Send("!o")
Exit

Hope you guys can get me to the next step......... cause its really working on my nerves.

Thanx,

Teun

Share this post


Link to post
Share on other sites
Steveiwonder

Try

$WinTitle = "Windows Media Player 11"
ControlClick($WinTitle, "", "Button1")

I'm guessing the control ID is "button1" as its the first and only button.

by using AutoIt Window Info tool

GL

Edited by Steveiwonder

They call me MrRegExpMan

Share this post


Link to post
Share on other sites
teunvisser

#include <GUIConstantsEx.au3>
    GUISetState(@SW_SHOW)
Run('C:\Documents and Settings\ICT.SKOBA\Bureaublad\wmp11-windowsxp-x86-nl-nl.exe')
WinWaitActive("Windows Media Player 11", "Bezig met uitpakken")
WinWaitActive("Windows Media Player 11", "Vali&deren")
Send("!d")
WinWaitActive("Windows Media Player 11", "Ik ga &akkoord")
Send("!a")
WinWaitActive("Windows Media Player 11", "Systeemherstel is uitgeschakeld")
Send("{ENTER}")
WinWaitActive("Windows Media Player 11", "&Snelle instellingen (aanbevolen)")
Send("!s")
$WinTitle = "Windows Media Player 11"
ControlClick($WinTitle, "", "Button9")
Exit

Like that?

Share this post


Link to post
Share on other sites
Steveiwonder

Yeah like that :D

You checked the Button Control ID and itas Button9?

If so try


They call me MrRegExpMan

Share this post


Link to post
Share on other sites
jvanegmond

Please do not repost: http://www.autoitscript.com/forum/index.php?showtopic=108247 I already told you that you should use ControlClick. Perhaps try reading help file next time.

I have reported this thread and I'm sure it will be closed soon.

Share this post


Link to post
Share on other sites
teunvisser

Thanx so much guys it works now!

Cant thank you enough :D

I wont repost next time.. but my old topic didnt get any resposes.. this was the only way i supposed.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.