oemript Posted May 7, 2018 Posted May 7, 2018 I would like to know on how to retrieve variable from another ini file. -------------------------------------- C:\A.ini labelA = A123 -------------------------------------- C:\B.ini labelA = retrieve variable labelA from C:\A.ini, which should return A123 -------------------------------------- Does anyone have any suggestions? Thanks in advance for any suggestions
Developers Jos Posted May 7, 2018 Developers Posted May 7, 2018 Retrieve with what assuming this is not supposed to be an AutoIt3 question seeing the forum it is posted in? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
HardXOR Posted July 9, 2018 Posted July 9, 2018 MsgBox(0, "read from A.ini", read_INI("C:\A.ini", "settings", "labelA")) MsgBox(0, "read from B.ini", read_INI("C:\B.ini", "settings", "labelA")) Func read_INI($filepath, $section, $key) $ini_value = IniRead($filepath, $section, $key, "0") If StringLeft($ini_value, 2) = "C:" Then $ini_value = IniRead($ini_value, $section, $key, "0") EndIf Return $ini_value EndFunc you can do this
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