myth641 Posted January 2, 2008 Share Posted January 2, 2008 (edited) heres the script btw im new and i dont know were to put it can somone help me and this scipt isnt mine i just got from this website expandcollapse popup#include <GUIConstants.au3> $found = "no" $searchcolor = 0xff0000 HotKeySet( "{ESC}" , "end" ) HotKeySet( "{F11}" , "f11" ) While 1 If $found = "no" Then $coord = PixelSearch(10, 10, 800, 580, $searchcolor) If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) $found = "yes" EndIf Else $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 500) , ($pos[1] + 500), $searchcolor) If IsArray($coord) = 1 Then MouseMove( $coord[0], $coord[1], 0) Else $found = "no" EndIf While $found = "yes" $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 8) , ($pos[1] + 8), $searchcolor) If IsArray($coord) = 1 Then Sleep(500) Else $found = "no" EndIf WEnd EndIf Sleep(50) WEnd Func end() Exit EndFunc Func RunBot() EndFunc Edited January 2, 2008 by myth641 Link to comment Share on other sites More sharing options...
Ozzy Posted January 2, 2008 Share Posted January 2, 2008 heres the script btw im new and i dont know were to put it can somone help me and this scipt isnt mine i just got from this website expandcollapse popup#include <GUIConstants.au3> $found = "no" $searchcolor = 0x5b2b29 HotKeySet( "{ESC}" , "end" ) While 1 If $found = "no" Then $coord = PixelSearch(10, 10, 800, 580, $searchcolor) If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) $found = "yes" EndIf Else $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 500) , ($pos[1] + 500), $searchcolor) If IsArray($coord) = 1 Then MouseMove( $coord[0], $coord[1], 0) Else $found = "no" EndIf While $found = "yes" $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 8) , ($pos[1] + 8), $searchcolor) If IsArray($coord) = 1 Then Sleep(500) Else $found = "no" EndIf WEnd EndIf Sleep(50) WEnd Func end() Exit EndFunc Just add: HotKeySet( "{F11}" , "f11" ) near: HotKeySet( "{ESC}" , "end" ) and add: Func f11() ;Write here what you need to do EndFunc near: Func end() Exit EndFunc Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 2, 2008 Share Posted January 2, 2008 Please don't post a script that isn't even yours and then ask where you can put it... Valik might be lurking. Now that I've (almost) stopped laughing: What was the question? You just want to change that script from the ESC key to F11? Or you want to write a different scirpt? Have you read the help file under HotKeySet? Did you try the example there? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
schilbiz Posted January 2, 2008 Share Posted January 2, 2008 (edited) heres the script btw im new and i dont know were to put it can somone help me and this scipt isnt mine i just got from this website expandcollapse popup#include <GUIConstants.au3> $found = "no" $searchcolor = 0xff0000 HotKeySet( "{ESC}" , "end" ) HotKeySet( "{F11}" , "f11" ) While 1 If $found = "no" Then $coord = PixelSearch(10, 10, 800, 580, $searchcolor) If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) $found = "yes" EndIf Else $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 500) , ($pos[1] + 500), $searchcolor) If IsArray($coord) = 1 Then MouseMove( $coord[0], $coord[1], 0) Else $found = "no" EndIf While $found = "yes" $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 8) , ($pos[1] + 8), $searchcolor) If IsArray($coord) = 1 Then Sleep(500) Else $found = "no" EndIf WEnd EndIf Sleep(50) WEnd Func end() Exit EndFunc Func RunBot() EndFunc expandcollapse popup#include <GUIConstants.au3> $found = "no" $searchcolor = 0xff0000 Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotkeySet("{ESC}", "End") HotKeySet("{F11}" , "RunBot") While 1 If $found = "no" Then $coord = PixelSearch(10, 10, 800, 580, $searchcolor) If IsArray($coord) = 1 Then MouseMove($coord[0], $coord[1], 0) $found = "yes" EndIf Else $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 500) , ($pos[1] + 500), $searchcolor) If IsArray($coord) = 1 Then MouseMove( $coord[0], $coord[1], 0) Else $found = "no" EndIf While $found = "yes" $pos = MouseGetPos() $coord = PixelSearch(($pos[0] - 10) , ($pos[1] - 10) , ($pos[0] + 8) , ($pos[1] + 8), $searchcolor) If IsArray($coord) = 1 Then Sleep(500) Else $found = "no" EndIf WEnd EndIf Sleep(50) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func End() Exit EndFunc Func RunBot() EndFunc But it would be a good idea to learn the code otherwise you will always only be as creative as someone else. Edit: Almost forgot to mention, hit the Pause/Break key to Pause/unPause it. Edited January 2, 2008 by schilbiz 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