Please help me
#include
#include
#include
#include
;gui/menu/launcher prototype (didn't knew how to call it)
;written by taietel
;modify to fit your needs
;===========================================
Global $bToggle = 0, $iItems=10, $iW=500, $iH=330
Global $aButtons[$iItems], $aLabels[$iItems]
;=====================================
;==========================================GUI================================================================================
$hGui = GUICreate("Form1", $iW, $iH, -1, -1, BitOR($WS_POPUP, $WS_BORDER, $WS_CLIPSIBLINGS))
GUISetBkColor(0x000000)
;====================================button=====CLOSE===============================================================
$hExit = GUICtrlCreateIcon("shell32.dll", -28, $iW-24, 8, 16, 16, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlSetTip(-1, "Close...")
GUICtrlSetCursor(-1,0)
;========================text=========text=========text=========text===============================================
GUICtrlCreateEdit("", 10, 10, 185, 110, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN), 0)
GUICtrlSetData(-1, "Press Start or the butterfly"&@CRLF&"to expand/retract, or"&@CRLF&"close... It can be"&@CRLF&"used as a"&@CRLF&"launcher"&@CRLF&"or menu,"&@CRLF&"or whatever...")
GUICtrlSetBkColor(-1,0x000000)
GUICtrlSetState(-1,$GUI_DISABLE)
GUICtrlSetDefColor(0xDEDEDE)
;==============icons & labels======I have a problem here=========I have a problem here==========I have a problem here=====================
For $i=1 To $iItems-1
$aButtons[$i] = GUICtrlCreateIcon("shell32.dll", -7-$i, 8, $iH-40, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlSetCursor(-1,0)
GUICtrlSetState(-1,$GUI_HIDE)
$aLabels[$i]=GUICtrlCreateLabel(" Label"&$i, 48, $iH-30,100,17,$SS_CENTERIMAGE)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
;GUICtrlSetBkColor(-1,0x222222)
GUICtrlSetCursor(-1,0)
GUICtrlSetState(-1,$GUI_HIDE)
Next
;=======================================START BUTTON "TV"=================================================
$aButtons[0] = GUICtrlCreateIcon("shell32.dll", -131, 8, $iH-40, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlSetCursor(-1,0)
GUICtrlSetTip(-1, "Start!")
$aLabels[0]=GUICtrlCreateLabel("TV", 48, $iH-30)
GUICtrlSetTip(-1, "Start!")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor(-1,0)
;=========================================================================================================================
;'''''''''''''''''''''''''''''''problem here''''''''START BUTTON "Radio" '''''''''''''''''''''''''''''''''''''''''''''''''''''''
$aButtons1 = GUICtrlCreateIcon("shell32.dll", -131, 100, $iH-40, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlSetCursor(-1,0)
GUICtrlSetTip(-1, "Start!")
$aLabels1=GUICtrlCreateLabel("Radio", 140, $iH-30)
GUICtrlSetTip(-1, "Start!")
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetCursor(-1,0)
;'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
;================GUI================GUI=================GUI===================GUI=====================GUI=====
GUICtrlCreatePic("", 1, 1, $iW-2, $iH-2, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS), $GUI_WS_EX_PARENTDRAG)
WinSetTrans($hGui,"",220)
GUISetState(@SW_SHOW)
;==============================================================================================================================================
While 1
Sleep(10)
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $hExit
Exit
;============Buttons=====================Buttons==========================Buttons===========================================
Case $aButtons[0], $aLabels[0]
Switch $bToggle
Case 0
For $i=1 To $iItems-1
ControlMove($hGui,"",$aButtons[$i], 8 + 2*$i^2, $iH-40 - $i*32)
GUICtrlSetState($aButtons[$i],$GUI_SHOW)
ControlMove($hGui,"",$aLabels[$i], 48 + 2*$i^2, $iH-30 - $i*32)
GUICtrlSetState($aLabels[$i],$GUI_SHOW)
Sleep(40)
Next
$bToggle=1
Case 1
For $i=$iItems-1 To 1 Step -1
GUICtrlSetState($aButtons[$i],$GUI_HIDE)
ControlMove($hGui,"",$aButtons[$i], 8, $iH-40)
GUICtrlSetState($aLabels[$i],$GUI_HIDE)
ControlMove($hGui,"",$aLabels[$i], 48, $iH-30)
Sleep(20)
Next
$bToggle=0
EndSwitch
;===================================================================================================
Case $aButtons[9],$aLabels[9] ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
;example action:
MsgBox(0,"Here you go","You've pressed " & GUICtrlRead($aLabels[9]))
Case $aButtons[8],$aLabels[8] ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
MsgBox(0,"Here you go","You've pressed " & GUICtrlRead($aLabels[8]))
Case $aButtons[7],$aLabels[7] ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
MsgBox(0,"Here you go","You've pressed " & GUICtrlRead($aLabels[7]))
EndSwitch
WEnd