Gerald 0 Posted November 3, 2011 hi i have some question regards to my working program this is my code #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 361, 365, 317, 191) $Input1 = GUICtrlCreateInput("Input1", 24, 40, 169, 21) $Edit1 = GUICtrlCreateList("", 8, 120, 337, 217) GUICtrlSetData(-1, "") $Button1 = GUICtrlCreateButton("Button1", 200, 32, 75, 25, 0) $Button3 = GUICtrlCreateButton("Button3", 280, 32, 75, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 Readreg() Case $Button3 orc() EndSwitch WEnd Func Readreg() For $i= 1 to 100000 $var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run",$i) If @error <> 0 then ExitLoop GUICtrlSetData($Edit1,$var) Next EndFunc and my GUICtrlSetData result is only the value name of a regkey can possible to show the type and the date value in regkey .... ? Share this post Link to post Share on other sites
Mjolnir 0 Posted November 3, 2011 In fact, it's a "parsing" problem. RegEnumVal function gives you the list of keys inside HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run regkey, not the values of those keys. It's up to you to parse (get the value of) the "$var" returned key using RegRead function with something like : $value = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\",$var) and then perform the GUICtrlSetData action. Share this post Link to post Share on other sites
nitekram 68 Posted November 3, 2011 (edited) The code you provided will change the value of your ctrl "GUICtrlSetData($Edit1,$var)" on each iteration of the loop - so it will only be the value of the last item in your "Run" list. You may want to change that, but here is some code to get you started on your question. For $i = 1 to 10 ; change this value if you want to show more items $var1 = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $i) if @error <> 0 Then ExitLoop $var2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", $var1) Switch @extended Case 0 $type = 'REG_NONE' Case 1 $type = 'REG_SZ' Case 2 $type = 'REG_EXPAND_SZ' Case 3 $type = 'REG_BINARY' Case 4 $type = 'REG_DWORD' Case 5 $type = 'REG_DWORD_BIG_ENDIAN' Case 6 $type = 'REG_LINK' Case 7 $type = 'REG_MULTI_SZ' Case 8 $type = 'REG_RESOURCE_LIST' Case 9 $type = 'REG_FULL_RESOURCE_DESCRIPTOR' Case 10 $type = 'REG_RESOURCE_REQUIREMENTS_LIST' EndSwitch MsgBox(4096, @extended, 'Name = ' & $var1 & @CRLF & 'Type = ' & $type & @CRLF & 'Value = ' & $var2 ) next edit spelling Edited November 3, 2011 by nitekram 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 2AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDFLearning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming TipsExcel ChangesControlHover.UDFGDI_PlusDraw_On_ScreenGDI BasicsGDI_More_BasicsGDI RotateGDI GraphGDI CheckExistingItemsGDI TrajectoryReplace $ghGDIPDll with $__g_hGDIPDllDLL 101?Array via ObjectGDI SwimlaneGDI Plus French 101 SiteGDI Examples UEZGDI Basic ClockGDI DetectionTernary operator Share this post Link to post Share on other sites
Gerald 0 Posted November 3, 2011 my next question is how can a get the value in edit hmmm if a click the edit box it's possible to get the value of click edit box...? Share this post Link to post Share on other sites