Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey 2.0
- ;so you don't need to read/write to the registry
- F1::GetFeatureStatus("Feature1")
- F2::GetFeatureStatus("Feature2")
- F3::IniWrite("Feature1=test123", A_ScriptFullPath, "SavedVariables2")
- GetFeatureStatus(featureName)
- {
- section := IniRead(A_ScriptFullPath, "SavedVariables")
- linesSplit := StrSplit(section, "`n")
- for (line in linesSplit)
- if (InStr(line, featureName))
- if (StrSplit(line, "=")[2])
- MsgBox(featureName " is enabled")
- else
- MsgBox(featureName " is disabled")
- }
- /*
- [SavedVariables]
- Feature1=1
- Feature2=0
- [SavedVariables2]
- Feature1=test123
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement