Hansio Posted August 31, 2011 Posted August 31, 2011 (edited) I can not really work it out this. config.ini [Section] Hide=Hide .au3 $var1 = IniRead("config.ini", "Section", "Hide", "NotFound") Control & $var1("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]" Edited August 31, 2011 by Hansio
pieeater Posted August 31, 2011 Posted August 31, 2011 try: $var1 = IniRead("config.ini", "Section", "Hide", "NotFound") msgbox(0, "INI File", 'in section "hide" there is "' & $var1 & '" as the value") as your code [spoiler]My UDFs: Login UDF[/spoiler]
somdcomputerguy Posted August 31, 2011 Posted August 31, 2011 I believe that in order for the AutoIt INI functions to work, there must be a named section in the .ini file. So your config.ini may have to look like this [section]Hide=Hide - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Hansio Posted August 31, 2011 Author Posted August 31, 2011 What I want is to replace ControlHide with ControlShow through my ini file What it does is to hide my desktop icons ControlHide("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]")
Hansio Posted August 31, 2011 Author Posted August 31, 2011 I believe that in order for the AutoIt INI functions to work, there must be a named section in the .ini file. So your config.ini may have to look like this [section] Hide=Hide It is there already, I had just forgotten to write it here
sleepydvdr Posted August 31, 2011 Posted August 31, 2011 (edited) If $var = "Hide" Then ControlHide("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]") ElseIf $var = "Show" Then ControlShow("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]") Else MsgBox(0, "Error", "Value not found in INI file.") EndIf Edited August 31, 2011 by sleepydvdr #include <ByteMe.au3>
Hansio Posted August 31, 2011 Author Posted August 31, 2011 If $var = "Hide" Then ControlHide("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]") ElseIf $var = "Show" Then ControlShow("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]") Else MsgBox(0, "Error", "Value not found in INI file.") EndIf It was exactly what I wanted. Thank you! :-)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now