Jump to content
Sign in to follow this  

Noob question: Using variables instead of coordinates

Recommended Posts


Hi !

So my question is very simple I believe.. But I haven't found the answer through my google researches.


I'm trying to use a variable instead of coordinates for the function pixelsearch().

here's a example of what I have :

   Local $topleftslotX=1014
   Local $topleftslotY=472
   Local $botrightslotX=1044
   Local $botrightslotY=542

        $SearchResult = PixelSearch($topleftslotX, $topleftslotY, $botrightslotX, $botrightslotY, 0xffffff)

      If not @error Then
       ($MB_SYSTEMMODAL, "", "X and Y are: " & $SearchResult[0] & "," & $SearchResult[1]) 

Sadly it doesn't seem to work. Do you guys know if i'm doing something wrong ? Or is it simply impossible to use variables as arguments ?

Thanks for any help!

Edited by astalol

Share this post

Link to post
Share on other sites

Should work fine.

.... and make sure you have read our forumrules as well.


Edited by 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

hmm, I must have failed somewhere else then. I'm gonna triple check everything. thanks for your help!

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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.