Jump to content

calling coordinates as a variable


t0ddie
 Share

Recommended Posts

im trying to create a loop to eliminate excess code.

i want to do this

$1 = "188,264"

$test = pixelgetcolor ($1)

but i get an error

please tell me whats wrong here, thanks

Todd

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

/\/,Dec 6 2004, 04:39 PM]2 variables will have to do.

<{POST_SNAPBACK}>

yep, but i was just thinking, i could make one variable, then stringtrim it and use it again.

seems like it might makes things less bulky. i got alot of coordinates here

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

Guest Py7|-|[]/\/

When you string trim it wouldn't you still end up with a string? It will not accept any strings. So even if you do that, you would still be left with a string.

Link to comment
Share on other sites

Guest Py7|-|[]/\/

CyberSlug, just wondering, but is it possible to "cast" a String data type into an int/double/long/short type? If this is possible then you might be able to do something like that.

Link to comment
Share on other sites

CyberSlug, just wondering, but is it possible to "cast" a String data type into an int/double/long/short type? If this is possible then you might be able to do something like that.

<{POST_SNAPBACK}>

If you look at what he did above. He made the string into a number with the Number() command.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

t0ddie,

it seems you need to read up on arrays

$pq[1][0]=188 ; first point x

$pq[1][1]=264 ; first point y

Return PixelGetColor( $pq[1][0] ,$pq[1][1] )

if it is a lot of points create a text file of points and load up the array at the beggining

of your script

also if your points have a constant increment you could use a for...next loop

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