Jump to content

Recommended Posts

Posted

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.

Posted (edited)

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.

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