Sign in to follow this  
Followers 0
botanic

iniread/write problem

6 posts in this topic

#1 ·  Posted (edited)

Im trying to make it so that if the $user is "" or " " then it makes you type in the username but it wont write to the ini file it just loops and returns a empty space

CODE
$OURNAME = IniRead($INiTRADE, "Trade", "AccountName", "")

$USER = $OURNAME

If $USER = "" Then

$USER = IniRead($INIFILE, "Trade", "AccountName", "ENTER YOUR NAME")

if ($USER = "") or ($USER = "ENTER YOUR NAME") Then _user2()

EndIf

func _user2()

$mes = InputBox("Username", "Please enter your Username.")

While ($mes = "") or ($mes = " ")

$mes = InputBox("Username", "You must enter your Username for the bot to work.")

WEnd

IniWrite($INiTRADE, "Trade", "AccountName", "")

_1x()

EndFunc

Edited by botanic

Share this post


Link to post
Share on other sites



With this example:

;Asks the user to enter a 1 or 2 character response.  The M in the password 
;field indicates that blank string are not accepted and the 2 indicates that the 
;responce will be at most 2 characters long.
$value = InputBox("Testing", "Enter the 1 or 2 character code.", "", " M2")oÝ÷ Ù8^znµº1q©ç¢ÖÞzjmÉ*2¢ì(ºWpj{l¢g­)à)jëh×6InputBox("Username", "Please enter your Username.", "", " M")

Hope that helps with some of your script :)

Share this post


Link to post
Share on other sites

i doesnt loop the msgbox it loops bakc to the beginig

the script is actually

_1x()

If $USER = "" Then

$USER = IniRead($INIFILE, "Trade", "AccountName", "ENTER YOUR NAME")

if ($USER = "") or ($USER = "ENTER YOUR NAME") Then _user2()

EndIf

...

Share this post


Link to post
Share on other sites

it just wont write what is in the inputbox to the ini file...

Share this post


Link to post
Share on other sites

it just wont write what is in the inputbox to the ini file...

$IniFile= "C:\Bla\bla\foo\MyIni.ini"
$input = InputBox("Username", "Please enter your Username.", "", " M")

IniWrite($IniFile, "Usernames", "key 1", $Input)

Share this post


Link to post
Share on other sites

thanks i didnt notice i hadnt changet that... lol :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0