Jump to content
Sign in to follow this  

Vista Vs XP positioning

Recommended Posts

Dim $primary_click

Dim $secondary_click

AutoItSetOption ( "MouseCoordMode" , 0 )

;sets coordinate inputs to be based on the window, not abs pos.

;Determine if user has swapped right and left mouse buttons

$k = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")

; It's okay to NOT check the success of the RegRead operation

If $k = 1 Then

$primary_click = "right"

$secondary_click = "left"

Else ;normal (also case if could not read registry key)

$primary_click = "left"

$secondary_click = "right"



Run ( $path )

;BlockInput ( 1 )

WinActivate("Symantec AntiVirus")

WinWaitActive("Symantec AntiVirus")

MouseClick($primary_click, 150, 150 , 1) ;clicks "install antivirius"

MouseClick($primary_click, 150, 250 , 1) ;clicks "install symantec antivirus client"

WinWaitActive("Symantec AntiVirus - InstallShield Wizard")

MouseClick($primary_click, 350, 350 , 1) ;clicks "next"

;BlockInput ( 0 )


This works in Vista for certain, but in XP when i go to run it, the mouse does not work the same way(ie properly), thoughts, suggestions, would be helpful.

Share this post

Link to post
Share on other sites

Wonderful, except i'm working on a proof on concept, not looking for opinionated bs

First: It's not my opinion. Its true. The programmers who created the program installer didn't go to all that trouble providing a reliable means of silent installation for you to try and reinvent the wheel. Its obvious there are inconsistencies in the Widnows UI that prompted this topic.

Second: The proof is in the links I provided...

Symantec Antivirus 10.x

msiexec /i \\servername\volname\foldername\sav10\clt-inst\win32\symantecantivirus.msi /qb RUNSCAN=0 RUNLIVEUPDATE=1 REBOOT=REALLYSUPPRESS

Share this post

Link to post
Share on other sites

again, all I am asking is why the cords do not work the same, of course i can use the proper installer for this. But this is not an option for what I plan to actually work on. I need to know why cords do not match up, and act completely different, when they are reported to be the same.

Edited by Productionx

Share this post

Link to post
Share on other sites

Maybe try a different mouse coordinate mode.

Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:

0 = relative coords to the active window

1 = absolute screen coordinates (default)

2 = relative coords to the client area of the active window

Share this post

Link to post
Share on other sites

You also might want to do your testing with MouseMove() and a slower speed so you can see exactly how far off ths mouse is from the target.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...