Productionx Posted May 1, 2008 Share Posted May 1, 2008 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" EndIf $path="\\server\NAV\setup.exe" 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 ) Exit 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. Link to comment Share on other sites More sharing options...
weaponx Posted May 1, 2008 Share Posted May 1, 2008 FACT: Real men use silent installers to deploy software.http://www.appdeploy.com/packages/detail.asp?id=505http://www.appdeploy.com/packages/detail.asp?id=350 Link to comment Share on other sites More sharing options...
Productionx Posted May 1, 2008 Author Share Posted May 1, 2008 FACT: Real men use silent installers to deploy software.http://www.appdeploy.com/packages/detail.asp?id=505http://www.appdeploy.com/packages/detail.asp?id=350Wonderful, except i'm working on a proof on concept, not looking for opinionated bs Link to comment Share on other sites More sharing options...
weaponx Posted May 1, 2008 Share Posted May 1, 2008 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 Link to comment Share on other sites More sharing options...
Productionx Posted May 1, 2008 Author Share Posted May 1, 2008 (edited) 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 May 1, 2008 by Productionx Link to comment Share on other sites More sharing options...
weaponx Posted May 1, 2008 Share Posted May 1, 2008 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 window1 = absolute screen coordinates (default)2 = relative coords to the client area of the active window Link to comment Share on other sites More sharing options...
Productionx Posted May 1, 2008 Author Share Posted May 1, 2008 Maybe try a different mouse coordinate mode.Thanks, I'll try using mode 2. Link to comment Share on other sites More sharing options...
weaponx Posted May 1, 2008 Share Posted May 1, 2008 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now