Jump to content
Sign in to follow this  
232showtime

Problem with Func Calling

Recommended Posts

232showtime

Just exploring autoit and came up with this.

 

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>

HotKeySet("{F1}", "PDB")

PDB()

Func PDB()
    Opt("GUIOnEventMode", 1)
    If _Singleton("PDB", 1) = 0 Then
        GUISetState(@SW_SHOW)
    Else
        Global $iPDB = GUICreate("PDB", 156, 61, 192, 124)
        $Button2 = GUICtrlCreateButton("Load", 24, 16, 107, 25)
        GUISetOnEvent($GUI_EVENT_CLOSE, "CloseW")
        GUISetState(@SW_SHOW)
    EndIf
EndFunc   ;==>PDB

While 1
    Sleep(10)
WEnd
Func CloseW()
    Select
        Case @GUI_CtrlId = $GUI_EVENT_CLOSE
            GUISetState(@SW_HIDE, $iPDB)
    EndSelect
EndFunc   ;==>CloseW

Func Load()
    MsgBox(64, "", "Hello World") ;not working
EndFunc   ;==>Load

How do i call the Func Load()???


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
ahmet

Maybe you are looking for GUICtrlSetOnEvent().

Share this post


Link to post
Share on other sites
232showtime

Maybe you are looking for GUICtrlSetOnEvent().

​I already used GUICtrlSetOnEvent(), as you can see on the script above...

now its working just made some modification, silly me....:P

Edited by 232showtime
Problem Solved...

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

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  

×