jinred Posted April 17, 2006 Share Posted April 17, 2006 I want to move mouse cursor, here is script, but it does't work why? Func Move() For $x = 240 to $x = 380 Step 20 For $y = 100 to $x = 240 Step 20 If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then MouseMove($x,$y) EndIf Next Next EndFunc Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 17, 2006 Share Posted April 17, 2006 (edited) perhaps becuase its a function and u arent calling...., is that ur entire script? Edited April 17, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Simucal Posted April 17, 2006 Share Posted April 17, 2006 Because $coord is not defined so the statement could never be true, thus.. no mouse moving. What exactly are you trying to do? AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Somerset Posted April 17, 2006 Share Posted April 17, 2006 I want to move mouse cursor, here is script, but it does't work why? Func Move() For $x = 240 to $x = 380 Step 20 For $y = 100 to $x = 240 Step 20 If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then MouseMove($x,$y) EndIf Next Next EndFuncFunc Move() For $x = 240 to 380 Step 20 For $y = 100 to 240 Step 20 If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then MouseMove($x,$y) EndIf Next Next EndFunc ???? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 17, 2006 Moderators Share Posted April 17, 2006 (edited) Because $coord is not defined so the statement could never be true, thus.. no mouse moving. What exactly are you trying to do?Also keep in mind your using a variable to compare to an array (PixelSearch returns an array) Edit: Let me re-itterate... The way you have it set up, PixelSearch() will always be a blank return or a 1. Use:MsgBox(64, 'Pix Return', PixelSearch( 121, 467, 126, 468, 0x050305, 10))Try that and test it. Edited April 17, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
jinred Posted April 17, 2006 Author Share Posted April 17, 2006 Here expandcollapse popupHotKeySet ("{F5}", "Start" ) HotkeySet ("{F8}", "Stop" ) Func Start() While (1) Move() WEnd EndFunc Func Move() For $x = 240 to $x = 380 Step 20 For $y = 100 to $x = 240 Step 20 If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then MouseMove($x,$y) EndIf Next Next EndFunc While (1) Sleep (1) WEnd Func Stop() While 1 = 1 Sleep (1000) Wend EndFunc Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 17, 2006 Moderators Share Posted April 17, 2006 Here HotKeySet ("{F5}", "Start" ) HotkeySet ("{F8}", "Stop" ) Func Start() While (1) Move() WEnd EndFunc Func Move() For $x = 240 to $x = 380 Step 20 For $y = 100 to $x = 240 Step 20 If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then MouseMove($x,$y) EndIf Next Next EndFunc While (1) Sleep (1) WEnd Func Stop() While 1 = 1 Sleep (1000) Wend EndFuncWhat does $coord equal? And where is it defined? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 17, 2006 Share Posted April 17, 2006 hahah yeah i didnt really understand the point of it HotKeySet ("{F5}", "Move" ) HotkeySet ("{F8}", "Stop" ) Dim $coord While 1 Sleep (100) WEnd Func Move() while 1 For $x = 240 to 380 Step 20 For $y = 100 to 240 Step 20 If $coord <> PixelSearch( 121, 467, 126, 468, 0x050305, 10) Then MouseMove($x,$y,1) EndIf Next Next WEnd EndFunc Func Stop() While 1 Sleep (1000) Wend EndFunc thatll make it go in a zig zag alot ahahha i guess thats what u wanted it to do, ur problem was is u added $x and $y after the to Link to comment Share on other sites More sharing options...
Simucal Posted April 17, 2006 Share Posted April 17, 2006 That is the only problem with this script. Please post EXACTLY (in well written english preferrably), what you want your script to do. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
jinred Posted April 17, 2006 Author Share Posted April 17, 2006 Great it working , thx for help Link to comment Share on other sites More sharing options...
Simucal Posted April 17, 2006 Share Posted April 17, 2006 $coord has no values.. why even include it in the script? AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted April 17, 2006 Share Posted April 17, 2006 simucal one thing, when some1 says it works , dont ask further questions Link to comment Share on other sites More sharing options...
Simucal Posted April 17, 2006 Share Posted April 17, 2006 I guess.. but you are never going to learn using nonsense code AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) 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