Pixel Predator - PixelSearch Script
-
- Posts: 3
- Joined: 20 Nov 2021, 10:33
Re: Pixel Predator - PixelSearch Script
hi hell bent thank you SO SO much for it, it works like a charm now. thank you for taking time to teach someone about it. i hope you have a great xmas and new year!!
Re: Pixel Predator - PixelSearch Script
You too! And welcome to the forums.darkfear42 wrote: ↑21 Nov 2021, 10:41hi hell bent thank you SO SO much for it, it works like a charm now. thank you for taking time to teach someone about it. i hope you have a great xmas and new year!!
If you are interested in learning how to make your own script ( would allow you to build up a script that does exactly what you want it to instead of my general purpose one ). You can check out this video.
It won't answer all the questions that you might have, but it will give you a much better sense of how code works and how you go about building up a script from scratch.
It is intended for new users such as yourself and it try's to make it easy to actually learn and understand how things work and not just copy and paste.
-
- Posts: 61
- Joined: 04 Jan 2022, 05:02
Re: Pixel Predator - PixelSearch Script
How can I do pixel color adjustment and Set Search area section of Pixel predator for my ahk script?
Re: Pixel Predator - PixelSearch Script
ow i can add 2 or 3 colors
?
?
Re: Pixel Predator - Pixel Search Script
I love your work, I'm curious if you ever got around to updating it for multi-coloring. I wish I could script it myself but my knowledge on scripting is virtually zero.Hellbent wrote: ↑31 Jan 2019, 10:07SilentThunder wrote: ↑30 Jan 2019, 11:09i love this and use it daily. I actually run multiple instances of it, which brings me to a question. if im running 2 or 3 instances of the pixel predator, is there a way to prioritize them? for example I have 3 colors on screen that need to be clicked on, but I need a specific color clicked before the others. atm they fumble over each other when I have more than one color needing to be clicked.
I hope u can help, I just recently started using scripts, I actually was just looking for an autoclicker when I stumbled upon ur youtube channel. you have opened up a whole world that I never knew existed.
and the way u explain everything is awesome cause i never knew of scripting till i seen ur videos.
This is a good news bad news situation. The bad news is that the amount of effort it would take to get this script to look for multiple colours is about the same amount of effort it would take to rewrite it from scratch. I will likely revisit this sometime down the road, but that could be 6 months to a year away.
The good news is that you can create your own pixel search script in minutes if you omit the Gui and just go with hotkeys.
You can also continue doing it the way you are now (using multiple instances of the script) and adjust the loop delay so that the colours you want to prioritize loop faster, this is not a very good solution, but it might be enough. I'm glad you like this script and i'm also very happy that I was able to bring you into the world of ahk scripting.
Good luck.
Re: Pixel Predator - Pixel Search Script
Re: Pixel Predator - Pixel Search Script
Oh wow, I didn't realize the video. Appreciate it.Hellbent wrote: ↑05 Apr 2022, 03:53Thanks
You can find the one from the video above your post here.
viewtopic.php?f=18&t=89417#p394143
Re: Pixel Predator - PixelSearch Script
Amazing amazing. I've spend so many years to figure out how to write just a script that does some of this. And now you even have it with a Interface menu. Impressive.
It so good, I have just one question.
How do I save the changes i made?
When I close the script it resets.
Sincerely
It so good, I have just one question.
How do I save the changes i made?
When I close the script it resets.
Sincerely
Re: Pixel Predator - PixelSearch Script
I don't want to go into the code myself right now but I can explain how you can edit the code to save your values.S1lver wrote: ↑20 Apr 2022, 03:33Amazing amazing. I've spend so many years to figure out how to write just a script that does some of this. And now you even have it with a Interface menu. Impressive.
It so good, I have just one question.
How do I save the changes i made?
When I close the script it resets.
Sincerely
if you put something like this at the top or bottom of the script
Code: Select all
/*
[SavedData]
value1=123
value2=FFFF00
value3=BlahBlahBlah Blah
*/
Code: Select all
#NoEnv
;Write
value1 := "SomeValue"
iniWrite, % value1 , % A_ScriptFullPath, SavedData, value1
;Read
iniRead, value1 , % A_ScriptFullPath, SavedData, value1 , ""
msgbox, % value1
To save your values you can either add a hotkey to write the current values or you can make the "Show Send Documentation" button a bit smaller and move it a bit to the left and add a small new button beside it that you can press to save your values.
HTH
Re: Pixel Predator - Pixel Search Script
Regarding this:
This script can only deal with 1 color, but you can run more than 1 instance of the script by either saving it in two script files, or by editing
#SingleInstance,Force to #SingleInstance,Off at the top of the script.
__________________________
This had a terrible consequence for me.
it ended up messing with each other when running two windows. so I could not stop the macro when I started the second one. the Numpad keyshortcut did not work, even If i pressed both stop shortcuts. which was set to num2 in the first copy, and num5 in the second one.
It also changed the color from the first one to the second one and the command asawell.
any suggestions?
I've tried setting singlinstace to off, and also made a copy of the script itself. it didn't change
This script can only deal with 1 color, but you can run more than 1 instance of the script by either saving it in two script files, or by editing
#SingleInstance,Force to #SingleInstance,Off at the top of the script.
__________________________
This had a terrible consequence for me.
it ended up messing with each other when running two windows. so I could not stop the macro when I started the second one. the Numpad keyshortcut did not work, even If i pressed both stop shortcuts. which was set to num2 in the first copy, and num5 in the second one.
It also changed the color from the first one to the second one and the command asawell.
any suggestions?
I've tried setting singlinstace to off, and also made a copy of the script itself. it didn't change
Re: Pixel Predator - PixelSearch Script
oki thx for this. that already went to complex for me I'm sorry. But I will try to see if I can make that work. thank you for trying to help. much appreciatedHellbent wrote: ↑20 Apr 2022, 12:03I don't want to go into the code myself right now but I can explain how you can edit the code to save your values.S1lver wrote: ↑20 Apr 2022, 03:33Amazing amazing. I've spend so many years to figure out how to write just a script that does some of this. And now you even have it with a Interface menu. Impressive.
It so good, I have just one question.
How do I save the changes i made?
When I close the script it resets.
Sincerely
if you put something like this at the top or bottom of the scriptyou can write new data directly to the script using iniWrite and read it later using iniRead.Code: Select all
/* [SavedData] value1=123 value2=FFFF00 value3=BlahBlahBlah Blah */
With that you can take the variables that get declared near the top of the script and have them use the values you have saved.Code: Select all
#NoEnv ;Write value1 := "SomeValue" iniWrite, % value1 , % A_ScriptFullPath, SavedData, value1 ;Read iniRead, value1 , % A_ScriptFullPath, SavedData, value1 , "" msgbox, % value1
To save your values you can either add a hotkey to write the current values or you can make the "Show Send Documentation" button a bit smaller and move it a bit to the left and add a small new button beside it that you can press to save your values.
HTH
Re: Pixel Predator - PixelSearch Script
amazing thx.
can i in the color field input some text so it will search within a color range. for instance most red'ish colors.
i was thinking I could just put fx. 0x9E0000,50 (0x9E0000 is the specific color I got from using set color and ,50 suppose to mean that color plus similar colors within range of 50). but that didn't work.
Any suggestions?
Sincerely
a fan
can i in the color field input some text so it will search within a color range. for instance most red'ish colors.
i was thinking I could just put fx. 0x9E0000,50 (0x9E0000 is the specific color I got from using set color and ,50 suppose to mean that color plus similar colors within range of 50). but that didn't work.
Any suggestions?
Sincerely
a fan
Re: Pixel Predator - PixelSearch Script
I don't know if I SHould quote this post so I made a copy of my message. it wasjsut to see if you got notified. love
amazing thx.
can i in the color field input some text so it will search within a color range. for instance most red'ish colors.
i was thinking I could just put fx. 0x9E0000,50 (0x9E0000 is the specific color I got from using set color and ,50 suppose to mean that color plus similar colors within range of 50). but that didn't work.
Any suggestions?
Sincerely
a fan
Re: Pixel Predator - PixelSearch Script
No, you shouldn't. Please don't create huge quotes with little or no context. Instead you can edit the quote and just keep the relevant bits, like I did above (it will still point to the quoted post, if that matters; just click the upwards arrow).
Or you can use mentions like @S1lver: type @ and then the username you want to mention - at some point you will see a list you can choose from. Or apply mention-tags yourself; or use the @ button of a post. Thank you!
PS: Sometimes people are just (too) busy.
Re: Pixel Predator - PixelSearch Script
hey m8. did you figure out how to make this work. I am struggling with the Controlclick function. I can make a ton of scripts working with pixel search, but if I replace Click with Controlclick, the script does nothing.
cheers
-
- Posts: 1
- Joined: 06 Sep 2022, 18:45
Re: Pixel Predator - PixelSearch Script
hello ppl, so iam new at scripting and i found this script but the problem is when i activate for certain pixel it clicks and moves, i just want a script that clicks right mouse button or toggols a button on keyboard when that certain pixel pops up in the search area, thank you for providing this script
Re: Pixel Predator - PixelSearch Script
Refer to the command line params. ( Press the "?" button )redaabdelhady wrote: ↑06 Sep 2022, 18:50hello ppl, so iam new at scripting and i found this script but the problem is when i activate for certain pixel it clicks and moves, i just want a script that clicks right mouse button or toggols a button on keyboard when that certain pixel pops up in the search area, thank you for providing this script
Re: Pixel Predator - PixelSearch Script
Love your script, it really is a god send!
I'm editing your script so it loads my preferred configurations by adjusting the global settings, so I don't have to do it every time I open the script. I've successfully changed the color and it loads with what I edited it to. However when I change the X Y W and H to my preferred coordinates, it's still "nill" when the GUI loads. What do I need to change so it shows what I've edited.... in the GUI. Thanks.
My settings: global HB_Button:=[],Selected_Color:="000000",Color_Edit:="0x000000",Stop:=0,X_Pos:="1500",Y_Pos:="688",W_Pos:="73",H_Pos:="27",cx2:="",cy2:="",cx:="",cy:=""
I'm editing your script so it loads my preferred configurations by adjusting the global settings, so I don't have to do it every time I open the script. I've successfully changed the color and it loads with what I edited it to. However when I change the X Y W and H to my preferred coordinates, it's still "nill" when the GUI loads. What do I need to change so it shows what I've edited.... in the GUI. Thanks.
My settings: global HB_Button:=[],Selected_Color:="000000",Color_Edit:="0x000000",Stop:=0,X_Pos:="1500",Y_Pos:="688",W_Pos:="73",H_Pos:="27",cx2:="",cy2:="",cx:="",cy:=""
Re: Pixel Predator - PixelSearch Script
You need to set the edit controls like so.chipso wrote: ↑20 Sep 2022, 06:00Love your script, it really is a god send!
I'm editing your script so it loads my preferred configurations by adjusting the global settings, so I don't have to do it every time I open the script. I've successfully changed the color and it loads with what I edited it to. However when I change the X Y W and H to my preferred coordinates, it's still "nill" when the GUI loads. What do I need to change so it shows what I've edited.... in the GUI. Thanks.
My settings: global HB_Button:=[],Selected_Color:="000000",Color_Edit:="0x000000",Stop:=0,X_Pos:="1500",Y_Pos:="688",W_Pos:="73",H_Pos:="27",cx2:="",cy2:="",cx:="",cy:=""
Code: Select all
Gui,1:Add,Edit, x175 y100 w40 h22 Center ReadOnly vX_Pos, % X_Pos
Gui,1:Add,Edit, x245 y100 w40 h22 Center ReadOnly vY_Pos, % Y_Pos
Gui,1:Add,Edit, x315 y100 w40 h22 Center ReadOnly vW_Pos, % W_Pos
Gui,1:Add,Edit, x385 y100 w40 h22 Center ReadOnly vH_Pos, % H_Pos
Code: Select all
, cx2 := X_Pos + W_Pos
, cy2 := Y_Pos + H_Pos
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 95 guests