Jump to content

[NOOB] need help with function


Recommended Posts

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

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

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...