Jump to content

Output search to vaule


Recommended Posts

Ok having a little trouble finding out how to get the pixel search to run in the loop then deliver the output (0, or 1) to the value $Search. I feel like im really really close. Can anyone straighten me out?

Global $Search=PixelSearch (93,89,102,98,0xf9f8f7)
Global Const $FF = ("Mozilla Firefox")
HotKeySet("{F10}", "exitNow")



Func exitNow()
    Exit
EndFunc ;==>exitNow

ToolTip("F10: Exit", 0, 0)
WinActivate ($FF)

Sleep (500)

While 1

If $Search=0 Then 
        MsgBox(0, "Notice", "Yup its there",1)
        WinActivate ($FF);fight program in front
        
    
Elseif $Search=1 Then 
    MsgBox(0, "Notice", "Nope Its NOT",1)
    WinActivate ($FF) ;fight program in front
    
    
    
Else 
    MsgBox (0,"Notice","Well Im broke, never ran the search",2)
    WinActivate ($FF);fight program in front
    Sleep (6000)
EndIf
WEnd

muppet hands are so soft :)

Link to comment
Share on other sites

Come on noone? Is this possible? It feel like its 1 line away from done. Just how to i get the Pixel Search to run

Ok having a little trouble finding out how to get the pixel search to run in the loop then deliver the output (0, or 1) to the value $Search. I feel like im really really close. Can anyone straighten me out?

Global $Search=PixelSearch (93,89,102,98,0xf9f8f7)
Global Const $FF = ("Mozilla Firefox")
HotKeySet("{F10}", "exitNow")



Func exitNow()
    Exit
EndFunc ;==>exitNow

ToolTip("F10: Exit", 0, 0)
WinActivate ($FF)

Sleep (500)

While 1

If $Search=0 Then 
        MsgBox(0, "Notice", "Yup its there",1)
        WinActivate ($FF);fight program in front
        
    
Elseif $Search=1 Then 
    MsgBox(0, "Notice", "Nope Its NOT",1)
    WinActivate ($FF) ;fight program in front
    
    
    
Else 
    MsgBox (0,"Notice","Well Im broke, never ran the search",2)
    WinActivate ($FF);fight program in front
    Sleep (6000)
EndIf
WEnd

muppet hands are so soft :)

Link to comment
Share on other sites

You are not getting the result you need because you are evaluating $Search at the top of your script when the window you want to search might not even be open.

The value of $search won't change during your script execution.

To have it working, you need to change "If $Search=0 Then" with "If PixelSearch (93,89,102,98,0xf9f8f7) = 0 Then" so the pixel search will be done continuously in the While/Wend loop.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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