232showtime Posted June 8, 2015 Share Posted June 8, 2015 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 ;==>LoadHow do i call the Func Load()??? ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
ahmet Posted June 8, 2015 Share Posted June 8, 2015 Maybe you are looking for GUICtrlSetOnEvent(). Link to comment Share on other sites More sharing options...
232showtime Posted June 8, 2015 Author Share Posted June 8, 2015 (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.... Edited June 8, 2015 by 232showtime Problem Solved... ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now