Jump to content

Simple question about pixelsearch :)


Recommended Posts

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)

 

Link to comment
Share on other sites

  • Developers
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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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.]

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...