So I'm importing text from a .txt file.
(Will be a .json file, but no matter)
Here's enough of the code to get the job done.
I think I'm only missing 1-3 lines of code.
What do I add to the Call_Load() so that the script will check or uncheck a checkbox?
So that if I reload the script, the button will be checked or unchecked
Code: Select all
Gui, Add, CheckBox, y5 x50 w15 h15 vPrivate Checked
Gui, Add, Button, y40 x50, Update
Gui, Show, w180 h80, Check
Return
ButtonUpdate:
Gui, Submit, NoHide
FileDelete, %A_ScriptDir%\values.txt
FileAppend, %Private%, %A_ScriptDir%\values.txt
Call_Load()
Call_Load()
{
FileReadLine, Private_I, %A_ScriptDir%\values.txt, 1
}