Pieter Posted August 24, 2006 Share Posted August 24, 2006 expandcollapse popup; ------------------------------------------------------------------------------ ; ; Program name: MediaSync ; Version: 0.3 (UNFINISHED) ; ; Component name: MediaSync Tray ; Function: tray user interface for MediaSync Watcher ; ; ------------------------------------------------------------------------------ #include <GuiConstants.au3> $version = "0.3 (UNFINISHED)" ; Create right-click menu Opt("TrayMenuMode",1) $menu_plugged = TrayCreateItem("Device status") $menu_sep1 = TrayCreateItem("") $menu_syncnow = TrayCreateItem("Synchronize now") $menu_hotkeys = TrayCreateItem("View hotkeys") $menu_sep2 = TrayCreateItem("") $menu_about = TrayCreateItem("About") $menu_exit = TrayCreateItem("Exit") TraySetState() While 1 ; Right-click menu changes checker $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $menu_about ; TrayItemSetState($checkeditem,$TRAY_CHECKED) Call("about") Case $msg = $menu_exit ExitLoop EndSelect WEnd Func about() $aboutwindow = GuiCreate("About MediaSync", 313, 191,-1, -1 , $WS_MINIMIZEBOX+$WS_CAPTION+$WS_POPUP+$WS_SYSMENU) $Pic_1 = GuiCtrlCreatePic("images/logo.gif", 10, 10, 48, 48) $Label_1 = GuiCtrlCreateLabel("MediaSync v" & $version, 70, 10, 200, 20) $Label_2 = GuiCtrlCreateLabel("MediaSync is © 2005-2006 Pieter De Decker. Based on the AutoIt scripting language. Icons were provided for free by FastIcon.com." & @CRLF & @CRLF & "Website: http://mediasync.6te.net/" & @CRLF & "Email: pdedecker@gmail.com", 20, 90, 280, 90) $Group_3 = GuiCtrlCreateGroup("About", 10, 70, 290, 110) $Button_4 = GuiCtrlCreateButton("Close", 70, 30, 80, 30) GuiCtrlSetOnEvent( $Button_4, "about_close") GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ; Nothing EndSelect WEnd GUIDelete("About MediaSync") EndFunc Func about_close() GUIDelete("About MediaSync") EndFuncWhy is my button ($Button_4) not working? iPod + Online calendars = iPodCALsync Link to comment Share on other sites More sharing options...
Paulie Posted August 24, 2006 Share Posted August 24, 2006 Check the sizes of all you labels, if you make them overlap the button (Very common) the button won't get clicked because you will have click the label instead Link to comment Share on other sites More sharing options...
Valuater Posted August 24, 2006 Share Posted August 24, 2006 maybe expandcollapse popup; ------------------------------------------------------------------------------ ; ; Program name: MediaSync ; Version: 0.3 (UNFINISHED) ; ; Component name: MediaSync Tray ; Function: tray user interface for MediaSync Watcher ; ; ------------------------------------------------------------------------------ #include <GuiConstants.au3> $version = "0.3 (UNFINISHED)" ; Create right-click menu Opt("TrayMenuMode",1) $menu_plugged = TrayCreateItem("Device status") $menu_sep1 = TrayCreateItem("") $menu_syncnow = TrayCreateItem("Synchronize now") $menu_hotkeys = TrayCreateItem("View hotkeys") $menu_sep2 = TrayCreateItem("") $menu_about = TrayCreateItem("About") $menu_exit = TrayCreateItem("Exit") TraySetState() While 1 ; Right-click menu changes checker $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $menu_about ; TrayItemSetState($checkeditem,$TRAY_CHECKED) Call("about") Case $msg = $menu_exit ExitLoop EndSelect WEnd Func about() $aboutwindow = GuiCreate("About MediaSync", 313, 191,-1, -1 , $WS_MINIMIZEBOX+$WS_CAPTION+$WS_POPUP+$WS_SYSMENU) $Pic_1 = GuiCtrlCreatePic("images/logo.gif", 10, 10, 48, 48) $Label_1 = GuiCtrlCreateLabel("MediaSync v" & $version, 70, 10, 200, 20) $Label_2 = GuiCtrlCreateLabel("MediaSync is © 2005-2006 Pieter De Decker. Based on the AutoIt scripting language. Icons were provided for free by FastIcon.com." & @CRLF & @CRLF & "Website: http://mediasync.6te.net/" & @CRLF & "Email: pdedecker@gmail.com", 20, 90, 280, 90) $Group_3 = GuiCtrlCreateGroup("About", 10, 70, 290, 110) $Button_4 = GuiCtrlCreateButton("Close", 70, 30, 80, 30) GuiCtrlSetOnEvent( $Button_4, "about_close") GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_4 ExitLoop EndSelect WEnd GUIDelete("About MediaSync") EndFunc Func about_close() GUIDelete("About MediaSync") EndFunc 8) Link to comment Share on other sites More sharing options...
Pieter Posted August 24, 2006 Author Share Posted August 24, 2006 Thanks Valuater, that totally worked! iPod + Online calendars = iPodCALsync 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