Jump to content

Autoit - How do I press Next


Bodman

Recommended Posts

Hi, I am trying to automate my install for Norton internet security 2006 using Autoit. I have managed to get most of it to work fine, but I have 1 problem when I get to the attached screen I cannot click on the Next key, the windows seems to default to the "What is activation?" part of the screen, I have tryed, controlclick, sending !n (Alt N) sending enter (which opens up the What is activation? help section), sending TAB but none of these work...

If i manually press TAB or Alt N on the keyboard these work fine, its only when i send the commands from a script.

nis2006.gif

Any help greatly appreciated.

//Bod

Link to comment
Share on other sites


Does not show in AutoIt Info Window of the button to click for ControlClick, unless you did not have the mouse hovering over the button before you paused AutoIt Info Tool.

To use Send(), then it would be as below:

Send("!n")

Notice that the !n used is not !N.

Link to comment
Share on other sites

The mouse was actually over the NEXT button when i took the screen shot, there is no button number (Button2 for eg), I have tried Send("!n") but it appears that the cursor is actually captured on the "What is activation?" link

$title = "Norton Internet Security"

winwaitactive ( $Title )

send ("!n")

; Activation

winwaitactive ( $Title , "What is Activation?" )

Controlsettext ( $Title , "" , "Edit1" , "xxxxx" )

Controlsettext ( $Title , "" , "Edit2" , "xxxxx" )

Controlsettext ( $Title , "" , "Edit3" , "xxxxx" )

Controlsettext ( $Title , "" , "Edit4" , "xxxxx" )

Controlsettext ( $Title , "" , "Edit5" , "xxxxx" )

send ('{tab 9}')

send ("!n")

;Communicate With Server

winwaitactive ( $Title , "Activation requires communication" )

send ("!n")

I had a similar problem with the screen before but i found that pressing the tab key 9 times to get to the correct button then sending !n worked.

//Bod

Link to comment
Share on other sites

You could try it with MouseClick.

$SN_1 = "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"		;		  Serial Number

Opt ("MouseCoordMode", 0); 1=absolute, 0=relative

$Title = "Norton Internet Security"
WinWaitActive ( $Title )
MouseClick ( "left" , 472 , 473 , 1 , 1 )

; Activation
WinWaitActive ( $Title , "What is Activation?" )
$n = StringSplit( $SN_1 , '-')
ControlSetText ( $Title , "" , "Edit1" , $n[1] )
ControlSetText ( $Title , "" , "Edit2" , $n[2] )
ControlSetText ( $Title , "" , "Edit3" , $n[3] )
ControlSetText ( $Title , "" , "Edit4" , $n[4] )
ControlSetText ( $Title , "" , "Edit5" , $n[5] )
MouseClick ( "left" , 472 , 473 , 1 , 1 )

;Communicate With Server
WinWaitActive ( $Title , "Activation requires communication" )
MouseClick ( "left" , 472 , 473 , 1 , 1 )

The above X & Y axis's are likely wrong since Y is further down than the window is high.

You'll have to change AutoIt's Window info app to "Window" rather than "Screen" under options tho, to get the correct information.

Edited by Nologic
Link to comment
Share on other sites

AutoIt Macro Generator may not be perfect, nothing is, but programmically, it does fine for it's purpose. It is an admired helpers tool from my prospective. It is a part of Scite4AutoIt3 as I urged it to be so. Anyone have a problem with that ? , then speak some good facts to back it up.

Ofcourse, there is times where human ability is needed fully to handle an installer, then a talent scripter does what is needed to succeed.

Get Scite4AutoIt3 here to experience the ultra free deal.

I know the deal as I am an associated with development of Scite4AutoIt3. :P

Edited by MHz
Link to comment
Share on other sites

Personally I'm not that fond of generator's...I'm sure they have improved since the last time I tried my hand at them...or atleast I hope so...code was rather bad.

If its a matter of doing only a few scripts...then I say use them...but if you are going to be doing at lot of them...I strongly suggest learning the lang and doing it by hand.

There are plenty of quality scripts to learn from and draw ideas from...here as well as the AutoIt forum...where you can see scripting gods like Larry do some amazing things.

AutoIt is a powerful tool...but one will never realize its power by using generator's.

Hehe any ways...try mouseclick. ;)

Link to comment
Share on other sites

  • 4 weeks later...

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...