MattX Posted June 16, 2005 Share Posted June 16, 2005 Errr help !! I cannot get my Help ----> About Menu working. The About is greyed out and when you click on it, it fails to display the msg box... Where am I going wrong ? expandcollapse popup; AutoIt Version: 3.10 ; Language: English ; Platform: WinXP ; Author: Matt Marsh - ; Script Function: Quick Launcher For Users ; Version: 1 BETA #include <GuiConstants.au3> GuiCreate("Quick Launcher v1 beta", 223, 210, 750, 40) $helpmenu = GUICtrlCreateMenu ("Help") $infoitem = GUICtrlCreateMenuitem ("About",$helpmenu) GUISetBkColor(0x0066FF) GUICtrlSetState(-1, $GUI_DISABLE) $Icon_1 = GuiCtrlCreateIcon("C:\Program Files\Mozilla Firefox v1\firefox.exe", 0, 20, 10, 32, 32) GUICtrlCreateLabel("Firefox", 20, 45) $Icon_2 = GuiCtrlCreateIcon("c:\Windows\explorer.exe", 0, 90, 10, 32, 32) GUICtrlCreateLabel("File Manager", 80,45) $Icon_3 = GuiCtrlCreateIcon(@ScriptDir & "\email3.ico", 0, 160, 10, 32, 32) GUICtrlCreateLabel("E-Mail", 160,45) $Icon_4 = GuiCtrlCreateIcon(@ScriptDir & "\computer2.ico", 0, 20, 80, 32, 32) GUICtrlCreateLabel("Video Res", 10,120) GUICtrlCreateLabel(" 800x600", 10,135) $Icon_5 = GuiCtrlCreateIcon(@ScriptDir & "\computer2.ico", 0, 90, 80, 32, 32) GUICtrlCreateLabel("Video Res", 80,120) GUICtrlCreateLabel("1024x768", 80,135) $Icon_6 = GuiCtrlCreateIcon(@ScriptDir & "\ca.ico", 0, 160, 80, 32, 32) GUICtrlCreateLabel("Clip Art", 160,120) GUICtrlCreateLabel("(Coming soon)", 140,135) $Date_7 = GuiCtrlCreateDate("Date7", 20, 170, 120, 20) GUISetState(@SW_SHOW) While 1 $bpress = GUIGetMsg() Select Case $bpress = $Icon_1 Run('p:\Misc\firefox launcher google.exe') Case $bpress = $Icon_2 Run('c:\windows\explorer.exe') Case $bpress = $Icon_3 Run('p:\update\firefox launcher3.exe') Case $bpress = $Icon_4 Run('p:\vidres\800x600.cmd') Case $bpress = $Icon_5 Run('p:\vidres\1024x768.cmd') Case $bpress = $Icon_6 ;Run('P:\Misc\clickart launcher.exe') Case $bpress = $helpmenu Msgbox(0,"Info","Written By Matt") EndSelect WEnd Link to comment Share on other sites More sharing options...
HardCopy Posted June 16, 2005 Share Posted June 16, 2005 GUICtrlSetState(-1, $GUI_DISABLE) This line is doing exactly what you emplyed it for. Remove it and all will be fine. hth HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
MattX Posted June 16, 2005 Author Share Posted June 16, 2005 Silly me - did not see that - thanks.Just need to get the MSG box working now - for some reason it did not pop up....GUICtrlSetState(-1, $GUI_DISABLE)This line is doing exactly what you emplyed it for.Remove it and all will be fine.hthHardCopy<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
HardCopy Posted June 16, 2005 Share Posted June 16, 2005 Silly me - did not see that - thanks.Just need to get the MSG box working now - for some reason it did not pop up....<{POST_SNAPBACK}>Case $bpress = $helpmenuShould be Case $bpress = $infoitemu were waiting for an event on the help menu header, (which aint gonna happen), & not the actual menu item.hthHardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
MattX Posted June 16, 2005 Author Share Posted June 16, 2005 Thanks - just spotted that - appreciate the help.Its all working now. Case $bpress = $helpmenuShould be Case $bpress = $infoitemu were waiting for an event on the help menu header, (which aint gonna happen), & not the actual menu item.hthHardCopy<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
Valuater Posted June 16, 2005 Share Posted June 16, 2005 (edited) you could ad this line also Case $bpress = $GUI_EVENT_CLOSE Exit This menu can be done from the start menu of windows....but it looks good so far 8) Edited June 16, 2005 by Valuater Link to comment Share on other sites More sharing options...
MattX Posted June 16, 2005 Author Share Posted June 16, 2005 I don't want the users [ mainly kids ] to close it though. Some of them know how to close it though bringing up the task manager but if they carry on I'll just disable that as a policy.I'll also get rid of the tray icon too at some point.Final code: [ Thanks for all the help as usual - I dunno what I would do without people pointing me in the right direction on this forum.... ]expandcollapse popup; AutoIt Version: 3.10 ; Language: English ; Platform: WinXP ; Author: Matt Marsh - mmarsh@******.org.uk ; Script Function: Quick Launcher For Users ; Version: 1.1 BETA #include <GuiConstants.au3> GUICreate("Quick Launcher v1.1 beta", 223, 220, 750, 40) $helpmenu = GUICtrlCreateMenu("Help") $infoitem = GUICtrlCreateMenuItem("About", $helpmenu) GUISetBkColor(0x0066FF) $Icon_1 = GUICtrlCreateIcon("C:\Program Files\Mozilla Firefox v1\firefox.exe", 0, 20, 10, 32, 32) GUICtrlCreateLabel("Firefox", 20, 45) GUICtrlSetTip(-1, "Launch Firefox For Internet Access") $Icon_2 = GUICtrlCreateIcon("c:\Windows\explorer.exe", 0, 90, 10, 32, 32) GUICtrlCreateLabel("File Manager", 80, 45) GUICtrlSetTip(-1, "Manage Your Files") $Icon_3 = GUICtrlCreateIcon(@ScriptDir & "\email3.ico", 0, 160, 10, 32, 32) GUICtrlCreateLabel("E-Mail", 160, 45) GUICtrlSetTip(-1, "Check Your E-mail") $Icon_4 = GUICtrlCreateIcon(@ScriptDir & "\computer2.ico", 0, 20, 80, 32, 32) GUICtrlCreateLabel("Video Res", 10, 120) GUICtrlCreateLabel(" 800x600", 10, 135) GUICtrlSetTip(-1, "Change Your Screen Res to:" & @CRLF & "800x600 32bit") $Icon_5 = GUICtrlCreateIcon(@ScriptDir & "\computer2.ico", 0, 90, 80, 32, 32) GUICtrlCreateLabel("Video Res", 80, 120) GUICtrlCreateLabel("1024x768", 80, 135) GUICtrlSetTip(-1, "Change Your Screen Res to:" & @CRLF & "1024x768 32bit") $Icon_6 = GUICtrlCreateIcon(@ScriptDir & "\ca.ico", 0, 160, 80, 32, 32) GUICtrlCreateLabel("Clip Art", 160, 120) GUICtrlCreateLabel("(Coming soon)", 140, 135) GUICtrlSetTip(-1, "Launch Clip Art Program. Only avilable in ICT Room." & @CRLF & "Roll out planned over Summer. If you want it before" & @CRLF & "then contact me.") $Date_7 = GUICtrlCreateDate("Date7", 20, 170, 120, 20) GUISetState(@SW_SHOW) While 1 $bpress = GUIGetMsg() Select Case $bpress = $Icon_1 Run('p:\Misc\firefox launcher google.exe') Case $bpress = $Icon_2 Run('c:\windows\explorer.exe') Case $bpress = $Icon_3 Run('p:\update\firefox launcher3.exe') Case $bpress = $Icon_4 Run('p:\vidres\800x600.cmd') Case $bpress = $Icon_5 Run('p:\vidres\1024x768.cmd') Case $bpress = $Icon_6 ;Run('P:\Misc\clickart launcher.exe') Case $bpress = $infoitem MsgBox(0, "Quick Launcher v1.1 Beta", "Quick Launcher v1.1 Beta" & @CRLF & "Written By Matt Marsh." & @CRLF & "" & @CRLF & "Comments & Suggestions to:" & @CRLF & "mmarsh@*******.org.uk") EndSelect WEndyou could ad this line alsoCase $bpress = $GUI_EVENT_CLOSE ExitThis menu can be done from the start menu of windows....butit looks good so far8)<{POST_SNAPBACK}> 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