Jump to content

Icon button


BDover
 Share

Recommended Posts

Hey

Got this wird idea, that I needed a "GUI" with shortcuts to games/programs and anything else i find handy to have quick access to.

The design idea is, to have the icon of the program, thats also a button to launch it, and maby som text above or under the icon. And, if possible, it would look great if the icon got "bigger" at mouseover. (kinda like RocketDock, but ofcause i dont expect the smooth crossover from small to bigger)

This "from small to bigger" is properly not that easy, so lets leave it at first :)

My problem now, how to make the icon a button. Its no problem to make a button with an icon, but that just looks a bit .. well.. boring...

I found this: "How to Create buttons that are like quicklaunch buttons?" - From this forum

I have tryed working with this script a few hours, but the 2. button just wont work properly (insted of beeing an icon/button, it changes between the 2 constantly) Also, if i end up with 15 buttion, i have tryed to make it a bit "simpler" so modyfy to each buttion

Script so far:

#include <GUIConstants.au3>

$GUI = GUICreate("Menu", 500,300)
;GUISetBkColor (0x717171)

$font="Tahoma"
$font_color="0xff0000"


;------------------------------------------------------------------------
; Games
;------------------------------------------------------------------------
$distance = 10
$autodistance = $distance + 23

;Headline
GUISetFont (9, 600, "", $font)
GUICtrlCreateLabel ("Games", 20,$distance)
GUICtrlSetColor(-1,0xffffff)
GuiSetState()

;Border1
GuiCtrlCreateGraphic(10, $autodistance, 480,1)
GUICtrlSetState(-2, $GUI_DISABLE)
GUICtrlSetBkColor(-2,0xffffff)
GuiSetState()


;KNAP 1-----------------------------------------------------------------
GUISetFont (8, 400, "", $font)

$ka1 = 20
$ka2 = 40
$path1 = "C:\Program Files\Winamp\winamp.exe"
$Name = "Winamp"


$ka3 = $ka1 + 4
$ka4 = $ka2 + 4
$ka5 = $ka1 + 0
$ka6 = $ka2 + 45

$1 = GUICtrlCreateIcon($path1,1,$ka3,$ka4,32,32)
GUICtrlSetState($1, $GUI_DISABLE)
$2 = GUICtrlCreateButton("File", $ka1, $ka2, 40, 40,$BS_ICON)
GUICtrlSetImage ($2, $path1,1)
GUICtrlSetState($2,$GUI_HIDE)
GUISetState()

GUICtrlCreateLabel ($Name, $ka5,$ka6)
GUICtrlSetColor(-1,0xffffff)
GuiSetState()

;KNAP 2-----------------------------------------------------------------
GUISetFont (8, 400, "", $font)

$ka1 = 100
$ka2 = 40
$path2 = "C:\Program Files\Movie Maker\moviemk.exe"
$Name = "Movie Maker"


$ka3 = $ka1 + 4
$ka4 = $ka2 + 4
$ka5 = $ka1 + 0
$ka6 = $ka2 + 45

$3 = GUICtrlCreateIcon($path2,1,$ka3,$ka4,32,32)
GUICtrlSetState($3, $GUI_DISABLE)
$4 = GUICtrlCreateButton("File", $ka1, $ka2, 40, 40,$BS_ICON)
GUICtrlSetImage ($4, $path2,-1)
GUICtrlSetState($4,$GUI_HIDE)
GUISetState()

GUICtrlCreateLabel ($Name, $ka5,$ka6)
GUICtrlSetColor(-1,0xffffff)
GuiSetState()


While 1

    $m = GUIGetMsg()


    If $m = -3 then Exit
  
    $c = GUIGetCursorInfo($GUI)
    
    If $c[4] = $1 Then
        GUICtrlSetState( $2, $GUI_SHOW)
        GUICtrlSetState( $1, $GUI_HIDE)
    ;Sleep(100)
        $c = GUIGetCursorInfo($GUI)
            While $c[4] = $2
                If GUIGetMsg() = $2 Then Do_Function()
                $c = GUIGetCursorInfo($GUI)
            WEnd
        GUICtrlSetState( $2, $GUI_HIDE)
        GUICtrlSetState( $1, $GUI_SHOW)
    
    ElseIf $c[4] = $3 Then
        GUICtrlSetState( $4, $GUI_SHOW)
        GUICtrlSetState( $3, $GUI_HIDE)
    ;Sleep(100)
        $c = GUIGetCursorInfo($GUI)
            While $c[4] = $4
                If GUIGetMsg() = $4 Then Do_Function2()
                $c = GUIGetCursorInfo($GUI)
            WEnd
        GUICtrlSetState( $4, $GUI_HIDE)
        GUICtrlSetState( $3, $GUI_SHOW)
        
    EndIf


WEnd

Func Do_Function()
    MsgBox(0x0, "tset", "OK.....    ", 3)
EndFunc

Func Do_Function2()
    MsgBox(0x0, "tset", "OK.....    ", 3)
EndFunc

My question now, is it possible to make a button, with an icon, but change the background color of the button to the same as the background color of the GUI?

And then remove the "border" or "frame" of the button? Even bether, make the background of the button transparrent, so any background (not just a color) could be used in the GUI...

Im open for all ideas ;)

Dover

Edited by BDover
Link to comment
Share on other sites

We happened to wrk on these ideas recently

#include <GUIConstants.au3>

$GUI = GUICreate("My GUI")
$ic = GUICtrlCreateIcon("shell32.dll",22,4,4,32,32)
GUICtrlSetState(-1, $GUI_DISABLE)
$b = GUICtrlCreateButton("File", 0, 0, 40, 40,$BS_ICON)
GUICtrlSetImage (-1, "shell32.dll",22)
GUICtrlSetState(-1,$GUI_HIDE)

;GUICtrlSetState(-1, $GUI_DISABLE)

GUISetState()


While 1

    $m = GUIGetMsg()
  
    If $m = -3 then Exit
  
    $c = GUIGetCursorInfo($GUI)
    If $c[4] = $ic Then
        GUICtrlSetState( $b, $GUI_SHOW)
        GUICtrlSetState( $ic, $GUI_HIDE)
    ;Sleep(100)
        $c = GUIGetCursorInfo($GUI)
            While $c[4] = $b
                If GUIGetMsg() = $b Then Do_Function()
                $c = GUIGetCursorInfo($GUI)
            WEnd
        GUICtrlSetState( $b, $GUI_HIDE)
        GUICtrlSetState( $ic, $GUI_SHOW)
    EndIf
WEnd

Func Do_Function()
    MsgBox(0x0, "tset", "OK.....    ", 3)
EndFuncoÝ÷ Ú·ªº*Þ°*'¶º%Þ­«­¢+Ø¥¹±Õ±ÐíÕ¥
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±Ðí}
½¹Ñɽ±!½ÙȹÔÌÐì()=ÁÐ ÅÕ½ÐíÕ¥½¹Ù¹Ñµ½ÅÕ½Ðì°Ä¤(ÀÌØíѹ}½±½ÈôÁàÝåà(ÀÌØí½ÙÉ}½±½ÈôÁàÝÕà(ÀÌØí
ÑɱQµÀôÅÕ½ÐìÅÕ½Ðì((ÀÌØíU%5¥¸ôÕ¥
ÉÑ ÅÕ½ÐìÅÕ½Ðì°ÔÀÀ°ÈÀÀ°¡Í­Ñ½Á]¥Ñ ´ÔÀÀ¤¼È°¡Í­Ñ½Á!¥¡Ð´ÈÀÀ¤¼È¤)U%MÑ=¹Ù¹Ð ´Ì°ÅÕ½Ðí}¹ÅÕ½Ðì¤((ÀÌØí1¥ÍÐôU%
Ñɱ
ÉÑ
½µ¼ ÅÕ½ÐìÅÕ½Ðì°ØÀ°ÄÔ°ÄÀÀ°ÈÀ¤)U%
ÑɱMÑÑ ´Ä°ÅÕ½ÐíQ¡¥ÍñQ¡ÑñQ¡½Ñ¡ÉñQ¡¥ÌÝåñQ¡ÐÝåñ]¡¥ ]åðÅÕ½Ðì¤()¥´ÀÌØíÁ±Á¡  ѹlÈÙt)¥´ÀÌØí¡AÉ¥  ½½­lÌÅt(ÀÌØíÁ`ôÄÀ(ÀÌØíÁÍôØÐ(½ÈÀÌØí¤ôÄѼU   ½Õ¹ ÀÌØíÁ±Á¡ Ѹ¤´Ä(ÀÌØíÁͬôÄ(ÀÌØíÁ`¬ôÄÔ(ÀÌØí¡AÉ¥   ½½­lÀÌØí¥tôU%
Ñɱ
ÉÑ    ÕÑѽ¸¡
¡È ÀÌØíÁͤ°ÀÌØíÁ`°ÜÔ°ÄÌ°Äܤ(}
½¹Ñɽ±!½ÙÈ È°ÅÕ½ÐìÅÕ½Ðì°ÀÌØí¡AÉ¥   ½½­lÀÌØí¥t¤ì½¹Ñɽ±Ì¡É(U%
ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí}չѥ½¸ÅÕ½Ðì¤(U%
ÑɱMÑ   ­
½±½È ´Ä°ÀÌØíѹ}½±½È¤(U%
ÑɱMѽ¹Ð ´Ä°Ø¤(9áÐ((ÀÌØí
±½ÍôÕ¥
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí
±½ÍÅÕ½Ðì°ÄÀÀ°ÄÈÀ°ÄÀÀ°ÌÀ¤)U%
ÑɱMÑ=¹Ù¹Ð ÀÌØí
±½Í°ÅÕ½Ðí}¹ÅÕ½Ðì¤()Õ¥MÑMÑÑ ¤)]¡¥±Ä(M±À Ô¤(ÀÌØí=ÙÈô}
½¹Ñɽ±!½ÙÈ À°ÀÌØíU%5¥¸¤(%ÀÌØí=ÙÈôÄQ¡¸(ÀÌØíѵÁ%ôáѹ(½ÈÀÌØíàôÄѼսչ ÀÌØí¡AÉ¥    ½½¬¤´Ä(%ÀÌØíѵÁ%ôÀÌØí¡AÉ¥  ½½­lÀÌØíátQ¡¸(!½ÙÉ}Õ¹ ÀÌØí¡AÉ¥    ½½­lÀÌØíát¤(á¥Ñ1½½À(¹%(9áÐ(¹%)]¹()Õ¹!½ÙÉ}Õ¹ ÀÌØí
Ñɱ%¤(%ÀÌØí
Ñɱ%ôÀÌØí
ÑɱQµÀQ¡¸IÑÕɸ(U%
ÑɱMÑ   ­
½±½È ÀÌØí
ÑɱQµÀ°ÀÌØíѹ}½±½È¤(U%
ÑɱMÑ   ­
½±½È ÀÌØí
Ñɱ%°ÀÌØí½ÙÉ}½±½È¤(ÀÌØí
ÑɱQµÀôÀÌØí
Ñɱ%)¹Õ¹()Õ¹}¹ ¤(á¥Ð)¹Õ¹()Õ¹}չѥ½¸ ¤(5Í  ½à ÁàÀ°ÅÕ½ÐíAÉÍÍÅÕ½Ðì°U%
ÑɱI¡U%}
Ñɱ%¤°Ì¤)¹Õ¹

And one that is already made... and Awesome

Sliding Toolbar

http://www.autoitscript.com/forum/index.ph...st&p=181596

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Nice... well. was aiming for something like that... But was hoping is was possible to chance the background color, and remove the "button look". that way i would just look like an icon u could press.

Besides that, sweet bar...

Overall.. looks like i aimed a bit over my head here :)

Edited by BDover
Link to comment
Share on other sites

Well.. it didn't end up 100% as planed, but stille, think its ok...

Got room for 8 "games shortcuts" and 8 "applications shortcuts" the first 4 shortcuts (for each group) are shown in a row horisontaly, next 4 in another row under them.

The Menu changes "hight" acording to how many rows u use, and ofcause it makes room for the 2. row of icons.

The menu automaticly "detects" which shortcutspaces that u are using, and removes the ones u dont use.

So, basicly, all u got to do, is type in the path of the desired shorcut, and its name, then the menu does the rest.

Example:

(close and minimize button are NOT a part of the GUI design)

Posted Image

(this is the first part of the script, which u need to set up)

------------------------------------------------------------------------

; CONFIG PATH AND TITEL OF ICONS

;------------------------------------------------------------------------

;Games---------------------------------------------

$path1 = "C:\Windows\system32\mspaint.exe"

$name1 = "Paint"

$path2 = ""

$name2 = ""

...

$path8 = ""

$name8 = ""

;Programmer---------------------------------------------------

$path9 = "C:\Windows\system32\notepad.exe"

$name9 = "Notepad"

$path10 = ""

$name10 = ""

...

$path16 = ""

$name16 = ""

;Transparent set---------------------------------------------------

$trans = 220

;------------------------------------------------------------------------

; CONFIG END

;------------------------------------------------------------------------

Next up... if i get time... a "add shorcut button" got no idea how, but im sure i can find som guide or something in this forum ;)

Feel free to use it if u can...

#include <GUIConstants.au3>

;------------------------------------------------------------------------
; CONFIG PATH AND TITEL OF ICONS
;------------------------------------------------------------------------

;Games---------------------------------------------

$path1 = "C:\Windows\system32\mspaint.exe"
$name1 = "Paint"

$path2 = ""
$name2 = ""

$path3 = ""
$name3 = ""

$path4 = ""
$name4 = ""

$path5 = ""
$name5 = ""

$path6 = ""
$name6 = ""

$path7 = ""
$name7 = ""

$path8 = ""
$name8 = ""

;Programmer---------------------------------------------------

$path9 = "C:\Windows\system32\notepad.exe"
$name9 = "Notepad"

$path10 = ""
$name10 = ""

$path11 = ""
$name11 = ""

$path12 = ""
$name12 = ""

$path13 = ""
$name13 = ""

$path14 = ""
$name14 = ""

$path15 = ""
$name15 = ""

$path16 = ""
$name16 = ""

;Transparent set---------------------------------------------------

$trans = 220

;------------------------------------------------------------------------
; CONFIG END
;------------------------------------------------------------------------


;Run FIX--------------------------- dont mind this ;)
$run1 = 1
$run2 = 1
$run3 = 1
$run4 = 1
$run5 = 1
$run6 = 1
$run7 = 1
$run8 = 1
$run9 = 1
$run10 = 1
$run11 = 1
$run12 = 1
$run13 = 1
$run14 = 1
$run15 = 1
$run16 = 1
;Run FIX end-------------------------- 

If $path5 & $path6 & $path7 & $path8 & $path13 & $path14 & $path15 & $path16 = "" Then
    $menuh = 210
    $distance2 = 100
ElseIf $path5 & $path6 & $path7 & $path8 = "" Then
    $menuh = 270
    $distance2 = 100
ElseIf $path13 & $path14 & $path15 & $path16 = "" Then
    $menuh = 270
    $distance2 = 160
Else
    $menuh = 330
    $distance2 = 160
Endif

$menub = 550

$font="Tahoma"
$font_color="0xff0000"

$main = GUICreate("Menu", $menub,$menuh)
$bgcolor = GUISetBkColor (0x717171)
GuiSetState()

;------------------------------------------------------------------------
;Slider - Transparent
;------------------------------------------------------------------------
;SET..!
$sliderb = 50
$sliderh = 15
$slider_start = $trans
;SET..!

$sliderX = $menub - $sliderb - 5
$sliderY = $menuh - $sliderh - 5
$Sliderfix = 1
$SliderbuttonX = $sliderX - 20
$transtextX = $SliderbuttonX - 75

$Slider = GuiCtrlCreateSlider($sliderX, $sliderY, $sliderb, $sliderh,$TBS_NOTICKS + $TBS_BOTH)
GUICtrlSetLimit($Slider, 255, 10)
GUICtrlSetData($Slider, 255)
GUISetState()
$old = GUICtrlRead($Slider)

If $sliderfix = 1 Then 
    GUICtrlSetData($Slider, $slider_start)
    $sliderfix = 0
EndIf

;Slider button---------------------------
$sliderbutton1 = GUICtrlCreateButton("", $SliderbuttonX, $sliderY, 15, 15)

;slider text


GUISetFont (7, 400, "", $font)
GUICtrlCreateLabel ("Transparent set:", $transtextX,$sliderY)
GUICtrlSetColor(-1,0xffffff)
GuiSetState()

;------------------------------------------------------------------------
; Games
;------------------------------------------------------------------------
$distance = 10
$autodistance = $distance + 23

;Headline-------------------------------------
GUISetFont (9, 600, "", $font)
GUICtrlCreateLabel ("Games", 20,$distance)
GUICtrlSetColor(-1,0xffffff)
GuiSetState()

;Border1-------------------------------------
$borderb = $menub - 20
GuiCtrlCreateGraphic(10, $autodistance, $borderb,1)
GUICtrlSetState(-2, $GUI_DISABLE)
GUICtrlSetBkColor(-2,0xffffff)
GuiSetState()

;------------------------------------------------------------------------
; Programmer
;------------------------------------------------------------------------
$autodistance2 = $distance2 + 23

;Headline------------------------------------
GUISetFont (9, 600, "", $font)
GUICtrlCreateLabel ("Programmer", 20,$distance2)
GUICtrlSetColor(-1,0xffffff)
GuiSetState()

;Border1-------------------------------------
$borderb = $menub - 20
GuiCtrlCreateGraphic(10, $autodistance2, $borderb,1)
GUICtrlSetState(-2, $GUI_DISABLE)
GUICtrlSetBkColor(-2,0xffffff)
GuiSetState()

;------------------------------------------------------------------------
; Showoff
;------------------------------------------------------------------------

$showoffX = 10
$showoffY = $menuh - 20

GUISetFont (7, 400, 2, $font)
GUICtrlCreateLabel ("Menu v1.0 - Dover Dezign - 2007", $showoffX,$showoffY)
GUICtrlSetColor(-1,0xffffff)



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


;Game 1---------------------------------------------------
    $path = $path1 ;<---------- change path"X"
    $name = $name1 ;<---------- change name"X"

            $iconX = 20
            $iconY = $autodistance + 12
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run1 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Game 2---------------------------------------------------
    $path = $path2 ;<---------- change path"X"
    $name = $name2 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run2 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Game 3---------------------------------------------------
    $path = $path3 ;<---------- change path"X"
    $name = $name3 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run3 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Game 4---------------------------------------------------
    $path = $path4 ;<---------- change path"X"
    $name = $name4 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run4 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Game 5---------------------------------------------------
    $path = $path5 ;<---------- change path"X"
    $name = $name5 ;<---------- change name"X"

            $iconX = 20
            $iconY = $iconY + 60
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run5 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Game 6---------------------------------------------------
    $path = $path6 ;<---------- change path"X"
    $name = $name6 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run6 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Game 7---------------------------------------------------
    $path = $path7 ;<---------- change path"X"
    $name = $name7 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run7 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Game 8---------------------------------------------------
    $path = $path8 ;<---------- change path"X"
    $name = $name8 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run8 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Programmer---------------------------------------------

;Pro 1---------------------------------------------------
    $path = $path9 ;<---------- change path"X"
    $name = $name9 ;<---------- change name"X"

            $iconX = 20
            $iconY = $autodistance2 + 12
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run9 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf


;Pro 2---------------------------------------------------
    $path = $path10 ;<---------- change path"X"
    $name = $name10 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run10 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf



;Pro 3---------------------------------------------------
    $path = $path11 ;<---------- change path"X"
    $name = $name11 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run11 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf



;Pro 4---------------------------------------------------
    $path = $path12 ;<---------- change path"X"
    $name = $name12 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run12 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf



;Pro 5---------------------------------------------------
    $path = $path13 ;<---------- change path"X"
    $name = $name13 ;<---------- change name"X"

            $iconX = 20
            $iconY = $iconY + 60
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run13 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf

;Pro 6---------------------------------------------------
    $path = $path14 ;<---------- change path"X"
    $name = $name14 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run14 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf

;Pro 7---------------------------------------------------
    $path = $path15 ;<---------- change path"X"
    $name = $name15 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run15 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf

;Pro 7---------------------------------------------------
    $path = $path16 ;<---------- change path"X"
    $name = $name16 ;<---------- change name"X"

            $iconX = $iconX + 130
            $iconY = $iconY
            GUISetFont (9, 400, "", $font)
            GuiSetState()
            
            $LabelX = $iconX + 40
            $LabelY = $iconY
            $buttonX = $iconX + 40
            $buttonY = $iconY + 15
            
            If $path = "" Then
                    Sleep(1)
            else
                GUICtrlCreateIcon($path,-1,$iconX,$iconY,35,35)
                GUICtrlCreateLabel ($name, $LabelX,$LabelY)
                GUICtrlSetColor(-1,0xffffff)
                GUISetState()
                    
                    
                $run16 = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
                GUISetState()
            EndIf

While 1
    
    If GUICtrlRead($Slider) <> $old Then
        WinSetTrans($main, "", GUICtrlRead($Slider))
        $old = GUICtrlRead($Slider)
    EndIf
    
    $msg = GuiGetMsg()
    
    
        
    If $msg = -3 then Exit
    
    If  $msg = $sliderbutton1 Then Slider_start()
    
    If $msg = $run1 Then Do_Function_1()
    
    If $msg = $run2 Then Do_Function_2()
    If $msg = $run3 Then Do_Function_3()
    If $msg = $run4 Then Do_Function_4()
    If $msg = $run5 Then Do_Function_5()
    If $msg = $run6 Then Do_Function_6()
    If $msg = $run7 Then Do_Function_7()
    If $msg = $run8 Then Do_Function_8()
    If $msg = $run9 Then Do_Function_9()
    If $msg = $run10 Then Do_Function_10()
    if $msg = $run11 Then Do_Function_11()
    If $msg = $run12 Then Do_Function_12()
    If $msg = $run13 Then Do_Function_13()
    If $msg = $run14 Then Do_Function_14()
    If $msg = $run15 Then Do_Function_15()
    If $msg = $run16 Then Do_Function_16()
    
    
WEnd

Func Slider_start()
    GUICtrlSetData($Slider, $slider_start)
EndFunc

Func Do_Function_1()
    Run ($path1)
    Exit
EndFunc

Func Do_Function_2()
    Run ($path2)
    Exit
EndFunc

Func Do_Function_3()
    Run ($path3)
    Exit
EndFunc

Func Do_Function_4()
    Run ($path4)
    Exit
EndFunc

Func Do_Function_5()
    Run ($path5)
    Exit
EndFunc

Func Do_Function_6()
    Run ($path6)
    Exit
EndFunc

Func Do_Function_7()
    Run ($path7)
    Exit
EndFunc

Func Do_Function_8()
    Run ($path8)
    Exit
EndFunc

Func Do_Function_9()
    Run ($path9)
    Exit
EndFunc

Func Do_Function_10()
    Run ($path10)
    Exit
EndFunc

Func Do_Function_11()
    Run ($path11)
    Exit
EndFunc

Func Do_Function_12()
    Run ($path12)
    Exit
EndFunc

Func Do_Function_13()
    Run ($path13)
    Exit
EndFunc

Func Do_Function_14()
    Run ($path14)
    Exit
EndFunc

Func Do_Function_15()
    Run ($path15)
    Exit
EndFunc

Func Do_Function_16()
    Run ($path16)
    Exit
EndFunc

And yeah... Paint IS a game of mine... Got that much of a life ;)

Edited by BDover
Link to comment
Share on other sites

Tricked out... just a little

#include <GUIConstants.au3>
#NoTrayIcon

Opt("TrayOnEventMode",1)
Opt("TrayMenuMode",1)   

TraySetOnEvent($TRAY_EVENT_PRIMARYUP, "Minimize")

;------------------------------------------------------------------------
; CONFIG PATH AND TITEL OF ICONS
;------------------------------------------------------------------------

;Games---------------------------------------------

$G_path = StringSplit("C:\Windows\system32\mspaint.exe,C:\Program Files\Internet Explorer\iexplore.exe,C:\WINDOWS\system32\osk.exe," & _
"C:\Program Files\Windows Media Player\wmplayer.exe,C:\WINDOWS\system32\notepad.exe,C:\WINDOWS\system32\calc.exe,C:\WINDOWS\system32\mstsc.exe," & _
"C:\WINDOWS\system32\cleanmgr.exe", ",")
$G_name = StringSplit("Paint,IE Explorer,Keyboard,Media Player,Notepad,Calculator,Net Service,Clean Mngr", ",")

;Programmer---------------------------------------------------

$P_path = StringSplit("C:\Windows\system32\notepad.exe", ",")
$P_name = StringSplit("Notepad", ",")

;Transparent set---------------------------------------------------

$trans = 220

$menuh = 210 ;330
$menub = 550
$distance2 = 100

;------------------------------------------------------------------------
; CONFIG END
;------------------------------------------------------------------------

If UBound($G_name) >= 5 then 
    $menuh += 60
    $distance2 += 60
EndIf
If UBound($P_name) >= 5 then 
    $menuh += 60
EndIf

$font="Tahoma"
$font_color="0xff0000"

$main = GUICreate("Auto Menu", $menub,$menuh)
$bgcolor = GUISetBkColor (0x717171)
GUISetFont (7, 400, "", $font)

;------------------------------------------------------------------------
;Slider - Transparent
;------------------------------------------------------------------------
;SET..!
$sliderb = 50
$sliderh = 15
$slider_start = $trans
$old = ""
;SET..!

$sliderX = $menub - $sliderb - 5
$sliderY = $menuh - $sliderh - 5
$SliderbuttonX = $sliderX - 20
$transtextX = $SliderbuttonX - 75

$Slider = GuiCtrlCreateSlider($sliderX, $sliderY, $sliderb, $sliderh,$TBS_NOTICKS + $TBS_BOTH)
GUICtrlSetLimit($Slider, 255, 10)
GUICtrlSetData($Slider, $slider_start)

;Slider button---------------------------
$sliderbutton1 = GUICtrlCreateButton("+", $SliderbuttonX, $sliderY, 15, 15)

;slider text
GUICtrlCreateLabel ("Transparent set:", $transtextX,$sliderY)
GUICtrlSetColor(-1,0xffffff)

;------------------------------------------------------------------------
; Games
;------------------------------------------------------------------------
$distance = 10
$autodistance = $distance + 23

;Headline-------------------------------------
GUISetFont (9, 600, "", $font)
GUICtrlCreateLabel ("Games", 20,$distance)
GUICtrlSetColor(-1,0xffffff)

;Border1-------------------------------------
$borderb = $menub - 20
GuiCtrlCreateGraphic(10, $autodistance, $borderb,1)
GUICtrlSetState(-2, $GUI_DISABLE);?????
GUICtrlSetBkColor(-2,0xffffff) ;?????

;------------------------------------------------------------------------
; Programmer
;------------------------------------------------------------------------
$autodistance2 = $distance2 + 23

;Headline------------------------------------
GUICtrlCreateLabel ("Programmer", 20,$distance2)
GUICtrlSetColor(-1,0xffffff)


;Border1-------------------------------------
$borderb = $menub - 20
GuiCtrlCreateGraphic(10, $autodistance2, $borderb,1)
GUICtrlSetState(-2, $GUI_DISABLE)
GUICtrlSetBkColor(-2,0xffffff)

;------------------------------------------------------------------------
; Showoff
;------------------------------------------------------------------------

$showoffX = 10
$showoffY = $menuh - 20

GUISetFont (7, 400, 2, $font)
GUICtrlCreateLabel ("Menu v1.0 - Dover Dezign - 2007", $showoffX,$showoffY)
GUICtrlSetColor(-1,0xffffff)

;------------------------------------------------------------------------------------------------------------------------------------------------------------
;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]

    GUICtrlCreateIcon($G_path[$x],-1,$iconX,$iconY,35,35)
    GUICtrlCreateLabel ($G_name[$x], $LabelX,$LabelY)
    GUICtrlSetColor(-1,0xffffff)
    $G_run[$x] = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
    
    $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]
    GUICtrlCreateIcon($P_path[$x],-1,$iconX,$iconY,35,35)
    GUICtrlCreateLabel ($P_name[$x], $LabelX,$LabelY)
    GUICtrlSetColor(-1,0xffffff)
                   
    $P_run[$x] = GUICtrlCreateButton("GO", $buttonX, $buttonY, 30, 20) ;<------------- change run"X"
              

    $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

GUISetState()

While 1
    If GUICtrlRead($Slider) <> $old Then
        WinSetTrans($main, "", GUICtrlRead($Slider))
        $old = GUICtrlRead($Slider)
    EndIf
   
    $msg = GuiGetMsg()
   
    If $msg = -3 then Exit
    
    If  $msg = $GUI_EVENT_MINIMIZE Then
        GuiSetState(@SW_HIDE)
        TraySetState(1)
    EndIf
   
    If  $msg = $sliderbutton1 Then GUICtrlSetData($Slider, $slider_start)
   
    for $x = 1 to $G_name[0]
        If $msg = $G_run[$x] Then
            If FileExists($G_path[$x]) Then
                Run (FileGetShortName($G_path[$x]))
                GuiSetState(@SW_HIDE)
                TraySetState(1)
            Else
                MsgBox(0x0, "Error", "The file could not be found    " & @CRLF & $G_path[$x] & "   ", 4)
            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]))
                GuiSetState(@SW_HIDE)
                TraySetState(1)
            Else
                MsgBox(0x0, "Error", "The file could not be found    " & @CRLF & $P_path[$x] & "   ", 4)
            EndIf
        EndIf
    Next
WEnd

Func Minimize()
    TraySetState(2)
    GuiSetState(@SW_SHOW)
EndFunc

8)

NEWHeader1.png

Link to comment
Share on other sites

Thx for the "Tricked out" version... Kind of u to use your time on it :)

In my many years.. naa.. mounths... well.. days as a "programmer" i couldn't have made it that nice myself. ;)

Small thing ...

"TraySetOnEvent($TRAY_EVENT_PRIMARYUP, "Minimize")

makes an error

"TraySetOnEvent(^ERROR" ----> Variable use without beeing declared

If i disable it, it (ofcause) dosn't "popup" from icon tray, acualy its just locked down there...

after a few hours... i figured out, that if i change it to:

TraySetOnEvent(-8,"Minimize")

its all good :P

Perhaps a small "rightclick menu" with "exit" would come in handy... "Autoedit Hepfile ... cheer"

Edited by BDover
Link to comment
Share on other sites

In my many years.. naa.. mounths... well.. days as a "programmer" i couldn't have made it that nice myself. ;)

In Val's many years as a programer... :)

See what happens it you replace $TRAY_EVENT_PRIMARYUP, with -8?

Link to comment
Share on other sites

EDIT1: figured out question 2

EDIT2: figured out question 3 ... i propely should try before asking :)

Now for a tricky part...

As said, a "add shortcut" button could be nice... a list of questions incomming, so hold on ;)

1) Is it possible to make the C:\Windows\system32\mspaint.exe ..... in ..... $G_path = StringSplit("C:\Windows\system32\mspaint.exe a read from a ini?

2) but, when i come to "refecrence" 6 or 7 and i dont want a shortcut, i properly still got to make "ini read" in the string,... is it possible to make a ini read thats "nothing"? (blank)

3) And if so.. i noticed if i forinstance leave "shortcut" 6 in [games] blank (with a dobble ",") $G_path = StringSplit( "C:\Win. .... notepad.exe,,C:\WINDOWS\sy .... It still shows the "GO" button.. anyway to change this?

4) is there a function to "restart" my main GUI after the changes has been made in the ini?

5) Would it slow the "GUI" down if i split the $G_path = StringSplit into "$G_path[1], $G_path[2], $G_path[3]... ? (this would be way more easy for me to work with) :P

6) And final question. If I in anyway are to suceed this "challenge", i might have to copy some of the parts from "Sliding Toolbar"... whats the policy on this? Ofcause I would ask the creator(s) first, u beening one of em Valuater :P... And since one of u properly wrote 2/3 of the "add shortcut"script im ending up useing (and i just copied it) , perhaps your names in the bottom would be appropriate...

Dover...

Edited by BDover
Link to comment
Share on other sites

Sure, use the info from "Sliding Toolbar"

In fact I used the ini for this,just removed the unnecessary info

ini file

[Launch]
1=C:\Program Files\Internet Explorer\iexplore.exe
2=C:\WINDOWS\system32\osk.exe
3=C:\Program Files\Windows Media Player\wmplayer.exe
4=C:\WINDOWS\system32\notepad.exe
5=C:\WINDOWS\system32\calc.exe
6=C:\WINDOWS\system32\mstsc.exe
7=C:\WINDOWS\system32\cleanmgr.exe
[Label]
1=IE Explorer
2=Keyboard
3=Media Player
4=Notepad
5=Calculator
6=Net Service
7=Clean Mngr
[Config]
1=255
2=1

The stringSplit will be change to an iniread(), however you can use the info the same way, again look at sliding toolbar

Just keep on it, we will all help you

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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 files

Screens:

Posted Image

Posted Image

Menu.au3

[autoit]#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_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", "")

$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] = "" Then

ElseIf $G_path[5] & $G_path[6] & $G_path[7] & $G_path[8] = "" Then

$menuh += 60

ElseIf $P_path[5] & $P_path[6] & $P_path[7] & $P_path[8] = "" Then

$menuh += 60

$distance2 += 60

Else

$menuh += 120

$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 ("Programmer", 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.1 - 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

$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]))

GuiSetState(@SW_HIDE)

TraySetState(1)

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]))

GuiSetState(@SW_HIDE)

TraySetState(1)

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", "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, "")

EndFunc

Edited by BDover
Link to comment
Share on other sites

it got ALL MEESED UP..

IniWrite(@ScriptDir & "\menu.ini", "PName", 7, "")
    IniWrite(@ScriptDir & "\menu.ini", "PName", 8, "")
EndFuncoÝ÷ Ù±Ö®ßöÚºÚ"µÍÚ[ÛYH ÑÕRPÛÛÝ[Ë]LÉÝÂÌÍÙÛI][ÝÕZÛXI][ÝÂÌÍÙÛØÛÛÜI][ÝÌ][ÝÂÌÍÙÛØÛÛÜI][ÝÌ     ][ÝÂÌÍÙÛØÛÛÜÏI][ÝÌ    ][ÝÂÕRTÙ]Û
L
    ][ÝÉ][ÝË   ÌÍÙÛ
BËKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKBÒSH[BËKKKKKKKKKKKK
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKBYÝ[Q^ÝÊØÜ  [È  ][ÝÉÌLÛY[K[I][ÝÊH[ÜX]WÚ[J
B[UÜ]JØÜ [È ][ÝÉÌLÛY[K[I][ÝË  ][ÝÐÛÛYÉ][ÝË ][ÝÌI][ÝÊBËKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKBÒSHXY
ËKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKBÌÍÑ×Ü]HÝ[ÔÜ]
    ][ÝË  ][ÝË ][ÝË   ][ÝÊBÌÍÑ×Û[YHHÝ[ÔÜ]
    ][ÝË  ][ÝË ][ÝË   ][ÝÊBÌÍÑ×Ü]ÌWHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÔ]  ][ÝË   ][ÝÌI][ÝË ][ÝÉ][ÝÊBÌÍÑ×Ü]ÌHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÔ]  ][ÝË   ][ÝÌ][ÝË ][ÝÉ][ÝÊBÌÍÑ×Ü]Ì×HH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÔ]  ][ÝË   ][ÝÌÉ][ÝË ][ÝÉ][ÝÊBÌÍÑ×Ü]ÍHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÔ]  ][ÝË   ][ÝÍ ][ÝË  ][ÝÉ][ÝÊBÌÍÑ×Ü]ÍWHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÔ]  ][ÝË   ][ÝÍI][ÝË ][ÝÉ][ÝÊBÌÍÑ×Ü]ÍHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÔ]  ][ÝË   ][ÝÍ][ÝË ][ÝÉ][ÝÊBÌÍÑ×Ü]Í×HH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÔ]  ][ÝË   ][ÝÍÉ][ÝË ][ÝÉ][ÝÊBÌÍÑ×Ü]ÎHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÔ]  ][ÝË   ][ÝÎ ][ÝË  ][ÝÉ][ÝÊBÌÍÑ×Û[YVÌWHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÓ[YI][ÝË  ][ÝÌI][ÝË    ][ÝÉ][ÝÊBÌÍÑ×Û[YVÌHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÓ[YI][ÝË  ][ÝÌ][ÝË ][ÝÉ][ÝÊBÌÍÑ×Û[YVÌ×HH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÓ[YI][ÝË  ][ÝÌÉ][ÝË   ][ÝÉ][ÝÊBÌÍÑ×Û[YVÍHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÓ[YI][ÝË  ][ÝÍ   ][ÝË ][ÝÉ][ÝÊBÌÍÑ×Û[YVÍWHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÓ[YI][ÝË  ][ÝÍI][ÝË    ][ÝÉ][ÝÊBÌÍÑ×Û[YVÍHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÓ[YI][ÝË  ][ÝÍ][ÝË ][ÝÉ][ÝÊBÌÍÑ×Û[YVÍ×HH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÓ[YI][ÝË  ][ÝÍÉ][ÝË   ][ÝÉ][ÝÊBÌÍÑ×Û[YVÎHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÑÓ[YI][ÝË  ][ÝÎ   ][ÝË ][ÝÉ][ÝÊBÌÍÔÜ]HÝ[ÔÜ]
    ][ÝË  ][ÝË ][ÝË   ][ÝÊBÌÍÔÛ[YHHÝ[ÔÜ]
    ][ÝË  ][ÝË ][ÝË   ][ÝÊBÌÍÔÜ]ÌWHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÔ]  ][ÝË   ][ÝÌI][ÝË ][ÝÉ][ÝÊBÌÍÔÜ]ÌHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÔ]  ][ÝË   ][ÝÌ][ÝË ][ÝÉ][ÝÊBÌÍÔÜ]Ì×HH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÔ]  ][ÝË   ][ÝÌÉ][ÝË ][ÝÉ][ÝÊBÌÍÔÜ]ÍHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÔ]  ][ÝË   ][ÝÍ ][ÝË  ][ÝÉ][ÝÊBÌÍÔÜ]ÍWHH[TXY
ØÜ   [È   ][ÝÉÌLÛY[K[I][ÝË ][ÝÔ]  ][ÝË   ][ÝÍ

8(

NEWHeader1.png

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...