BuddyBoy Posted July 14, 2006 Share Posted July 14, 2006 Alright i took your adive smoke n and psalty and am doing something that i 80% know about. i have no clue if this is right but it all seems right maybe its wrong because i got it from one of my different scripts and cahgned it to ppixelgetcolor lol but any help, i also need to finsih off the function at the bottom of my script which i do not know how to do (thats the other 20% i dont not know lol) Little explanation on what i want this to do, I want the user of the program to hit ^p (ctrl+p) and once that is hit it sets the pixel color. So say i have it to (If the pixel chagnes send f1) So if they set the color on red and say you lose health and it goes down to gray it will send f1. Atm im jsut trying to get the func to work then i can add in the f1 but what i need help on is the bttom part to state the func and how to actually tell the computer to set that pixel as the pixel wanted. HotKeySet("^p", "_PixelGetColor") While 1 _PixelGetColor () While 1 Sleep(10000) WEnd WEnd Thats all ive gotten so far lol just need the bottom part and how to make it stay set. Thank you all that help. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 14, 2006 Share Posted July 14, 2006 Alright i took your adive smoke n and psalty and am doing something that i 80% know about. i have no clue if this is right but it all seems right maybe its wrong because i got it from one of my different scripts and cahgned it to ppixelgetcolor lol but any help, i also need to finsih off the function at the bottom of my script which i do not know how to do (thats the other 20% i dont not know lol) Little explanation on what i want this to do, I want the user of the program to hit ^p (ctrl+p) and once that is hit it sets the pixel color. So say i have it to (If the pixel chagnes send f1) So if they set the color on red and say you lose health and it goes down to gray it will send f1. Atm im jsut trying to get the func to work then i can add in the f1 but what i need help on is the bttom part to state the func and how to actually tell the computer to set that pixel as the pixel wanted. HotKeySet("^p", "_PixelGetColor") While 1 _PixelGetColor () While 1 Sleep(10000) WEnd WEnd Thats all ive gotten so far lol just need the bottom part and how to make it stay set. Thank you all that help. OK, you are associating your own function _PixelGetColor() with control-p hotkey, but you have not defined that function, as you said. The body of your program is two nested While/Wend loops. When the first While loop runs for the first time, it will enter the second While loop, and never come out again. That is not necesarily a bad thing if you just want a delay loop to wait for the hotkey, but only the second loop is needed, the first one is not. I think you want to use control-p to start your auto health loop, and to be able to stop it by hitting control-p again, is that right? So first a basic start/stop toggle (just beeps while running): Global $Running = 0 HotKeySet("^p", "_ToggleRun") While 1 If $Running Then ; More usefull code goes here Beep(1000, 500) EndIf Sleep(1000) Wend ; Toggle the running flag Func _ToggleRun() $Running = NOT $Running EndFuncoÝ÷ Ù8^íý²Ø^m«"rËk¹ËnéèÃuÛhÓ§q쨹§-öz+pØ¢{k¢Zr¢ìÛh±ç°«mç.®·§¶±zW(â²Ê2¢íýY'£×!jx±.ç¶Z½ëÚ®&ë-«]yø§zØ^Çü¢ÝvzÇÛh²èÊ«©jwlj÷ç(Ø¢ævƯx-ç.®·§µÊ%¢»hÊ«d{'îËb¢táz|¨ºwvØ^nr¡ü¨º¼!W¥¢m¡È^rGèÈZ§Ê%¢º¶¦,^©Ý+E×^+©àzÆ®¶sdvÆö&Âb33cµ'VææærÒÂb33c·ÒcÂb33c·ÒCÂb33cµVÄ6öÆ÷"Ò¤÷D¶W6WBgV÷CµçgV÷C²ÂgV÷CµõFövvÆU'VâgV÷C² ¥vÆR¢bb33cµ'VææærFVâ¢bb33cµVÄ6öÆ÷"fÇC²fwC²VÄvWD6öÆ÷"b33c·Âb33c·FVà¢6VæBgV÷C·´cÒgV÷C²²cÒVÇF÷Föââ÷W"vÖSð¢6ÆVW²vBÆöærVæ÷Vvf÷"cFòF¶RVffV7@¢VæD`¢VæD`¢6ÆVW¥vVæ@ £²FövvÆRFR'VææærfÆp¤gVæ2õFövvÆU'Vâ¢b33cµ'VææærÒäõBb33cµ'Væææp¢bb33cµ'VææærFVâb33cµVÄ6öÆ÷"ÒVÄvWD6öÆ÷"b33c·Âb33c·¤VæDgVæ0 I'm not on a Windows box, so none of that is tested. But it gives you the idea. 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...
BuddyBoy Posted July 14, 2006 Author Share Posted July 14, 2006 OK, you are associating your own function _PixelGetColor() with control-p hotkey, but you have not defined that function, as you said. The body of your program is two nested While/Wend loops. When the first While loop runs for the first time, it will enter the second While loop, and never come out again. That is not necesarily a bad thing if you just want a delay loop to wait for the hotkey, but only the second loop is needed, the first one is not. I think you want to use control-p to start your auto health loop, and to be able to stop it by hitting control-p again, is that right? So first a basic start/stop toggle (just beeps while running): Global $Running = 0 HotKeySet("^p", "_ToggleRun") While 1 If $Running Then ; More usefull code goes here Beep(1000, 500) EndIf Sleep(1000) Wend ; Toggle the running flag Func _ToggleRun() $Running = NOT $Running EndFuncoÝ÷ Ù8^íý²Ø^m«"rËk¹ËnéèÃuÛhÓ§q쨹§-öz+pØ¢{k¢Zr¢ìÛh±ç°«mç.®·§¶±zW(â²Ê2¢íýY'£×!jx±.ç¶Z½ëÚ®&ë-«]yø§zØ^Çü¢ÝvzÇÛh²èÊ«©jwlj÷ç(Ø¢ævƯx-ç.®·§µÊ%¢»hÊ«d{'îËb¢táz|¨ºwvØ^nr¡ü¨º¼!W¥¢m¡È^rGèÈZ§Ê%¢º¶¦,^©Ý+E×^+©àzÆ®¶sdvÆö&Âb33cµ'VææærÒÂb33c·ÒcÂb33c·ÒCÂb33cµVÄ6öÆ÷"Ò¤÷D¶W6WBgV÷CµçgV÷C²ÂgV÷CµõFövvÆU'VâgV÷C² ¥vÆR¢bb33cµ'VææærFVâ¢bb33cµVÄ6öÆ÷"fÇC²fwC²VÄvWD6öÆ÷"b33c·Âb33c·FVà¢6VæBgV÷C·´cÒgV÷C²²cÒVÇF÷Föââ÷W"vÖSð¢6ÆVW²vBÆöærVæ÷Vvf÷"cFòF¶RVffV7@¢VæD`¢VæD`¢6ÆVW¥vVæ@ £²FövvÆRFR'VææærfÆp¤gVæ2õFövvÆU'Vâ¢b33cµ'VææærÒäõBb33cµ'Væææp¢bb33cµ'VææærFVâb33cµVÄ6öÆ÷"ÒVÄvWD6öÆ÷"b33c·Âb33c·¤VæDgVæ0 I'm not on a Windows box, so none of that is tested. But it gives you the idea. Looks great bro but one problem, i dont know the exact coords of the health bar because im creating it for if other useres use this they can choose what part of the health bar they wish it to heal at, so if there health is 5k and they do half way that half the health bar but one might have 11k and dont need to worry about half way becuz 5.5 is way too much to be using a pot, so thats wher ei get into trouble at, i need it to read where it gets that color at and after the red color is gone it uses the pot, they choose there own spot i cant choose there coords for them, any possible way of doing this bro? Link to comment Share on other sites More sharing options...
BuddyBoy Posted July 14, 2006 Author Share Posted July 14, 2006 i still need you to answer my last post from this one but btw, do i have to have that coord thing or not? or cant the computer read where to read or doe sit ahve to read a specific coord? becuz as i sed in my last pot i need it to read where the user hit ctrl+p at on the health bar on my game and to set that and if that color changes it will use a F key for a pot. Link to comment Share on other sites More sharing options...
Simucal Posted July 14, 2006 Share Posted July 14, 2006 i still need you to answer my last post from this one but btw, do i have to have that coord thing or not? or cant the computer read where to read or doe sit ahve to read a specific coord? becuz as i sed in my last pot i need it to read where the user hit ctrl+p at on the health bar on my game and to set that and if that color changes it will use a F key for a pot. What in the hell are you talking about? What is it you need? You are saying you dont want to set the coordinates, but you want "the computer read where to read"?? Does that mean you want it to read the current coordinate under your mouse? Or have a list of pre-defined points that it will check or what?Please make your next post a little more coherent and intelligible. 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...
BuddyBoy Posted July 14, 2006 Author Share Posted July 14, 2006 What in the hell are you talking about? What is it you need? You are saying you dont want to set the coordinates, but you want "the computer read where to read"?? Does that mean you want it to read the current coordinate under your mouse? Or have a list of pre-defined points that it will check or what?Please make your next post a little more coherent and intelligible.see im not sure what i want, ill explain what i want but i dont know what i need to do it.I want the user to press ctrl+p on a health bar on my game. Once crtl+p is pressed on the red on the health bar the computer sets that as the point as the point to read. So once the red is gone from taking damage from someone or something it turns a grayish color. Al i need tho is to ahve the computer check the one spot they pressed ctrl+p at and if the red goes away at that spot it will send a F key.Hope you understand and can help me now. Im not sure if you use coords with it or pixel or w/e just some help be great. Link to comment Share on other sites More sharing options...
(^_^) Posted July 14, 2006 Share Posted July 14, 2006 (edited) heres what you need ... when you hit ^p it gets a coordinate and when the color red isnot there it presses f1 i got you HotKeySet("{END}", "TogglePause") Func TogglePause() $pos=MouseGetPos() EndFunc while 1 PixelSearch( ($pos[0]), ($pos[1]), ($pos[0]), ($pos[1]), color red, 5 );<--- change color red to the hex red code If @error Then send({F1}) EndIf sleep(200) WEnd that should about do it for what ever you need when you hit control p you get where you want the seach for the color red to be and if error means if it cant find red it sends F1 have fun Edited July 14, 2006 by (^_^) [center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center] Link to comment Share on other sites More sharing options...
(^_^) Posted July 14, 2006 Share Posted July 14, 2006 lol oops instead of cnrl p i set the toggle button to the end key change that [center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center] Link to comment Share on other sites More sharing options...
UnknownWarrior Posted July 14, 2006 Share Posted July 14, 2006 )" data-cid="207468" data-date="Jul 14 2006, 12:45 PM">heres what you need ... when you hit ^p it gets a coordinate and when the color red isnot there it presses f1 i got you HotKeySet("{END}", "TogglePause") Func TogglePause() $pos=MouseGetPos() EndFunc while 1 PixelSearch( ($pos[0]), ($pos[1]), ($pos[0]), ($pos[1]), color red, 5 );<--- change color red to the hex red code If @error Then send({F1}) EndIf sleep(200) WEnd that should about do it for what ever you need when you hit control p you get where you want the seach for the color red to be and if error means if it cant find red it sends F1 have fun Wow great, ty bro and thx for the other people who tried to help Link to comment Share on other sites More sharing options...
Matrix112 Posted July 14, 2006 Share Posted July 14, 2006 If you want that the user has to choose the position on health bar, look in my signature and try my _pixelgetcolourmouse UDF Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 15, 2006 Share Posted July 15, 2006 (edited) see im not sure what i want, ill explain what i want but i dont know what i need to do it. I want the user to press ctrl+p on a health bar on my game. Once crtl+p is pressed on the red on the health bar the computer sets that as the point as the point to read. So once the red is gone from taking damage from someone or something it turns a grayish color. Al i need tho is to ahve the computer check the one spot they pressed ctrl+p at and if the red goes away at that spot it will send a F key. Hope you understand and can help me now. Im not sure if you use coords with it or pixel or w/e just some help be great. A minor change to what I gave you before will do that, I believe. When you hit ctrl+p, the function just needs to save the mouse position first, by which the user indicates where they want it watched, before saving the current pixel color: Global $Running = 0, $x, $y, $PixelColor HotKeySet("^p", "_ToggleRun") While 1 If $Running Then If $PixelColor <> PixelGetColor($x, $y) Then Send("{F1}"); F1 = health potion in your game? Sleep(1000); Wait long enough for F1 to take effect EndIf EndIf Sleep(50) Wend ; Toggle the running flag, and save pixel pos and color info Func _ToggleRun() $Running = NOT $Running If $Running Then $x = MouseGetPos(0) $y = MouseGetPos(1) $PixelColor = PixelGetColor($x, $y) EndIf EndFunc The user just needs to put the mouse pointer on the health bar where they want it monitored, and hit ctrl+p. The script will save that x/y coordinate, and save the current pixel color there. When the while loop sees the pixel color change, it hits F1 for the user. Hitting ctrl+p a second time will toggle it off, but you might want to add a seperate hotkey for that, since there is no visible indication which state it is currently in. The virtue of this method over that posted by UnknownWarrior is that you don't need to know the pixel location or color ahead of time. Edited July 15, 2006 by PsaltyDS 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...
BuddyBoy Posted July 15, 2006 Author Share Posted July 15, 2006 A minor change to what I gave you before will do that, I believe. When you hit ctrl+p, the function just needs to save the mouse position first, by which the user indicates where they want it watched, before saving the current pixel color: Global $Running = 0, $x, $y, $PixelColor HotKeySet("^p", "_ToggleRun") While 1 If $Running Then If $PixelColor <> PixelGetColor($x, $y) Then Send("{F1}"); F1 = health potion in your game? Sleep(1000); Wait long enough for F1 to take effect EndIf EndIf Sleep(50) Wend ; Toggle the running flag, and save pixel pos and color info Func _ToggleRun() $Running = NOT $Running If $Running Then $x = MouseGetPos(0) $y = MouseGetPos(1) $PixelColor = PixelGetColor($x, $y) EndIf EndFunc The user just needs to put the mouse pointer on the health bar where they want it monitored, and hit ctrl+p. The script will save that x/y coordinate, and save the current pixel color there. When the while loop sees the pixel color change, it hits F1 for the user. Hitting ctrl+p a second time will toggle it off, but you might want to add a seperate hotkey for that, since there is no visible indication which state it is currently in. The virtue of this method over that posted by UnknownWarrior is that you don't need to know the pixel location or color ahead of time. Lol unknownwarrior is my best friend in rL i was at his house when i replied, forgot to tell everyone, jsut for that one time, but we BOTH do need to know how to If 2+ checkboxes are checked and the program runs with check boxes (i will have to add the check boxes myself in the script) but how do you get it to do 2+ check boxes but still work as a single check box. So say i want check box 1,2, and 3 all checked and to work. how do i code that? Also i want it for if JUST checkbox 1 is checked just do checkbox one and not the 2 and 3... Any ideas anyone? thx Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 15, 2006 Moderators Share Posted July 15, 2006 Lol unknownwarrior is my best friend in rL i was at his house when i replied, forgot to tell everyone, jsut for that one time, but we BOTH do need to know how to If 2+ checkboxes are checked and the program runs with check boxes (i will have to add the check boxes myself in the script) but how do you get it to do 2+ check boxes but still work as a single check box. So say i want check box 1,2, and 3 all checked and to work. how do i code that? Also i want it for if JUST checkbox 1 is checked just do checkbox one and not the 2 and 3... Any ideas anyone? thxMan, you really need to literate what it is you want... Some people go from Point A to Point B to explain what they need, even Z to A... you create your own points of origin from the Vulcan language or something!Post what you have, explain in literate detail what you want... and see if people can help. It's getting to the point that I can't make it past the first sentence in your request, because that sentence never ends with gibberish.... Starting to make me not even read your posts. 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...
BuddyBoy Posted July 15, 2006 Author Share Posted July 15, 2006 Man, you really need to literate what it is you want... Some people go from Point A to Point B to explain what they need, even Z to A... you create your own points of origin from the Vulcan language or something!Post what you have, explain in literate detail what you want... and see if people can help. It's getting to the point that I can't make it past the first sentence in your request, because that sentence never ends with gibberish.... Starting to make me not even read your posts.ok i will talk english now. I NEED to know how to have 2+ checkboxes checked then run the program and those 2+ checkboxes ALL work not just 1 of them. For some reasonif i check 3 checkboxes only the first 1 i checked works. Now how can I create it to do that but also work if JUST 1 checkbox is checked that ONE only works. My friend got sfcript from someone in his post and you do the if bitand blah blah checkbox_1 is check And if bitand checkbox_2 Then (thats the code) well i want it for 2+ checkboxes but if those are also put in 1 code then if i check just 1 checkbox it wont work it will also run the other checkbox because they are both in coding.Ok i typed every word correct but a few i's now i hope you can understand me now smoke n and are able to help me. If you still cant understand me ill try to make a demostration some how dont know how though but i guess if u dont understand thats what ill have to do. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 15, 2006 Share Posted July 15, 2006 (edited) ok i will talk english now. I NEED to know how to have 2+ checkboxes checked then run the program and those 2+ checkboxes ALL work not just 1 of them. For some reasonif i check 3 checkboxes only the first 1 i checked works. Now how can I create it to do that but also work if JUST 1 checkbox is checked that ONE only works. My friend got sfcript from someone in his post and you do the if bitand blah blah checkbox_1 is check And if bitand checkbox_2 Then (thats the code) well i want it for 2+ checkboxes but if those are also put in 1 code then if i check just 1 checkbox it wont work it will also run the other checkbox because they are both in coding.Ok i typed every word correct but a few i's now i hope you can understand me now smoke n and are able to help me. If you still cant understand me ill try to make a demostration some how dont know how though but i guess if u dont understand thats what ill have to do. Is this still about the automated health potion in your game? If this is a completly new problem, please start a new topic with it. The best part of what you said above was: "If you still cant understand me ill try to make a demostration some how dont know how though but i guess if u dont understand thats what ill have to do."That would be excellent, and you'll get more help, because you won't be frustrating those who are trying to help. Multiple checkboxes in your own GUI are easy and there are no limits on what you can do in responce to any combination of checked/unchecked conditions. Post an example in actual code (even if it doesn't work) and you'll get plenty of help. But if this is a new problem unrelated to "PixelGetColor?", please start a new topic when you post it. Edited July 15, 2006 by PsaltyDS 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...
Moderators SmOke_N Posted July 15, 2006 Moderators Share Posted July 15, 2006 (edited) Here is an example of how I see your question, check box1 and box2:#include <guiconstants.au3> $Main = GUICreate('Blah Blah Frustrated...', 200, 100) $CkBox1 = GUICtrlCreateCheckbox('One', 10, 10) $CkBox2 = GUICtrlCreateCheckbox('Two', 10, 30) $CkBox3 = GUICtrlCreateCheckbox('Three', 10, 50) GUISetState() While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE Exit Case BitAND(GUICtrlRead($CkBox1), $GUI_CHECKED) = $GUI_CHECKED _ And BitAND(GUICtrlRead($CkBox2), $GUI_CHECKED) = $GUI_CHECKED While BitAND(GUICtrlRead($CkBox1), $GUI_CHECKED) = $GUI_CHECKED _ And BitAND(GUICtrlRead($CkBox2), $GUI_CHECKED) = $GUI_CHECKED ToolTip('You have Checkbox1 and Checkbox2 checked', 0, 0) Sleep(10) WEnd ToolTip('') EndSelect WEnd Edit: Blah at quotes with AutoIt Code Tags Edit2: Trying this again with single quotes because of regular code tags Edit3: Blah... Neither like the & _ they break the quotes, so here's the long version. Edit4: Blah... well, there shouldn't be spaces in the array variable strings... so if there are just remove them... I give up on the code tags. Edit5: - Well it broke the whole damn thing... so at least the above is a working example now... but none of the fun stuff. Edited July 15, 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...
BuddyBoy Posted July 15, 2006 Author Share Posted July 15, 2006 Here is an example of how I see your question, check box1 and box2:#include <guiconstants.au3> $Main = GUICreate('Blah Blah Frustrated...', 200, 100) $CkBox1 = GUICtrlCreateCheckbox('One', 10, 10) $CkBox2 = GUICtrlCreateCheckbox('Two', 10, 30) $CkBox3 = GUICtrlCreateCheckbox('Three', 10, 50) GUISetState() While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE Exit Case BitAND(GUICtrlRead($CkBox1), $GUI_CHECKED) = $GUI_CHECKED _ And BitAND(GUICtrlRead($CkBox2), $GUI_CHECKED) = $GUI_CHECKED While BitAND(GUICtrlRead($CkBox1), $GUI_CHECKED) = $GUI_CHECKED _ And BitAND(GUICtrlRead($CkBox2), $GUI_CHECKED) = $GUI_CHECKED ToolTip('You have Checkbox1 and Checkbox2 checked', 0, 0) Sleep(10) WEnd ToolTip('') EndSelect WEnd Edit: Blah at quotes with AutoIt Code Tags Edit2: Trying this again with single quotes because of regular code tags Edit3: Blah... Neither like the & _ they break the quotes, so here's the long version. Edit4: Blah... well, there shouldn't be spaces in the array variable strings... so if there are just remove them... I give up on the code tags. Edit5: - Well it broke the whole damn thing... so at least the above is a working example now... but none of the fun stuff. Alright so if check box 1 was MouseClick("left") and checkbox 2 was Send({Shift}) and checkbox 3 was Send({Ctrl}) then if i checked all 3 check boxes it would do shift+ctrl+ left but if i just checked check box 1 it would Just do left click right? Also how do i add checkbox 3 in that coding in my quote? 1.then if i checked all 3 check boxes it would do shift+ctrl+ left but if i just checked check box 1 it would Just do left click right? 2.Also how do i add checkbox 3 in that coding in my quote? 3.Also where do i add my coding at for checkbox 1 and checkbox 2? For if jsut one is checked it will JUST do that 1 checkbox.? I hope this is clear, its hard to explain this i hope you understand it though and can help me some more, thank you Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 15, 2006 Moderators Share Posted July 15, 2006 No you have to program it to do that... look at the example in the help file on how to determine if a check box is checked and work from there... I'm done here. 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...
BuddyBoy Posted July 15, 2006 Author Share Posted July 15, 2006 No you have to program it to do that... look at the example in the help file on how to determine if a check box is checked and work from there... I'm done here.K thx for the help man ill look up on it after im done playing americas army Link to comment Share on other sites More sharing options...
BuddyBoy Posted July 15, 2006 Author Share Posted July 15, 2006 expandcollapse popup#include <GuiConstants.au3> Opt("GUIOnEventMode",1) HotKeySet("{F5}", "_Start") HotKeySet("{ESC}","Terminate") HotKeySet("^p", "_ToggleRun") Global $Running = 0, $x, $y, $PixelColor $ClickIt = 0 GUICreate("Auto-Potter", 200, 150) GUISetOnEvent($GUI_EVENT_CLOSE,"Terminate") $Checkbox_1 = GUICtrlCreateCheckbox("Auto-Pot HP", 20, 40, 150, 20) GUISetState() While 1 Sleep( 10 ) WEnd Exit Func _Start () $ClickIt = 1 While $ClickIt = 1 If BitAND(GUICtrlRead($Checkbox_1), $GUI_CHECKED) = $GUI_CHECKED Then While 1 If $Running Then If $PixelColor <> PixelGetColor($x, $y) Then Send("{F1}"); F1 = health potion in your game? Sleep(1000); Wait long enough for F1 to take effect EndIf EndIf Sleep(50) Wend ; Toggle the running flag, and save pixel pos and color info Func _ToggleRun() $Running = NOT $Running If $Running Then $x = MouseGetPos(0) $y = MouseGetPos(1) $PixelColor = PixelGetColor($x, $y) EndIf EndFunc WEnd EndFunc ;==>_Start Func Terminate () Exit EndFunc ;==>Terminate Psalty think you can help me here? or anyone, i put your script in with my checkbox think and now it wont wont. If you would please think you can test run that and fix it up? It says Func _togglerun has no matching end func, well i have only 2 funcs on that script so i ahve 2 end funcs, 1 for the func start and other for togglerun. Any ideas anyone? 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