sumkid Posted September 25, 2008 Share Posted September 25, 2008 (edited) What i want this to do is download the settings.ini file so that it can read what I want the message box to say. so this is what it should do (in order) 1. Download settings.ini 2. if settings.ini reads "enable=1" then it will continue 3. then if settings.ini reads "command1=msg" then it will make a msgbox with the title being whatever i set it as in the settings.ini and same with the msgbox text. here is my code. when i execute it, it doesnt appear to do anything. any help? $Getit = InetGet ( "http://mysubdomain.mywebhost.com/settings.ini", "settings.ini" ) $enable = IniRead ( $Getit, "settings", "enable", 1 ) $command1 = IniRead ( $Getit, "settings", "command1", 1 ) $msgtitle = IniRead ( $Getit, "msg", "msgtitle", 1 ) $msgtext = IniRead ( $Getit, "msg", "msgtext", 1 ) While 1 Sleep (10000) If $enable = 1 Then If $command1 = "msg" Then MsgBox ( 1, $msgtitle, $msgtext ) EndIf EndIf Sleep (35000) Exit WEnd Edited September 25, 2008 by sumkid Link to comment Share on other sites More sharing options...
sumkid Posted September 25, 2008 Author Share Posted September 25, 2008 anybody? Link to comment Share on other sites More sharing options...
Developers Jos Posted September 25, 2008 Developers Share Posted September 25, 2008 (edited) Pls refrain from bumping a thread within a day. Just shows impatience and makes me and many other ignore it. Jos Edited September 25, 2008 by 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. Link to comment Share on other sites More sharing options...
zackrspv Posted September 27, 2008 Share Posted September 27, 2008 What i want this to do is download the settings.ini file so that it can read what I want the message box to say. so this is what it should do (in order) 1. Download settings.ini 2. if settings.ini reads "enable=1" then it will continue 3. then if settings.ini reads "command1=msg" then it will make a msgbox with the title being whatever i set it as in the settings.ini and same with the msgbox text. here is my code. when i execute it, it doesnt appear to do anything. any help? $Getit = InetGet ( "http://mysubdomain.mywebhost.com/settings.ini", "settings.ini" ) $enable = IniRead ( $Getit, "settings", "enable", 1 ) $command1 = IniRead ( $Getit, "settings", "command1", 1 ) $msgtitle = IniRead ( $Getit, "msg", "msgtitle", 1 ) $msgtext = IniRead ( $Getit, "msg", "msgtext", 1 ) While 1 Sleep (10000) If $enable = 1 Then If $command1 = "msg" Then MsgBox ( 1, $msgtitle, $msgtext ) EndIf EndIf Sleep (35000) Exit WEnd The following code works w/o issue for me: $INI = @ScriptDir&"\settings.ini" InetGet("http://mysubdomain.mywebhost.com/settings.ini", "settings.ini", 0, 0) $enable = IniRead($ini, "settings", "enable", 0) $command1 = IniRead($ini, "settings", "command1", 1) $msgtitle = IniRead($ini, "msg", "msgtitle", 1 ) $msgtext = IniRead($ini, "msg", "msgtext", 1 ) if $enable = 1 and $command1 = 1 Then MsgBox(0, $msgtitle, $msgtext) Else ConsoleWrite("nope" & @CRLF) EndIf Mind you, you need to have your settings.ini written properly: [settings] enable=1 command=1 [msg] msgtitle=This is a test msgtext=This is the text Hope that helps -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
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