Jump to content

when it's done, beep like crazy [not solved]


Recommended Posts

here's part of my code, the part that doesn't work.

func wakeupcall()
while $l2=1
if pixelgetcolor(477,333)=$1 and pixelgetcolor(474,336)=$2 and pixelgetcolor(477,336)=$3 and pixelgetcolor(480,336)=$4 and _
pixelgetcolor(477,339)=$5 then
sleep(5000)
else
beep (250,100)
beep (500,100)
beep (250,100)
beep (1000,100)
beep (750,100)
$l2=0

now, when i call this function, it does nothing. there is no error and the colors that i sampled are the color that need to be looked for

any suggestions on how to solve this or suggestions on something that works better?

edit: i accidentally pressed submit thread rather then preview ._.;

Edited by GodForsakenSoul
Link to comment
Share on other sites

here's part of my code, the part that doesn't work.

func wakeupcall()
while $l2=1
if pixelgetcolor(477,333)=$1 and pixelgetcolor(474,336)=$2 and pixelgetcolor(477,336)=$3 and pixelgetcolor(480,336)=$4 and _
pixelgetcolor(477,339)=$5 then
sleep(5000)
else
beep (250,100)
beep (500,100)
beep (250,100)
beep (1000,100)
beep (750,100)
$l2=0

now, when i call this function, it does nothing. there is no error and the colors that i sampled are the color that need to be looked for

any suggestions on how to solve this or suggestions on something that works better?

edit: i accidentally pressed submit thread rather then preview ._.;

Ah, I psychically see the problem! Besides the missing EndIf, WEnd, and EndFunc, you have a bad array reference at line 213...

:)

All seriousness aside, how do you expect any help without showing the complete function, how it's called, where variables like $1, $2, etc. where set, if the many "And" conditions were met, etc., etc., ....

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

er... i forgot to close some things in the post... crap...

the function is being called from a hotkey.

hotkeyset ("^{F7}", "wakeupcall")

dim $l=1
dim $l2=1
dim const $min=60000

while $l=1;this saves my work once every 15 minutes. i forget to save
   sleep(min*15)
   send ("^s")
wend

func wakeupcall()
while $l2=1
if pixelgetcolor(477,333)=$1 and pixelgetcolor(474,336)=$2 and pixelgetcolor(477,336)=$3 and pixelgetcolor(480,336)=$4 and _
pixelgetcolor(477,339)=$5 then;check to see if the "tracing image" window is still there"
sleep(5000)
else;if it's not there, raise the alarm!
beep (250,100)
beep (500,100)
beep (250,100)
beep (1000,100)
beep (750,100)
$l2=0
endif
endfunc

the point of this is that when i work in flash and trace the image, it takes some time to trace it (literally, about 20 minutes). during that time i go watch tv. this thing supposed to call me once the tracing is done.

varibles $1 to $5 are what i got from doing pixelgetcolor(x,y) on some points on the window. they're not important.

Edited by GodForsakenSoul
Link to comment
Share on other sites

Make sure you're pressing the right hotkey. You could add a notification when the function is correctly called. I don't see the point of all of the pixelgetcolor's. To see if a window still exists use "If WinExists()" If the window doesn't close, this function really shouldn't accomplish anything. Instead of waiting to see if the current changes, wait for the future to happen; what I mean is, instead of waiting for pixels to change, wait for a completion window to open (or whatever is supposed to happen when the actions are complete).

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