Jump to content
Sign in to follow this  
stryterken

Compile Script Help!

Recommended Posts

stryterken

can some one help me compile a script, i've been trying for hours and i cant seem to make it right. I have x,y coordinates and color and if the color shows up i want it to press a certain key. its simple but i cant figure it out. Please help.

Example i have 4 different x,y coordinates on the screen at 4 different spots and all spots are black and when a certain spot turn white it will press a key at that spot.

Share this post


Link to post
Share on other sites
Minikori

can some one help me compile a script, i've been trying for hours and i cant seem to make it right. I have x,y coordinates and color and if the color shows up i want it to press a certain key. its simple but i cant figure it out. Please help.

Example i have 4 different x,y coordinates on the screen at 4 different spots and all spots are black and when a certain spot turn white it will press a key at that spot.

Example CODE would be nice, and what does this have to do with compiling?

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites
stryterken

sorry i wasnt clear, i meant just scripting a script and as for example code i had no idea what i was doing. So i dont know if the code even make sense.

Share this post


Link to post
Share on other sites
Minikori

sorry i wasnt clear, i meant just scripting a script and as for example code i had no idea what i was doing. So i dont know if the code even make sense.

Look at PixelGetColor and PixelSearch in the helpfile.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites
stryterken

how would i make it press a certain key if within the pixelsearch area lights up, lets say there is left,right,up,and down arrows and the left arrows turn white i want it to press the key Z.

Share this post


Link to post
Share on other sites
Minikori

how would i make it press a certain key if within the pixelsearch area lights up, lets say there is left,right,up,and down arrows and the left arrows turn white i want it to press the key Z.

Send()? And some If...Then stuff. Helpfile, dude.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites
stryterken

does this look correct?

$coord = PixelSearch( 680, 224, 871, 338, 0xFFFFFF )

If $coord=683,320 Then

Send("{LEFT}")

EndIf

Share this post


Link to post
Share on other sites
Authenticity

Close, If Not @error And $coord[0] = 683 And $coord[1] = 320 Then... (EndIf if span more than a line)

Edited by Authenticity

Share this post


Link to post
Share on other sites
Minikori

does this look correct?

$coord = PixelSearch( 680, 224, 871, 338, 0xFFFFFF )

If $coord=683,320 Then

Send("{LEFT}")

EndIf

That will work, but it isn't the best way. Try:

$Color = PixelGetColor(683,320)
If $Color = 0xFFFFFF And Not @error Then
        Send("{LEFT}")
EndIf

But don't take that exact code, I'm not sure I got the PixelGetColor() parameters right.


For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

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.