TnTProductions Posted May 9, 2008 Share Posted May 9, 2008 (edited) I decided i was going to make a basic bot for defend your castle(xgenstudios) i forgot one thing tho how to make the mouseclick() click on the pixel(man attacking you base) instead of defining cordinates just make it click on pixel search. Also i forgot how to make the script end when you hit esc. HotKeySet("{esc}","quit"); <--------need help here While 1 MouseClick("left",633,780) $x = PixelSearch(428,390,680,597,0xcccccc) If $x = True Then MouseClickDrag("left",$x 0,$x 1,788,249); <------------ need help here EndIf WEnd please post corrections! thanks Edited May 9, 2008 by TnTProductions "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted May 9, 2008 Share Posted May 9, 2008 This is a joke, right? Open the helpfile and check the examples for HotKeySet() and PixelSearch(), everything is in there .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
TnTProductions Posted May 9, 2008 Author Share Posted May 9, 2008 This is a joke, right? Open the helpfile and check the examples for HotKeySet() and PixelSearch(), everything is in therewoops i alwars forget about the help file "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
TnTProductions Posted May 9, 2008 Author Share Posted May 9, 2008 checked help file on pixelsearch() and nothing useful came up to shw me how to click on the pixel i searched for "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
d2addict4 Posted May 9, 2008 Share Posted May 9, 2008 PixelSearch returns an array with the coords in it. $Coods=PixelSearch().. $xpos=$Coods[0] $ypos=$Coors[1] MouseClick("Left", $xpos, $ypos) Simple AutoIt Point Of Sale Link to comment Share on other sites More sharing options...
TnTProductions Posted May 9, 2008 Author Share Posted May 9, 2008 PixelSearch returns an array with the coords in it. $Coods=PixelSearch().. $xpos=$Coods[0] $ypos=$Coors[1] MouseClick("Left", $xpos, $ypos) thanks "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
TnTProductions Posted May 9, 2008 Author Share Posted May 9, 2008 (edited) PixelSearch returns an array with the coords in it. $Coods=PixelSearch().. $xpos=$Coods[0] $ypos=$Coors[1] MouseClick("Left", $xpos, $ypos) got an error saying: $xpos = $cords[0] ......................^error Error: Subsript used with nonarray variable Edited May 9, 2008 by TnTProductions "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
d2addict4 Posted May 9, 2008 Share Posted May 9, 2008 (edited) i wish i could get some help like you are. anyway...use this... $C = PixelSearch() If not @error then MouseClick("left", $C[0], $C[1]) endif that will work Edited May 9, 2008 by d2addict4 Simple AutoIt Point Of Sale Link to comment Share on other sites More sharing options...
TnTProductions Posted May 9, 2008 Author Share Posted May 9, 2008 i wish i could get some help like you are. anyway...use this... $C = PixelSearch() MouseClick("left", $C[0], $C[1]) that will workthanks a bunch "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
TnTProductions Posted May 9, 2008 Author Share Posted May 9, 2008 i wish i could get some help like you are. anyway...use this... $C = PixelSearch() If not @error then MouseClick("left", $C[0], $C[1]) endif that will work i got the same error message wats wrong??! $xpos = $cords[0] ......................^error Error: Subsript used with nonarray variable "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 9, 2008 Moderators Share Posted May 9, 2008 (edited) i wish i could get some help like you are. anyway...use this... $C = PixelSearch() If not @error then MouseClick("left", $C[0], $C[1]) endif that will workYa'll want help? ... Starts with helping yourself first. http://www.autoitscript.com/forum/index.php?showtopic=21048 http://www.autoitscript.com/forum/index.ph...c=19434&hl= http://www.autoitscript.com/autoit3/docs/ http://www.autoitscript.com/autoit3/files/...t/undocumented/ Edit: And if those don't help: Try this first before posting: http://www.autoitscript.com/forum/index.php?act=Search Edited May 9, 2008 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...
TnTProductions Posted May 9, 2008 Author Share Posted May 9, 2008 im using mouseclick drag() if that changes anything? heres my script: #cs ---------------------------------------------------------------------------- Script Version: 1.2 AutoIt Version: 3.2.10.0 Author: ÆTnTProductionsÆ Script Function: Fights Defend Your Castle for you on www.Xgenstudios.com #ce ---------------------------------------------------------------------------- HotKeySet("{ESC}","Terminate") Func Terminate() Exit 0 EndFunc While 1 $cords = PixelSearch(478,390,585,469,0xcccccc) If $cords = True Then MouseClickDrag("left", $cords[0], $cords[1],842,258) EndIf WEnd "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
d2addict4 Posted May 9, 2008 Share Posted May 9, 2008 (edited) offtopic= smoken ive read the helpfile for the functions i need but its still not working. i have tried hard for at least a week and then posted here i still get no help @topicstarter try using if not @error not if $coors=true Edited May 9, 2008 by d2addict4 Simple AutoIt Point Of Sale Link to comment Share on other sites More sharing options...
TnTProductions Posted May 9, 2008 Author Share Posted May 9, 2008 offtopic= smoken ive read the helpfile for the functions i need but its still not working. i have tried hard for at least a week and then posted here i still get no help@topicstarter try using if not @error not if $coors=trueyou were right thanks!ps:sorry your getting no help "FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology" Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 10, 2008 Moderators Share Posted May 10, 2008 offtopic= smoken ive read the helpfile for the functions i need but its still not working. i have tried hard for at least a week and then posted here i still get no help@topicstarter try using if not @error not if $coors=trueThe help file was one or two of 5 or 6 links I posted. 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...
d2addict4 Posted May 10, 2008 Share Posted May 10, 2008 The help file was one or two of 5 or 6 links I posted.yes it was. and i have searched, and read the helpfile, it gives me examples but they use Sel() to select it. i dont know why my thread is getting now replies and nor is anyone helping me. Simple AutoIt Point Of Sale 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