Sign in to follow this  
Followers 0
st4vr0s

Nero Express Button click?

4 posts in this topic

Guys,

I'm currently trying to write a very simple script to install Nero 8 Express but I'm stumped :)

Here's what I have ....

RunWait ("C:\Nero8express\setup.exe")

WinWait ("Nero MultiInstaller", "Nero 8 Essentials")

WinWait ("Nero MultiInstaller", "Nero 8 Essentials")

WinWait ("Nero MultiInstaller", "Nero 8 Essentials")

WinActivate ("Nero MultiInstaller", "Nero 8 Essentials")

WinActivate ("Nero MultiInstaller", "Nero 8 Essentials")

WinActivate ("Nero MultiInstaller", "Nero 8 Essentials")

WinWaitActive ("Nero MultiInstaller", "Nero 8 Essentials")

WinWaitActive ("Nero MultiInstaller", "Nero 8 Essentials")

WinWaitActive ("Nero MultiInstaller", "Nero 8 Essentials")

ControlClick("Nero MultiInstaller", "Nero 8 Essentials", "[CLASS:Button; TEXT:Nero 8 Essentials; Instance:1;]")

I've tried allsorts ...

Do

Until ControlCommand("[CLASS:#32770]","","Nero 8 Essentials","IsVisible","")

ControlClick("[CLASS:#32770]","","Nero 8 Essentials","left",1)

Here is a summary from Autoinfo,

>>>> Window <<<<

Title: Nero MultiInstaller

Class: #32770

Position: 431, 465

Size: 576, 426

Style: 0x14CA00CC

ExStyle: 0x00050101

Handle: 0x000000000013015A

>>>> Control <<<<

Class: Button

Instance: 1

ClassnameNN: Button1

Advanced (Class): [CLASS:Button; INSTANCE:1]

ID: 65535

Text: Nero 8 Essentials

Position: 25, 180

Size: 185, 30

ControlClick Coords: 98, 13

Style: 0x5001000B

ExStyle: 0x00000000

Handle: 0x00000000001402C0

>>>> Mouse <<<<

Position: 557, 681

Cursor ID: 0

Color: 0x000000

>>>> StatusBar <<<<

>>>> Visible Text <<<<

Nero 8 Essentials

SecurDisc Viewer

Exit

>>>> Hidden Text <<<<

Where am I going wrong?

Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Guys,

I'm currently trying to write a very simple script to install Nero 8 Express but I'm stumped :)

Here's what I have ....

RunWait ("C:\Nero8express\setup.exe")

WinWait ("Nero MultiInstaller", "Nero 8 Essentials")

WinWait ("Nero MultiInstaller", "Nero 8 Essentials")

WinWait ("Nero MultiInstaller", "Nero 8 Essentials")

WinActivate ("Nero MultiInstaller", "Nero 8 Essentials")

WinActivate ("Nero MultiInstaller", "Nero 8 Essentials")

WinActivate ("Nero MultiInstaller", "Nero 8 Essentials")

WinWaitActive ("Nero MultiInstaller", "Nero 8 Essentials")

WinWaitActive ("Nero MultiInstaller", "Nero 8 Essentials")

WinWaitActive ("Nero MultiInstaller", "Nero 8 Essentials")

ControlClick("Nero MultiInstaller", "Nero 8 Essentials", "[CLASS:Button; TEXT:Nero 8 Essentials; Instance:1;]")

I've tried allsorts ...

Do

Until ControlCommand("[CLASS:#32770]","","Nero 8 Essentials","IsVisible","")

ControlClick("[CLASS:#32770]","","Nero 8 Essentials","left",1)

Here is a summary from Autoinfo,

>>>> Window <<<<

Title: Nero MultiInstaller

Class: #32770

Position: 431, 465

Size: 576, 426

Style: 0x14CA00CC

ExStyle: 0x00050101

Handle: 0x000000000013015A

>>>> Control <<<<

Class: Button

Instance: 1

ClassnameNN: Button1

Advanced (Class): [CLASS:Button; INSTANCE:1]

ID: 65535

Text: Nero 8 Essentials

Position: 25, 180

Size: 185, 30

ControlClick Coords: 98, 13

Style: 0x5001000B

ExStyle: 0x00000000

Handle: 0x00000000001402C0

>>>> Mouse <<<<

Position: 557, 681

Cursor ID: 0

Color: 0x000000

>>>> StatusBar <<<<

>>>> Visible Text <<<<

Nero 8 Essentials

SecurDisc Viewer

Exit

>>>> Hidden Text <<<<

Where am I going wrong?

Thanks

Why the repeated Win functions?

Try this:

RunWait ("C:\Nero8express\setup.exe")
WinWait ("Nero MultiInstaller", "Nero 8 Essentials")
WinActivate ("Nero MultiInstaller", "Nero 8 Essentials")
WinWaitActive ("Nero MultiInstaller", "Nero 8 Essentials")

ControlClick("Nero MultiInstaller", "Nero 8 Essentials", "[CLASS:Button; Instance:1]")

; -- or --

ControlClick("Nero MultiInstaller", "Nero 8 Essentials", "Button1")

:)

Edit: Doh! As Jos pointed out, RunWait() will not continue until the process closes. So, unless setup.exe launches a different process to do the actual install, the script will be hung right there.

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Why the repeated Win functions?

Try this:

RunWait ("C:\Nero8express\setup.exe")
WinWait ("Nero MultiInstaller", "Nero 8 Essentials")
WinActivate ("Nero MultiInstaller", "Nero 8 Essentials")
WinWaitActive ("Nero MultiInstaller", "Nero 8 Essentials")

ControlClick("Nero MultiInstaller", "Nero 8 Essentials", "[CLASS:Button; Instance:1]")

; -- or --

ControlClick("Nero MultiInstaller", "Nero 8 Essentials", "Button1")

:)

Hi PsaltyDS,

Many thanks for the speedy reply.

Reason behind the extra Win functions is because the scripts are used in Microsoft Desktop Deployment application.

Sometimes when the autoit created .exe's are run the oweness of the activated app sometimes returns control to the Task sequencer, this way if it passes back briefly it will will return control to the autoit .exe i have created.

Regarding the suggestions you have posted, neither worked.

Could it be down to the fact that I'm creating the scripts on a Vista 64 Bit Operating System?

All other scripts have worked so far.

This is an odd one.

Thanks

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Change:

RunWait ("C:\Nero8express\setup.exe")

to

Run ("C:\Nero8express\setup.exe")
:) Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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