Hab vor langer zeit auchmal was gebaut, als mir langweilig war und ich nich wusste was ich tun sollte is aber nie vertig geworden (hatte da dann doch was anderes zutun )
Code
#include <GUIConstants.au3>
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 1)
;############
;Variablen
;############
Global $oldread = 1
Global $downloaditem[100]
Global $read
;############
;Options
;############
AdlibEnable("_checkread",500)
;############
;Gui
;############
$Form1 = GUICreate("AForm1", 333, 150, 193, 116)
GUISetBkColor(0x000000)
$inp_down = GUICtrlCreateInput("1", 8, 8, 81, 21)
GUICtrlSetLimit(-1,2)
$ud = GUICtrlCreateUpdown(-1)
GUICtrlSetLimit(-1,99,1)
$List_Download = GUICtrlCreateListView("", 8, 32, 81, 110,$LVS_LIST,$WS_HSCROLL)
$downloaditem[1] = GUICtrlCreateListViewItem("Download 01",-1)
$prog_mom = GUICtrlCreateProgress(96, 32, 222, 16,$PBS_SMOOTH)
GUICtrlSetBkColor(-1,0x660)
GUICtrlSetColor(-1,0xFFFFFF)
GUICtrlSetData(-1,"50")
$prog_full = GUICtrlCreateProgress(96, 56, 222, 16,$PBS_SMOOTH)
GUICtrlSetBkColor(-1,0x660)
GUICtrlSetColor(-1,0xFFFFFF)
GUICtrlCreateLabel("Download Manager - By GtaSpider", 96, 8, 230, 21)
GUICtrlSetFont(-1, 11, 500, 0, "Arial")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$downloadurl = GUICtrlCreateInput("", 96, 96, 225, 21)
$start = GUICtrlCreateButton("Start Download", 96, 120, 227, 22, 0)
GUICtrlCreateLabel("Download URL:", 96, 78, 120, 17)
GUICtrlSetFont(-1, 11, 1000, 0, "Arial")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)
;############
;Main While
;############
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ud
_add(GUICtrlRead($inp_down))
EndSwitch
WEnd
;############
;Funktionen
;############
Func _checkread()
Local $read = GUICtrlRead($inp_down)
If $read <> $oldread Then _add($read,1)
EndFunc
Func _add($read,$param=0)
AdlibDisable()
If $read < $oldread Then
If $param = 0 Then
GUICtrlDelete($downloaditem[$oldread])
Else
For $i = $oldread To $read+1 Step -1
GUICtrlDelete($downloaditem[$i])
Next
EndIf
ElseIf $read > $oldread Then
If $param = 0 Then
If $read < 10 Then $read = "0"&$read
$downloaditem[$read] = GUICtrlCreateListViewItem("Download "&$read,$List_Download)
Else
For $i = $oldread+1 to $read
If $i < 10 Then $i = "0"&$i
$downloaditem[$i] = GUICtrlCreateListViewItem("Download "&$i,$List_Download)
Next
EndIf
EndIf
$oldread = Number($read)
AdlibEnable("_checkread",500)
EndFunc
Alles anzeigen
Mfg Spider