Owadziak

Simple question about pixelsearch :)

6 posts in this topic

#1 ·  Posted

Hello there :) i have a little problem my self, could anyone tell em if theres a way to read both x,y from input ? 

"ThisBox" is a input window made in Koda, and script below is just an example, so im not going to post whole script cuz im on my phone now.

Example Script ;

HotKeySet("{F5}","Exit")

Global $Input = GuiCtrlRead($ThisBox)

While(1) 

$pix = Pixelsearch(top,left,bottom,right,1,1)

In not(error) then 

Mouseclick("Left",$pix[0]'$pix[1],1,1)

Sleep(1000)

Else 

If @error then

Exit

Endif

Endif

Wend

I dont want to write every position in pixelsearch using diffrent input boxes,

Is there a way to use only two imput boxes to.put x,y cordinates ?

Like i put in imput1 321,123 and in imput2 543,345 and it will looks like this

$Pix = pixelsearch(321,123,543,345,1,1)

Can i simply use it this way ?

Global $imput1 = guictrlread($thisbox1)

Global $imput2 = guictrlread($thisbox2)

$Pix = PixelSearch($imput1,$imput2,1,1)

And when i compile script, write in thisbox1 321,123

thisbox2 543,345 

It will appear in script like this ?

"$Pix = pixelsearch(321,123,543,345,1,1)"

(Sorry for my english guys. And i hope that u.understand my question somehow)

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

1 hour ago, Owadziak said:

so im not going to post whole script cuz im on my phone now.

Try that anyways as this is full of errors and will not bother to even look at it seriously!

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted

37 minutes ago, Jos said:

Try that anyways as this is full of errors and will not bother to even look at it seriously!

Jos

This is only example, not even real script :/ all i want to know is if there is a easier way than doing it this way ...

"

$input1 = GuiCtrlRead($PosA)

$input2 = GuiCtrlRead($PosB)

$input3 = GuiCtrlRead($PosC)

$input4 = GuiCtrlRead($PosD)

 

$pix = PixelSearch($input1,$input2,$input3,$input4,1,1) "

[Im a beginner, and i dont have acces to my pc right now, bcuz im away from home for 6 days more.... And im trying to learn a bit more about autoit while im boring.]

Share this post


Link to post
Share on other sites

#4 ·  Posted

To know whether there is an easier way or not we need to know what it is you want to do exactly.
.. and please don't tell me you want to automate Notepad, certainly not after the last thread I closed!

So, please stop posting until you have something to show for that also feel is legitimate within the forum rules I have pointed you to, till then you have all the time to read them carefully, ;)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted

Why not do it in python and read the user's mind? :lol:

from user import mind

 

Share this post


Link to post
Share on other sites

#6 ·  Posted

Im going to post whole script then with screens on on what im working for :) im doing project in paint xD and i will try to do autopainting tool. Dont worry its a legit project :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now