Hallo erstmal :)!
Mein Problem ist folgendes:
Ich habe ein Script geschrieben, welches in der Registry einen bestimmten Wert ausliest und diesen Wert (eigentlich Werte, aber es geht mir ja erstmal um das Prinzip :D) in eine Combobox packt. Nun ist mein Problem, dass ich zwar mit diesem Wert arbeiten will, in der Combobox aber was anderes stehen soll, was auch aus der Registry ausgelesen wird.
Hier einfach mal das jetzige Script (unwichtige Sachen mal rausgenommen):
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
$ProgTitle = "platzhalt0r"
For $i= 1 to 1 ;; Alle Unterordner von "...\Users" in Variablen hauen :V
$ii1 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
$ii1name = RegRead("HKEY_CURRENT_USER\Software\Valve\Steam\Users\"&$ii1&"\friends","PersonaName")
If @error <> 0 then ExitLoop
Next
For $i= 2 to 2
$ii2 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
For $i= 3 to 3
$ii3 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
For $i= 4 to 4
$ii4 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
For $i= 5 to 5
$ii5 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
For $i= 6 to 6
$ii6 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
For $i= 7 to 7
$ii7 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
For $i= 8 to 8
$ii8 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
For $i= 9 to 9
$ii9 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
For $i= 10 to 10
$ii10 = RegEnumKey("HKEY_CURRENT_USER\Software\Valve\Steam\Users",$i)
If @error <> 0 then ExitLoop
Next
$Form1 = GUICreate($ProgTitle, 351, 337, 192, 114)
$Label1 = GUICtrlCreateLabel(" zensiert yoo :3", 40, 16, 274, 22)
GUICtrlSetFont(-1, 12, 800, 0, "Courier New")
GUICtrlSetColor(-1, 0x000080)
$hallo = GUICtrlCreateTab(160, 56, 169, 225)
$TabSheet1 = GUICtrlCreateTabItem("Beschreibung")
GUICtrlCreateTabItem("")
$Combo1 = GUICtrlCreateCombo("Account auswählen...", 16, 260, 139, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, $ii1name&"|"&$ii2&"|"&$ii3&"|"&$ii4&"|"&$ii5&"|"&$ii6&"|"&$ii7&"|"&$ii8&"|"&$ii9&"|"&$ii10)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("", 8, 0, 329, 41)
GUICtrlSetColor(-1, 0x000080)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button4 = GUICtrlCreateButton("TOGGLE s0m37h1n6", 16, 130, 139, 25, $BS_FLAT)
GUICtrlSetFont(-1, 9, 400, 0, "Courier New")
GUICtrlSetColor(-1, 0x0A246A)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Combo1
$gameoverlayvar = "0"
$enable_goscript = 1
$gonotsetyet = 0
$readaccname = GuiCtrlRead($Combo1,$ii1&"|"&$ii2&"|"&$ii3&"|"&$ii4&"|"&$ii5&"|"&$ii6&"|"&$ii7&"|"&$ii8&"|"&$ii9&"|"&$ii10)
If $readaccname = "" Then
Exit
EndIf
$get_gameoverlay = RegRead("HKEY_CURRENT_USER\Software\Valve\Steam\Users\"&$readaccname&"\system","EnableGameOverlay")
If $get_gameoverlay <> @error Then
$gonotsetyet = 1
MsgBox(0,$ProgTitle,"EnableGameOverlay isn't set yet.")
EndIf
If $get_gameoverlay = $gameoverlayvar Then
$enable_goscript = 0
MsgBox(0,$ProgTitle,"EnableGameOverlay is already set on "&$gameoverlayvar&".")
ElseIf $gonotsetyet = 0 Then
$enable_goscript = 1
MsgBox(0,$ProgTitle,"EnableGameOverlay is set on "&$get_gameoverlay&".")
EndIf
If $enable_goscript <> 0 Then
MsgBox(0,$ProgTitle,"EnableGameOverlay will now be set on "&$gameoverlayvar&"...")
Sleep(500)
RegWrite("HKEY_CURRENT_USER\Software\Valve\Steam\Users\"&$readaccname&"\system","EnableGameOverlay","REG_DWORD",$gameoverlayvar)
$get_gameoverlay = RegRead("HKEY_CURRENT_USER\Software\Valve\Steam\Users\"&$readaccname&"\system","EnableGameOverlay")
MsgBox(0,$ProgTitle,"EnableGameOverlay is now set on "&$get_gameoverlay&".")
EndIf
EndSwitch
WEnd
Ich bin der absolute Anfänger und bin froh, was zusammengeschnibbelt bekommen zu haben.
Kann auch sein, dass ich einfach zu kompliziert denke, keine Ahnung.
Hoffe jetzt erstmal, dass mein Anliegen auch verständlich ist... ansonsten fragen.
Mit freundlichen Grüßen
Thomas Creeten