Toppy Posted April 4, 2005 Share Posted April 4, 2005 Hi, I have a weird problem, in my script I want it to move the mouse inside a window to a pos 70,295 but Autoit Moves the mouse to something like 290,650 It's used to open SpyBot Search&Destroy and push the update button. Here's the erratic part of the script, perhaps someone can test it to see what I mean. AutoItSetOption("MouseCoordMode", 0) If FileExists("C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe") Then If ProcessExists("SpybotSD.exe") Then WinActivate ( "Spybot" ) Else Run ( "C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe" , "C:\Program Files\Spybot - Search & Destroy\" ) Sleep (5000) WinActivate ( "Spybot" ) EndIf MouseMove (70 , 295 ) Endif Exit Please try this and see the problem :"> Link to comment Share on other sites More sharing options...
SlimShady Posted April 4, 2005 Share Posted April 4, 2005 Read the help file.Especially this part:MouseCoordMode 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...
Toppy Posted April 4, 2005 Author Share Posted April 4, 2005 Read the help file.Especially this part:<{POST_SNAPBACK}>I did, that's why I put AutoItSetOption("MouseCoordMode", 0)That fact is, it goes to something completely different :"> Try it yourself, you'll see Link to comment Share on other sites More sharing options...
Kerberuz Posted April 4, 2005 Share Posted April 4, 2005 (edited) I did, that's why I put AutoItSetOption("MouseCoordMode", 0)That fact is, it goes to something completely different :"> Try it yourself, you'll see <{POST_SNAPBACK}>I grabbed the code and modified it slightly since I don't have Spybot, but it was running correctly. AutoItSetOption("MouseCoordMode", 0) Opt("WinTitleMatchMode", 2) If ProcessExists("notepad.exe") Then WinActivate ( "Notepad" ) Else Run ( "Notepad") Sleep (5000) WinActivate ( "Notepad" ) EndIf MouseMove (70 , 295 ) Exit Edited April 4, 2005 by Kerberuz Kerby Link to comment Share on other sites More sharing options...
Toppy Posted April 4, 2005 Author Share Posted April 4, 2005 Well, I tried option 0 (window) and 2 (Client) and it still goes to somewhere completely different Nobody that have Spybot that could try it ? Link to comment Share on other sites More sharing options...
Toppy Posted April 4, 2005 Author Share Posted April 4, 2005 I even tried to maximize the Spybot window, with ... WinSetState ( "SpyBot - Search & Destroy", "", @SW_MAXIMIZE) ... But that doesn't work either Link to comment Share on other sites More sharing options...
GaryFrost Posted April 4, 2005 Share Posted April 4, 2005 (edited) installed it and ran the following, it put the mouse over the update button AutoItSetOption("MouseCoordMode", 0) If FileExists("C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe") Then If ProcessExists("SpybotSD.exe") Then WinActivate ( "Spybot - Search & Destroy","&Check for problems" ) Else Run ( "C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe" , "C:\Program Files\Spybot - Search & Destroy\" ) ProcessWait("SpybotSD.exe") ;~ Sleep (5000) Winwait( "Spybot - Search & Destroy","&Check for problems" ) WinActivate ( "Spybot - Search & Destroy","&Check for problems" ) EndIf MouseMove (70 , 295 ) Endif Exit Edited April 4, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
bshoenhair Posted April 4, 2005 Share Posted April 4, 2005 Why not use SpyBot Command line parameters ? Much simpler Here is a list of command line parameters that the Spybot-S&D main executable (spybotsd.exe) supports: /taskbarhide Runs Spybot-S&D completely hidden (no window, no taskbar icon), so make absolutely sure you use it only in combination with /autoclose (otherwise it would remain in memory sitting idle). Useful only in combination with /autocheck, /autoupdate or /autoimmunize, as it cannot be controlled when completely invisible. /minimized Starts the window minimized. /uninstall Uninstalls Spybot-S&D. This command line parameter is very outdated - unins000.exe should be used instead! /blinduser Starts with support for blind users (special menus). /autoupdate Does an update after starting the program. /autocheck Starts scanning immediately. /autofix Fixes problems after scan. /autoclose Closes program after it has scanned or updated. /autoimmunize Runs the immunization at program start. /onlyspyware Fixes only spyware (red) entries with /autofix, leaving all usage tracks as they are. /easymode Starts with easier interface for newbies. Link to comment Share on other sites More sharing options...
Toppy Posted April 7, 2005 Author Share Posted April 7, 2005 Can someone tell me why even the following line doesn't work ? WinSetState ( "SpyBot - Search & Destroy", "", @SW_MAXIMIZE) 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