Sign in to follow this  
Followers 0
au3scr

Windows meadia player 11

19 posts in this topic

Script dont click on I accept button

Whats wrong here? could any one say it?

Run (@scriptdir&"\wmp11-windowsxp-x86-enu.exe")
WinWaitActive("Windows Media Player 11","")
WinWaitNotActive("Windows Media Player 11","")
WinWaitActive("Windows Media Player 11","")
ControlClick("Windows Media Player 11", "", "[CLASS:Button; TEXT:&Validate; INSTANCE:6]")
ControlClick("Windows Media Player 11", "", "[CLASS:Button; TEXT:I &Accept; INSTANCE:5]")

Share this post


Link to post
Share on other sites



>>>> Control <<<<

Class: Button

Instance: 5

ClassnameNN: Button5

ID: 39302

Text: I &Accept

Position: 508, 420

Size: 80, 22

ControlClick Coords: 33, 19

Style: 0x50010000

ExStyle: 0x00000020


Share this post


Link to post
Share on other sites

can some one help


Share this post


Link to post
Share on other sites

Are you trying to automate the installation of Windows Media Player 11? If so there are rules for automating software installs.

Is there command line options for a silent install?

If so, use them.

If not, check again!

If there isn't any other choice, then manually automate (oxymoron).

START /WAIT wmp11-windowsxp-x86-enu.exe /Q:A /C:"SETUP_WM.EXE /Q:A /R:N /P:#e"

Share this post


Link to post
Share on other sites

I havent heard anything about command line installing and silent mode

Can you tell me more about that?


Share this post


Link to post
Share on other sites

Most programs have silent install options, especially if they are created with InstallShield or if they are msi files.

Any time you plan to automate a program always do a google search for <program name> silent install

A lot of times you can go to the command prompt and type in the name of the installer with /? to get a list of command line options

wmp11-windowsxp-x86-enu.exe /?

Share this post


Link to post
Share on other sites

Then i make script Run(@scriptdir&"\wmp11-windowsxp-x86-enu.exe /Q " ?

or how i run it with command option?


Share this post


Link to post
Share on other sites

No no no. You must be new to programming.

Click Start > Run > cmd.exe

Type: wmp11-windowsxp-x86-enu.exe /Q

Hit enter. You will see a list of commands.

If you want to perform the silent install from your script do this:

RunWait('wmp11-windowsxp-x86-enu.exe /Q:A /C:"SETUP_WM.EXE /Q:A /R:N /P:#e"', "C:\Path to EXE\")

Change the C:\Path to EXE\ to the folder where the exe is respectively.

Share this post


Link to post
Share on other sites

I am back now..

Quiet install is bad way for script installing

I still need script that clicks on I Accept button

Help me please I have made something totally wrong

Run (@scriptdir&"\wmp11-windowsxp-x86-enu.exe")
WinWaitActive("Windows Media Player 11")
WinWaitNotActive("Windows Media Player 11")
WinWaitActive("Windows Media Player 11")
ControlClick("Windows Media Player 11", "", "[CLASS:Button; TEXT:&Validate; INSTANCE:6]")
ControlClick("Windows Media Player 11", "", "[CLASS:Button; TEXT:I &Accept; INSTANCE:5]")

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Thanks alot, It works. :)

but i dont understand it well (how it works)

Can you teach me what is what ^_^

And why there is sleep?

Edited by au3scr

Share this post


Link to post
Share on other sites

It dont select Express settins

I dont like sleep here

Run (@scriptdir&"\wmp11-windowsxp-x86-enu.exe")
WinWaitActive("Windows Media Player 11")
WinWaitNotActive("Windows Media Player 11")
WinWaitActive("Windows Media Player 11")
;CLICK VALIDATE
$handle = ControlGetHandle ("[CLASS:#32770]", "", "[CLASSNN:Button6]")
If NOT @ERROR Then ControlClick("","",$handle)

Sleep(3000)

;CLICK I ACCEPT
$handle = ControlGetHandle ("[CLASS:#32770]", "", "[CLASSNN:Button5]")
If NOT @ERROR Then ControlClick("","",$handle)
    
$handle = ControlGetHandle ("[CLASS:#32770]", "", "[CLASSNN:Button1]")
If NOT @ERROR Then ControlClick("","",$handle)

-----------------------------------------------------------------


Share this post


Link to post
Share on other sites

The sleep is there because the window after Activate has the same title and class #as the first one.

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

I Edited source, now it click validate and then close script and wm player 11 setup

Run (@scriptdir&"\wmp11-windowsxp-x86-enu.exe")
WinWaitActive("Windows Media Player 11")
WinWaitNotActive("Windows Media Player 11")
    ControlClick("Windows Media Player 11", "", "[ClassNN:Button6]")

;~ Sleep(3000)

ControlClick("Windows Media Player 11", "", "[ClassNN:Button5]")    
ControlClick("Windows Media Player 11", "", "[ClassNN:Button1]")
    ControlClick("Windows Media Player 11", "", "[ClassNN:Button9]")oÝ÷ ØhÙbë%yêlr¸©¶k¬¶éÝz»-jwpéâ¶wvËhrXw±´¸¤zÇ+bv'_¢·â­çèÆz0j+b®¶­sg6ÆVW¥våvD7FfRgV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²¥6VæBgV÷C¶âgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¤f׶66WBFRFW&×2âFRÆ6Vç6Rw&VVÖVçC²å5Dä4S£EÒgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¢f×´æWBfwC³²å5Dä4S£%ÒgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¢f×´7W7FöÒfwC³²å5Dä4S£UÒgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¢f×´æWBfwC³²å5Dä4S£%ÒgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¢f×´æWBfwC³²å5Dä4S£%ÒgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¢f×´æWBfwC³²å5Dä4S£%ÒgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¢f×´æWBfwC³²å5Dä4S£%ÒgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¢f×´æWBfwC³²å5Dä4S£%ÒgV÷C²¤6öçG&öÄ6Æ6²gV÷C´Ö÷¦ÆÆf&Vf÷6WGWgV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¢f×´ç7FÆÂfwC³²å5Dä4S£%ÒgV÷C²
Edited by au3scr

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

I don't like sleep either but calling this script causes the installation to exit:

;CLICK VALIDATE
$handle = ControlGetHandle ("[CLASS:#32770]", "", "[CLASSNN:Button6]")
If NOT @ERROR Then ControlClick("","",$handle)

;CLICK I ACCEPT
$handle = ControlGetHandle ("[CLASS:#32770]", "", "[CLASSNN:Button5]")
If NOT @ERROR Then ControlClick("","",$handle)

The window title and class don't change so it will perform two actions on the first window. It did it to me on my work computer. It clicks Validate (Button6), which takes a few seconds to respond and then clicks Cancel (Button5) immediately. Sleep is the only way I could see to get past.

Edited by weaponx

Share this post


Link to post
Share on other sites

ok but how i get sleep time between accept and finish?

Slower computers need more time and faster computers need less time :)


Share this post


Link to post
Share on other sites

That is very true and I rarely use sleep because of this. It was just a quick solution because you will have to check the actual names of the buttons before clicking them and that can be tricky.

Share this post


Link to post
Share on other sites

you will have to check the actual names of the buttons before clicking them and that can be tricky.

What u mean with this?how i do it?

Sorry for my bad understanding


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