Jump to content

autoit script


bobthenob

Recommended Posts

hi im new to autoit

but im trying to learn (looked at a ot of scripts on this forum)

im trying to install nero but when i get to the licence agrement screen

nero.jpg

i cant seem to move to the i agree radio button

heres my script sofar

; ----------------------------------------------------------------------------

;

; AutoIt Version: 3.1.0

; Author: A.N.Other <myemail@nowhere.com>

;

; Script Function:

; Template AutoIt script.

;

; ----------------------------------------------------------------------------

; Script Start - Add your code below here

run ("Nero.exe")

winwaitActive("Nero Burning ROM Installation Wizard")

Send("{enter}")

winwaitActive("Nero Burning ROM Installation Wizard")

send ("Nero Burning ROM Installation Wizard",1027)

Send("{enter}")

hers the autoit window info

nero2.jpg

thanks inadvance

Edited by bobthenob
Link to comment
Share on other sites


Using Send() is just emulating the keyboard. I think it is the Tab key and Arrow up key to switch radio buttons for Nero. Try it manually with the keyboard to check.

Send('{TAB}{UP}')

Edited by MHz
Link to comment
Share on other sites

Thanks MHz

that works great

Autoit is great if you no what your doinig

Ill continue on and see how i get on thanks again

great works a treat now just have to wor out how to put in the serial code

heres my sript

; ----------------------------------------------------------------------------

;

; AutoIt Version: 3.1.0

; Author: A.N.Other <myemail@nowhere.com>

;

; Script Function:

; Template AutoIt script.

;

; ----------------------------------------------------------------------------

; Script Start - Add your code below here

run ("Nero.exe")

winwaitActive("Nero Burning ROM Installation Wizard")

Send("{enter}")

winwaitActive("Nero Burning ROM Installation Wizard")

Send('{TAB}{UP}')

Send("{enter}")

winwaitActive("Nero Burning ROM Installation Wizard")

Send("{enter}")

winwaitActive("Nero Burning ROM Installation Wizard")

Send("{enter}")

Exit

Edited by bobthenob
Link to comment
Share on other sites

hi just thought id post that ive got this working

probaly not the best script but it works so thatll do for now

thanks to MHz

heres my script ive removed my serial

it installs nero the runs it puts in serial then closes

run ("Nero.exe")

winwaitActive("Nero Burning ROM Installation Wizard")

Send("{enter}")

winwaitActive("Nero Burning ROM Installation Wizard")

Send('{TAB}{UP}')

Send("{enter}")

winwaitActive("Nero Burning ROM Installation Wizard")

Send("{enter}")

winwaitActive ("Nero Burning ROM Installation Wizard")

Send("{enter}")

winwaitActive("Nero Burning ROM Installation Wizard","The Wizard has completed")

Send("{enter}")

Run("C:\Program Files\Ahead\Nero\nero.exe")

winwaitActive("Nero Burning ROM","Please personalize your copy of Nero")

Send('{tab}')

Send('{tab}')

send("serial-number")

send('{Enter}')

WinWaitActive ("New Compilation")

Send('{tab}')

Send('{tab}')

Send('{tab}')

Send('{tab}')

send('{Enter}')

WinWaitActive ("Nero Burning ROM")

Send('{ALT}')

Send('{Down}')

Send('{Up}')

send('{Enter}')

Exit

Link to comment
Share on other sites

Very good bobthenob.

Just some tips.

This line is hard coded to only C: drive.

Run("C:\Program Files\Ahead\Nero\nero.exe")

Use macros to improve chances if Program Files is else where.

Run(@ProgramFilesDir & "\Ahead\Nero\nero.exe")

A little optimize trick for you. Your code below can be made easier.

WinWaitActive ("New Compilation")

Send('{tab}')

Send('{tab}')

Send('{tab}')

Send('{tab}')

send('{Enter}')

It can be transformed into this:

WinWaitActive ("New Compilation")
Send('{tab 4}{Enter}')

They both do the same but the change is only 2 lines without the extra repetition. The Send() page in the helpfile has a number of tricks to learn. :)

Link to comment
Share on other sites

Cheers Mhz

Ill take your advise and alter my script thanks again

I did look at the Send() page

I wish there were more egsamples like the winzip install tutorial

I like to try things rather than keep asking for help you learn by your mistakes that way.

I taught my self Studiomax from just following tutorials and reading up

mhz.jpg

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...