<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ko">
	<id>https://devcafe.co.kr/w/index.php?action=history&amp;feed=atom&amp;title=Autoit_json</id>
	<title>Autoit json - 편집 역사</title>
	<link rel="self" type="application/atom+xml" href="https://devcafe.co.kr/w/index.php?action=history&amp;feed=atom&amp;title=Autoit_json"/>
	<link rel="alternate" type="text/html" href="https://devcafe.co.kr/w/index.php?title=Autoit_json&amp;action=history"/>
	<updated>2026-05-19T22:01:28Z</updated>
	<subtitle>이 문서의 편집 역사</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://devcafe.co.kr/w/index.php?title=Autoit_json&amp;diff=1327&amp;oldid=prev</id>
		<title>2025년 5월 19일 (월) 21:21에 Devcafe님의 편집</title>
		<link rel="alternate" type="text/html" href="https://devcafe.co.kr/w/index.php?title=Autoit_json&amp;diff=1327&amp;oldid=prev"/>
		<updated>2025-05-19T21:21:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2025년 5월 20일 (화) 06:21 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l129&quot;&gt;129번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;129번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category:autoit]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Devcafe</name></author>
	</entry>
	<entry>
		<id>https://devcafe.co.kr/w/index.php?title=Autoit_json&amp;diff=1266&amp;oldid=prev</id>
		<title>Devcafe: 새 문서:  == autoit json 파일 이용 == &lt;source lang=autoit&gt; #include &lt;GUIConstantsEx.au3&gt; #include &lt;WindowsConstants.au3&gt; #include &lt;GuiListView.au3&gt; #include &lt;FileConstants.au3&gt; #include &quot;Json.au3&quot; ; Json.au3 UDF 필요  ; GUI 생성 Global $hGUI = GUICreate(&quot;JSON Manager&quot;, 600, 400) Global $hListView = _GUICtrlListView_Create($hGUI, &quot;Key|Value&quot;, 10, 10, 580, 300) Global $btnAdd = GUICtrlCreateButton(&quot;Add&quot;, 10, 320, 80, 30) Global $btnEdit = GUICtrlCreateButton(&quot;Edit&quot;, 100, 320, 80, 3...</title>
		<link rel="alternate" type="text/html" href="https://devcafe.co.kr/w/index.php?title=Autoit_json&amp;diff=1266&amp;oldid=prev"/>
		<updated>2025-03-13T12:32:06Z</updated>

		<summary type="html">&lt;p&gt;새 문서:  == autoit json 파일 이용 == &amp;lt;source lang=autoit&amp;gt; #include &amp;lt;GUIConstantsEx.au3&amp;gt; #include &amp;lt;WindowsConstants.au3&amp;gt; #include &amp;lt;GuiListView.au3&amp;gt; #include &amp;lt;FileConstants.au3&amp;gt; #include &amp;quot;Json.au3&amp;quot; ; Json.au3 UDF 필요  ; GUI 생성 Global $hGUI = GUICreate(&amp;quot;JSON Manager&amp;quot;, 600, 400) Global $hListView = _GUICtrlListView_Create($hGUI, &amp;quot;Key|Value&amp;quot;, 10, 10, 580, 300) Global $btnAdd = GUICtrlCreateButton(&amp;quot;Add&amp;quot;, 10, 320, 80, 30) Global $btnEdit = GUICtrlCreateButton(&amp;quot;Edit&amp;quot;, 100, 320, 80, 3...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;새 문서&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== autoit json 파일 이용 ==&lt;br /&gt;
&amp;lt;source lang=autoit&amp;gt;&lt;br /&gt;
#include &amp;lt;GUIConstantsEx.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;GuiListView.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;FileConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;quot;Json.au3&amp;quot; ; Json.au3 UDF 필요&lt;br /&gt;
&lt;br /&gt;
; GUI 생성&lt;br /&gt;
Global $hGUI = GUICreate(&amp;quot;JSON Manager&amp;quot;, 600, 400)&lt;br /&gt;
Global $hListView = _GUICtrlListView_Create($hGUI, &amp;quot;Key|Value&amp;quot;, 10, 10, 580, 300)&lt;br /&gt;
Global $btnAdd = GUICtrlCreateButton(&amp;quot;Add&amp;quot;, 10, 320, 80, 30)&lt;br /&gt;
Global $btnEdit = GUICtrlCreateButton(&amp;quot;Edit&amp;quot;, 100, 320, 80, 30)&lt;br /&gt;
Global $btnDelete = GUICtrlCreateButton(&amp;quot;Delete&amp;quot;, 190, 320, 80, 30)&lt;br /&gt;
Global $btnSave = GUICtrlCreateButton(&amp;quot;Save to File&amp;quot;, 280, 320, 80, 30)&lt;br /&gt;
Global $inputKey = GUICtrlCreateInput(&amp;quot;&amp;quot;, 10, 360, 120, 20)&lt;br /&gt;
Global $inputValue = GUICtrlCreateInput(&amp;quot;&amp;quot;, 140, 360, 120, 20)&lt;br /&gt;
&lt;br /&gt;
; ListView 설정&lt;br /&gt;
_GUICtrlListView_SetColumnWidth($hListView, 0, 200)&lt;br /&gt;
_GUICtrlListView_SetColumnWidth($hListView, 1, 350)&lt;br /&gt;
&lt;br /&gt;
; JSON 파일 경로&lt;br /&gt;
Global $sJsonFile = @ScriptDir &amp;amp; &amp;quot;\data.json&amp;quot;&lt;br /&gt;
Global $oJson = ObjCreate(&amp;quot;Scripting.Dictionary&amp;quot;) ; JSON 데이터를 저장할 객체&lt;br /&gt;
&lt;br /&gt;
; JSON 파일 로드&lt;br /&gt;
LoadJson()&lt;br /&gt;
&lt;br /&gt;
GUISetState(@SW_SHOW)&lt;br /&gt;
&lt;br /&gt;
; 메인 루프&lt;br /&gt;
While 1&lt;br /&gt;
    Switch GUIGetMsg()&lt;br /&gt;
        Case $GUI_EVENT_CLOSE&lt;br /&gt;
            ExitLoop&lt;br /&gt;
        Case $btnAdd&lt;br /&gt;
            AddItem()&lt;br /&gt;
        Case $btnEdit&lt;br /&gt;
            EditItem()&lt;br /&gt;
        Case $btnDelete&lt;br /&gt;
            DeleteItem()&lt;br /&gt;
        Case $btnSave&lt;br /&gt;
            SaveJson()&lt;br /&gt;
    EndSwitch&lt;br /&gt;
WEnd&lt;br /&gt;
&lt;br /&gt;
GUIDelete($hGUI)&lt;br /&gt;
&lt;br /&gt;
; 함수들&lt;br /&gt;
Func LoadJson()&lt;br /&gt;
    _GUICtrlListView_DeleteAllItems($hListView)&lt;br /&gt;
    If FileExists($sJsonFile) Then&lt;br /&gt;
        Local $sJsonData = FileRead($sJsonFile)&lt;br /&gt;
        $oJson = Json_Decode($sJsonData)&lt;br /&gt;
        If Not @error And IsObj($oJson) Then&lt;br /&gt;
            Local $aKeys = $oJson.Keys()&lt;br /&gt;
            For $sKey In $aKeys&lt;br /&gt;
                _GUICtrlListView_AddItem($hListView, $sKey)&lt;br /&gt;
                _GUICtrlListView_AddSubItem($hListView, _GUICtrlListView_GetItemCount($hListView) - 1, String($oJson.Item($sKey)), 1)&lt;br /&gt;
            Next&lt;br /&gt;
        Else&lt;br /&gt;
            $oJson = ObjCreate(&amp;quot;Scripting.Dictionary&amp;quot;)&lt;br /&gt;
        EndIf&lt;br /&gt;
    EndIf&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
Func AddItem()&lt;br /&gt;
    Local $sKey = GUICtrlRead($inputKey)&lt;br /&gt;
    Local $sValue = GUICtrlRead($inputValue)&lt;br /&gt;
    &lt;br /&gt;
    If $sKey &amp;lt;&amp;gt; &amp;quot;&amp;quot; And $sValue &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
        If Not $oJson.Exists($sKey) Then&lt;br /&gt;
            $oJson.Add($sKey, $sValue)&lt;br /&gt;
            _GUICtrlListView_AddItem($hListView, $sKey)&lt;br /&gt;
            _GUICtrlListView_AddSubItem($hListView, _GUICtrlListView_GetItemCount($hListView) - 1, $sValue, 1)&lt;br /&gt;
            GUICtrlSetData($inputKey, &amp;quot;&amp;quot;)&lt;br /&gt;
            GUICtrlSetData($inputValue, &amp;quot;&amp;quot;)&lt;br /&gt;
        Else&lt;br /&gt;
            MsgBox(48, &amp;quot;Warning&amp;quot;, &amp;quot;이미 존재하는 키입니다.&amp;quot;)&lt;br /&gt;
        EndIf&lt;br /&gt;
    Else&lt;br /&gt;
        MsgBox(48, &amp;quot;Warning&amp;quot;, &amp;quot;키와 값을 모두 입력해주세요.&amp;quot;)&lt;br /&gt;
    EndIf&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
Func EditItem()&lt;br /&gt;
    Local $iSelected = _GUICtrlListView_GetSelectedIndices($hListView)&lt;br /&gt;
    If $iSelected &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
        Local $sKey = _GUICtrlListView_GetItemText($hListView, $iSelected, 0)&lt;br /&gt;
        Local $sNewValue = GUICtrlRead($inputValue)&lt;br /&gt;
        &lt;br /&gt;
        If $sNewValue &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
            $oJson.Item($sKey) = $sNewValue&lt;br /&gt;
            _GUICtrlListView_SetItemText($hListView, $iSelected, $sNewValue, 1)&lt;br /&gt;
            GUICtrlSetData($inputKey, &amp;quot;&amp;quot;)&lt;br /&gt;
            GUICtrlSetData($inputValue, &amp;quot;&amp;quot;)&lt;br /&gt;
        Else&lt;br /&gt;
            MsgBox(48, &amp;quot;Warning&amp;quot;, &amp;quot;새 값을 입력해주세요.&amp;quot;)&lt;br /&gt;
        EndIf&lt;br /&gt;
    Else&lt;br /&gt;
        MsgBox(48, &amp;quot;Warning&amp;quot;, &amp;quot;수정할 항목을 선택해주세요.&amp;quot;)&lt;br /&gt;
    EndIf&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
Func DeleteItem()&lt;br /&gt;
    Local $iSelected = _GUICtrlListView_GetSelectedIndices($hListView)&lt;br /&gt;
    If $iSelected &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
        Local $sKey = _GUICtrlListView_GetItemText($hListView, $iSelected, 0)&lt;br /&gt;
        $oJson.Remove($sKey)&lt;br /&gt;
        _GUICtrlListView_DeleteItem($hListView, $iSelected)&lt;br /&gt;
    Else&lt;br /&gt;
        MsgBox(48, &amp;quot;Warning&amp;quot;, &amp;quot;삭제할 항목을 선택해주세요.&amp;quot;)&lt;br /&gt;
    EndIf&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
Func SaveJson()&lt;br /&gt;
    Local $sJsonData = Json_Encode($oJson, $JSON_PRETTY_PRINT)&lt;br /&gt;
    Local $hFile = FileOpen($sJsonFile, $FO_OVERWRITE)&lt;br /&gt;
    If $hFile &amp;lt;&amp;gt; -1 Then&lt;br /&gt;
        FileWrite($hFile, $sJsonData)&lt;br /&gt;
        FileClose($hFile)&lt;br /&gt;
        MsgBox(64, &amp;quot;Success&amp;quot;, &amp;quot;JSON 파일이 저장되었습니다.&amp;quot;)&lt;br /&gt;
    Else&lt;br /&gt;
        MsgBox(16, &amp;quot;Error&amp;quot;, &amp;quot;파일을 저장할 수 없습니다.&amp;quot;)&lt;br /&gt;
    EndIf&lt;br /&gt;
EndFunc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Devcafe</name></author>
	</entry>
</feed>