Sign in to follow this  
Followers 0
zykl0

[NOOB] need help with function

3 posts in this topic

Hello i am learning for around an hour B) and im not sure to understand perfectly function

heres what i did

Func Goonzu 
    WinActivate("Goonzu", "")
    WinMove("Goonzu", "", 0, 0)
    sleep(1000)
EndFunc


Func clean_interface
    if PixelGetColor ( 347 , 507 ) = 16225825 Then 
        MouseClick ( "left", 324, 584, 1 )
        sleep(500)
        send ( '!{F4}' )
    Else
    EndIf
EndFunc
Call ("Goonzu")
Call ("clean_interface")

i just want to encapsulate some piece of code into function to be able to call them later but it dont work!

i read in the manual that people put variable and the end of their function but i dont understand i dont want variable i just need some piece of code to be called later :o

Share this post


Link to post
Share on other sites



thats what you get for using call !!! HAHAH.

but for real. this is how it should be:

Func Goonzu()
    WinActivate("Goonzu", "")
    WinMove("Goonzu", "", 0, 0)
    sleep(1000)
EndFunc

Func clean_interface()
    if PixelGetColor ( 347 , 507 ) = 16225825 Then
        MouseClick ( "left", 324, 584)
        sleep(500)
        send ( '!{F4}' )
    EndIf
EndFunc

Goonzu()
clean_interface()

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites

Good grief. What on earth led you to using the function "Call" to call functions you knew of at compile time (I'm really asking)?

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  
Followers 0