Code : Tout sélectionner
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <UpdownConstants.au3>
#include <UpdownConstants.au3>
Global $Updown1
$valueupdown1 = 0
$gui = GUICreate("test",676,470)
GUISetBkColor(0x767676)
GUICtrlCreateTab(103,94,269,339)
GUICtrlCreateTabItem("tab1")
GUICtrlCreateTabItem("tab2")
GUICtrlCreateGroup("",110,115,254,80)
GUICtrlCreateGroup("",110,195,254,230)
$Input1 = GUICtrlCreateInput("0", 0, 0)
GUICtrlSetState(-1, $GUI_HIDE)
$Updown1 = GUICtrlCreateUpdown($Input1, BitOR($UDS_WRAP,$UDS_HORZ))
GUICtrlSetPos($Updown1, 103,420, 270, 15)
startuphklm()
GUICtrlCreateTabItem("tab3")
GUICtrlCreateTabItem("")
GUISetState()
func startuphklm()
$poschk = 205
$rchk = 225
For $i= 1 to 100
$var = RegEnumVal("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $i)
$var2 = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run",$var)
If @error <> 0 then ExitLoop
$chkk = GUICtrlCreateCheckbox($var,115,$poschk)
GUICtrlSetBkColor(-1, 0xffffff)
$id = "id:" & $chkk & " Emplacement : " & $var2
$extractchar = StringMid($id, 1+$valueUpdown1, 43)
$aa = GUICtrlCreateLabel($extractchar, 115, $rchk)
GUICtrlSetBkColor(-1, 0xffffff)
$poschk = $poschk + 40
$rchk = $rchk + 40
Next
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Updown1
$valueUpdown1 = GUICtrlRead($Input1)
if $valueUpdown1 < 0 Then
$valueUpdown1 = 0
EndIf
call("startuphklm")
EndSwitch
WEnd