Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Making New Lines In A Msgbox... How?


  • Please log in to reply
2 replies to this topic

#1 Nanascalala

Nanascalala

    Seeker

  • Active Members
  • 25 posts

Posted 03 April 2004 - 07:17 PM

I can't remeber what the keys were to add a new line to a msgbox. I need to give the user an input box with somethin that look slike this:

Question
Which spot do you want to save to? (Type the spot number)
1) &var1
2) &var2
3) &var3
4) &var4
5) &var5
-[INPUT BOX]-


PLZ HELP!! Thx.!
-nanascalala







#2 jpm

jpm

    a Real GUI/debug lover

  • Developers
  • 9,776 posts

Posted 03 April 2004 - 08:01 PM

$msg="Which spot do you want to save to? (Type the spot number)" $msg= $msg & @LF & "1) &var1" $msg= $msg & @LF & "2) &var2" $msg= $msg & @LF & "3) &var3" $msg= $msg & @LF & "4) &var4" $msg= $msg & @LF & "5) &var5" InputBox("title", $msg )

Here is :whistle:

#3 scriptkitty

scriptkitty

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,274 posts

Posted 03 April 2004 - 08:29 PM

make sure to give Imputbox a variable though. ya code to fast at times.

$msg="Which spot do you want to save to? (Type the spot number)" $msg= $msg & @LF & "1) &var1" $msg= $msg & @LF & "2) &var2" $msg= $msg & @LF & "3) &var3" $msg= $msg & @LF & "4) &var4" $msg= $msg & @LF & "5) &var5" while 1 $var=InputBox("title", $msg ) if int($var)>0 and int($var)<6 then exitloop wend


or try this out:
$msg="Which spot do you want to save to? "& @crlf &"(Type the spot number)" $msgs=Stringsplit("bob,joe,fred,sam,jimbo",",") for $i=1 to $msgs[0] $msg= $msg & @LF & $i & ") "& $msgs[$i] next while 1 $var=InputBox("title", $msg ) if int($var)>0 and int($var)<$msgs[0]+1 then exitloop wend msgbox(1,"Your pick was",$msgs[int($var)])

Edited by scriptkitty, 03 April 2004 - 08:36 PM.

AutoIt3, the MACGYVER Pocket Knife for computers.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users