Jump to content

iniread/write problem


botanic
 Share

Recommended Posts

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
Link to comment
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 :)

Link to comment
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

...

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...