BDover Posted October 18, 2007 Posted October 18, 2007 (edited) EDIT: Added "Menu_V1.2G"... This menu only has 12 game slots...! No App. slots... Works just like V1.2In the rar file u got both the exe files and the au3... if u dont trust the exe's, just delete 'em, read the code in the au3, and compile 'em.. EDIT: V1.2 out. - "Fixed danish" --> Menu in all English now. Added 4 Application slots.... The menu now closes when u select a shorcut, this is as intented from the beginning. New download added. (Menu_v1.2)EDIT: Corrected scripts.Well... think the menu is done... But still, if u find any bugs, or bether ways to write the code, im alwais open for sugestion The Edit GUI is a bit heavy and slow. But im not sure how to make it faste...Thanks for the support Valuater, alwais nice with a helping hand, The modified "main" has much faster loadtime...The "Menu" is basicly 3 files: Menu.exe, Edit.exe and menu.ini -->"createt by main.exe" (i can only write the code in here, so i got to "compile" the scrips yourself.)I have tryed to make it as easy as possible to add or remove shorcuts, but still keep the "mainGUI" cleen.. so. everything is changed from the "Edit"The Menu only works if u compile" the scrips to *.exe filesScreens:Menu.au3expandcollapse popup#include <GUIConstants.au3> #NoTrayIcon Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) TraySetClick(16) TraySetOnEvent(-7,"Minimize") $exit = TrayCreateItem("Exit") TrayItemSetOnEvent(-1,"ExitScript") ;------------------------------------------------------------------------ ;INI File ;------------------------------------------------------------------------ If Not FileExists(@ScriptDir & "\menu.ini") Then Create_ini() IniWrite(@ScriptDir & "\menu.ini", "Config", 2, "1") ;------------------------------------------------------------------------ ; INI read ;------------------------------------------------------------------------ ;Games--------------------------------------------- $G_path = StringSplit(",,,,,,,", ",") $G_name = StringSplit(",,,,,,,", ",") $G_path[1] = IniRead(@ScriptDir & "\menu.ini", "GPath", "1", "") $G_path[2] = IniRead(@ScriptDir & "\menu.ini", "GPath", "2", "") $G_path[3] = IniRead(@ScriptDir & "\menu.ini", "GPath", "3", "") $G_path[4] = IniRead(@ScriptDir & "\menu.ini", "GPath", "4", "") $G_path[5] = IniRead(@ScriptDir & "\menu.ini", "GPath", "5", "") $G_path[6] = IniRead(@ScriptDir & "\menu.ini", "GPath", "6", "") $G_path[7] = IniRead(@ScriptDir & "\menu.ini", "GPath", "7", "") $G_path[8] = IniRead(@ScriptDir & "\menu.ini", "GPath", "8", "") $G_name[1] = IniRead(@ScriptDir & "\menu.ini", "GName", "1", "") $G_name[2] = IniRead(@ScriptDir & "\menu.ini", "GName", "2", "") $G_name[3] = IniRead(@ScriptDir & "\menu.ini", "GName", "3", "") $G_name[4] = IniRead(@ScriptDir & "\menu.ini", "GName", "4", "") $G_name[5] = IniRead(@ScriptDir & "\menu.ini", "GName", "5", "") $G_name[6] = IniRead(@ScriptDir & "\menu.ini", "GName", "6", "") $G_name[7] = IniRead(@ScriptDir & "\menu.ini", "GName", "7", "") $G_name[8] = IniRead(@ScriptDir & "\menu.ini", "GName", "8", "") ;Programmer--------------------------------------------------- $P_path = StringSplit(",,,,,,,,,,,", ",") $P_name = StringSplit(",,,,,,,,,,,", ",") $P_path[1] = IniRead(@ScriptDir & "\menu.ini", "PPath", "1", "") $P_path[2] = IniRead(@ScriptDir & "\menu.ini", "PPath", "2", "") $P_path[3] = IniRead(@ScriptDir & "\menu.ini", "PPath", "3", "") $P_path[4] = IniRead(@ScriptDir & "\menu.ini", "PPath", "4", "") $P_path[5] = IniRead(@ScriptDir & "\menu.ini", "PPath", "5", "") $P_path[6] = IniRead(@ScriptDir & "\menu.ini", "PPath", "6", "") $P_path[7] = IniRead(@ScriptDir & "\menu.ini", "PPath", "7", "") $P_path[8] = IniRead(@ScriptDir & "\menu.ini", "PPath", "8", "") $P_path[9] = IniRead(@ScriptDir & "\menu.ini", "PPath", "9", "") $P_path[10] = IniRead(@ScriptDir & "\menu.ini", "PPath", "10", "") $P_path[11] = IniRead(@ScriptDir & "\menu.ini", "PPath", "11", "") $P_path[12] = IniRead(@ScriptDir & "\menu.ini", "PPath", "12", "") $P_name[1] = IniRead(@ScriptDir & "\menu.ini", "PName", "1", "") $P_name[2] = IniRead(@ScriptDir & "\menu.ini", "PName", "2", "") $P_name[3] = IniRead(@ScriptDir & "\menu.ini", "PName", "3", "") $P_name[4] = IniRead(@ScriptDir & "\menu.ini", "PName", "4", "") $P_name[5] = IniRead(@ScriptDir & "\menu.ini", "PName", "5", "") $P_name[6] = IniRead(@ScriptDir & "\menu.ini", "PName", "6", "") $P_name[7] = IniRead(@ScriptDir & "\menu.ini", "PName", "7", "") $P_name[8] = IniRead(@ScriptDir & "\menu.ini", "PName", "8", "") $P_name[9] = IniRead(@ScriptDir & "\menu.ini", "PName", "9", "") $P_name[10] = IniRead(@ScriptDir & "\menu.ini", "PName", "10", "") $P_name[11] = IniRead(@ScriptDir & "\menu.ini", "PName", "11", "") $P_name[12] = IniRead(@ScriptDir & "\menu.ini", "PName", "12", "") $trans = IniRead(@ScriptDir & "\menu.ini", "Config", "1", "255") IniWrite(@ScriptDir & "\menu.ini", "Config", 3, $trans) ;------------------------------------------------------------------------ ; Menu ;------------------------------------------------------------------------ $menuh = 210 $menub = 550 $distance2 = 100 If $G_path[5] & $G_path[6] & $G_path[7] & $G_path[8] & $P_path[5] & $P_path[6] & $P_path[7] & $P_path[8] & $P_path[9] & $P_path[10] & $P_path[11] & $P_path[12] = "" Then ElseIf $G_path[5] & $G_path[6] & $G_path[7] & $G_path[8] & $P_path[9] & $P_path[10] & $P_path[11] & $P_path[12] = "" Then $menuh += 60 ElseIf $G_path[5] & $G_path[6] & $G_path[7] & $G_path[8] = "" Then $menuh += 120 ElseIf $P_path[5] & $P_path[6] & $P_path[7] & $P_path[8] & $P_path[9] & $P_path[10] & $P_path[11] & $P_path[12] = "" Then $menuh += 120 $distance2 += 60 ElseIf $P_path[9] & $P_path[10] & $P_path[11] & $P_path[12] = "" Then $menuh += 180 $distance2 += 60 Else $menuh += 240 $distance2 += 60 Endif $font="Tahoma" $font_color="0xffffff" $main = GUICreate("Menu", $menub,$menuh) $bgcolor = GUISetBkColor (0x717171) GUISetFont (7, 400, "", $font) ;------------------------------------------------------------------------ ; Games ;------------------------------------------------------------------------ $distance = 10 $autodistance = $distance + 23 ;Headline------------------------------------- GUISetFont (9, 600, "", $font) GUICtrlCreateLabel ("Games", 20,$distance) GUICtrlSetColor(-1,$font_color) ;Border1------------------------------------- $borderb = $menub - 20 GuiCtrlCreateGraphic(10, $autodistance, $borderb,1) GUICtrlSetBkColor(-2,$font_color) ;------------------------------------------------------------------------ ; Programmer ;------------------------------------------------------------------------ $autodistance2 = $distance2 + 23 ;Headline------------------------------------ GUICtrlCreateLabel ("Applications", 20,$distance2) GUICtrlSetColor(-1,$font_color) ;Border1------------------------------------- $borderb = $menub - 20 GuiCtrlCreateGraphic(10, $autodistance2, $borderb,1) GUICtrlSetBkColor(-2,$font_color) ;------------------------------------------------------------------------ ; Showoff ;------------------------------------------------------------------------ $showoffX = 10 $showoffY = $menuh - 20 GUISetFont (7, 400, 2, $font) GUICtrlCreateLabel ("Menu v1.2 - Dover Dezign - 2007", $showoffX,$showoffY) GUICtrlSetColor(-1,$font_color) ;------------------------------------------------------------------------ ; Edit ;------------------------------------------------------------------------ $editbuttonX = $menub - 50 $editbuttony = $menuh - 25 $editbutton = GUICtrlCreateButton("Edit", $editbuttonX, $editbuttony, 40, 20) ;------------------------------------------------------------------------------------------------------------------------------------------------------------ ;In the following part (games and programs) all comments are for creating more shortcuts then alreddy excists. Dont change em if this arent your intensions ;------------------------------------------------------------------------------------------------------------------------------------------------------------ Dim $G_run[UBound($G_name)] $iconX = 20 $iconY = $autodistance + 12 GUISetFont (9, 400, "", $font) $LabelX = $iconX + 40 $LabelY = $iconY $buttonX = $iconX + 40 $buttonY = $iconY + 15 for $x = 1 to $G_name[0] If $G_path[$x] = "" Then Else GUICtrlCreateIcon($G_path[$x],-1,$iconX,$iconY,35,35) GUICtrlCreateLabel ($G_name[$x], $LabelX,$LabelY) GUICtrlSetColor(-1,$font_color) $G_run[$x] = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X" EndIf $iconX = $iconX + 130 $iconY = $iconY If $x = 4 Then $iconX = 20 $iconY += 60 EndIf $LabelX = $iconX + 40 $LabelY = $iconY $buttonX = $iconX + 40 $buttonY = $iconY + 15 Next ;Programmer--------------------------------------------- Dim $P_run[UBound($P_name)] $iconX = 20 $iconY = $autodistance2 + 12 $LabelX = $iconX + 40 $LabelY = $iconY $buttonX = $iconX + 40 $buttonY = $iconY + 15 For $x = 1 to $P_name[0] If $P_path[$x] = "" Then Else GUICtrlCreateIcon($P_path[$x],-1,$iconX,$iconY,35,35) GUICtrlCreateLabel ($P_name[$x], $LabelX,$LabelY) GUICtrlSetColor(-1,$font_color) $P_run[$x] = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X" EndIf $iconX = $iconX + 130 $iconY = $iconY If $x = 4 Then $iconX = 20 $iconY += 60 EndIf IF $x = 8 Then $iconX = 20 $iconY += 60 EndIf $LabelX = $iconX + 40 $LabelY = $iconY $buttonX = $iconX + 40 $buttonY = $iconY + 15 Next GUISetState() WinSetTrans($main, "", $trans) While 1 $msg = GuiGetMsg() If $msg = -3 then Exit If $msg = $editbutton Then Run(@ScriptDir & "\Edit.exe") If $msg = $GUI_EVENT_MINIMIZE Then GuiSetState(@SW_HIDE) TraySetState(1) EndIf for $x = 1 to $G_name[0] If $msg = $G_run[$x] Then If FileExists($G_path[$x]) Then Run (FileGetShortName($G_path[$x])) Exit EndIf EndIf Next for $x = 1 to $P_name[0] If $msg = $P_run[$x] Then If FileExists($P_path[$x]) Then Run (FileGetShortName($P_path[$x])) Exit EndIf EndIf Next WEnd Func Minimize() TraySetState(2) GuiSetState(@SW_SHOW) EndFunc Func ExitScript() Exit EndFunc Func Create_ini() IniWrite(@ScriptDir & "\menu.ini", "Config", 1, "220") IniWrite(@ScriptDir & "\menu.ini", "Config", 2, "1") IniWrite(@ScriptDir & "\menu.ini", "Config", 3, "220") IniWrite(@ScriptDir & "\menu.ini", "GPath", 1, "") IniWrite(@ScriptDir & "\menu.ini", "GPath", 2, "") IniWrite(@ScriptDir & "\menu.ini", "GPath", 3, "") IniWrite(@ScriptDir & "\menu.ini", "GPath", 4, "") IniWrite(@ScriptDir & "\menu.ini", "GPath", 5, "") IniWrite(@ScriptDir & "\menu.ini", "GPath", 6, "") IniWrite(@ScriptDir & "\menu.ini", "GPath", 7, "") IniWrite(@ScriptDir & "\menu.ini", "GPath", 8, "") IniWrite(@ScriptDir & "\menu.ini", "GName", 1, "") IniWrite(@ScriptDir & "\menu.ini", "GName", 2, "") IniWrite(@ScriptDir & "\menu.ini", "GName", 3, "") IniWrite(@ScriptDir & "\menu.ini", "GName", 4, "") IniWrite(@ScriptDir & "\menu.ini", "GName", 5, "") IniWrite(@ScriptDir & "\menu.ini", "GName", 6, "") IniWrite(@ScriptDir & "\menu.ini", "GName", 7, "") IniWrite(@ScriptDir & "\menu.ini", "GName", 8, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 1, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 2, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 3, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 4, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 5, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 6, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 7, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 8, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 9, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 10, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 11, "") IniWrite(@ScriptDir & "\menu.ini", "PPath", 12, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 1, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 2, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 3, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 4, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 5, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 6, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 7, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 8, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 9, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 10, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 11, "") IniWrite(@ScriptDir & "\menu.ini", "PName", 12, "") EndFuncEveryone is free do do whatever they like with it, copy, modify, re-upload... u name it Menu_v1.2.rarMenu_V1.2G.rar Edited December 8, 2007 by BDover
nitekram Posted October 19, 2007 Posted October 19, 2007 Please copy your script from the forum and run it and post your results - thanks. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow."  WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI  CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
BDover Posted October 19, 2007 Author Posted October 19, 2007 Sure... the autoit site was a bit slow yeasterday around the time i posted, so, couldn't change what i alreddy wrote.... but all should be fixed now...
BDover Posted October 22, 2007 Author Posted October 22, 2007 New Version out (v1.2) Fixed a few things (see top of original post) Cheers
BDover Posted November 12, 2007 Author Posted November 12, 2007 Just wanted to check.. Have anyone make any improvements or new features? perhaps addes more slots for applications? even with 16, I run out pretty fast..
Achilles Posted November 13, 2007 Posted November 13, 2007 Nice work! I like the GUI, looks good! The script works good too... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
bubke Posted December 7, 2007 Posted December 7, 2007 Very nice app! Can you explain where I can set more slots for the games? All I want is a pure game launcher and not for applications. Thank you.
BDover Posted December 8, 2007 Author Posted December 8, 2007 Very nice app! Can you explain where I can set more slots for the games? All I want is a pure game launcher and not for applications.Thank you.Just made a "Menu_V1.2G" Works just as u describe... same "set-up", same look... got 12 slots for game shortcuts.. ;D***"Not that offen u get requests, for making a script less complicated, and basicly just deleteing some of the code... Going in the right direction "
bubke Posted December 9, 2007 Posted December 9, 2007 Just made a "Menu_V1.2G" Works just as u describe... same "set-up", same look... got 12 slots for game shortcuts.. ;D***"Not that offen u get requests, for making a script less complicated, and basicly just deleteing some of the code... Going in the right direction "Thank you.
nobbe Posted June 26, 2008 Posted June 26, 2008 $P_name[1] = IniRead(@ScriptDir & "\menu.ini", "PName", "1", "") $P_name[2] = IniRead(@ScriptDir & "\menu.ini", "PName", "2", "") $P_name[3] = IniRead(@ScriptDir & "\menu.ini", "PName", "3", "") $P_name[4] = IniRead(@ScriptDir & "\menu.ini", "PName", "4", "") $P_name[5] = IniRead(@ScriptDir & "\menu.ini", "PName", "5", "") $P_name[6] = IniRead(@ScriptDir & "\menu.ini", "PName", "6", "") $P_name[7] = IniRead(@ScriptDir & "\menu.ini", "PName", "7", "") $P_name[8] = IniRead(@ScriptDir & "\menu.ini", "PName", "8", "") $P_name[9] = IniRead(@ScriptDir & "\menu.ini", "PName", "9", "") $P_name[10] = IniRead(@ScriptDir & "\menu.ini", "PName", "10", "") $P_name[11] = IniRead(@ScriptDir & "\menu.ini", "PName", "11", "") $P_name[12] = IniRead(@ScriptDir & "\menu.ini", "PName", "12", "")
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