mIRC Home    About    Download    Register    News    Help

Topic Options
#235524 - 24/12/11 02:22 AM Looking for a little help with $?=""
Szantovitch Offline
Nutrimatic drinks dispenser

Registered: 06/08/10
Posts: 5
hey guys, been using this forum for a long time to find quick answers to basic scripting, so to you regulars, thanks!

i'm not exactly sure what i should be asking here, so i'll try to describe the simple desired effect if possible.

i'd like to know if there's the possibility for a very simple linebreak in the dialog boxes created by doing something like this:
Code:
Submenu
.Submenu Option:{
  /set %thingy $?="This is a definition within this box with a lot of different things notated to choose from. Option 1 blahblahblah blah, type +1, Option 2 blahblahblahblah, type -2, Option 3 blahblahblah, type -3."
}

obviously i left out the important parts there, but it shows the problem with a lot of text in $?=.

mostly I've been looking for a long time if there was a way to output the text shown in the ?$= created box with linebreaks if necessary which would show a lot more closer to this when it pops up to request user input:
Quote:
This is a definition within this box with a lot of different things notated to choose from.
- Option 1 blahblahblah blah, type +1.
- Option 2 blahblahblahblah, type -2.
- Option 3 blahblahblah, type -3.


preemptively thanks for the replies, enjoy your holidays!

-christine

Top
#235525 - 24/12/11 02:30 AM Re: Looking for a little help with $?="" [Re: Szantovitch]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3462
Loc: France
You have to use $crlf to indicate a newline, you should also use $input which is safer:
Code:
Submenu
.Submenu Option:{
  set %thingy $input($+(This is a definition within this box with a lot of different things notated to choose from.,$crlf,Option 1 blahblahblah $+ $chr(44) blah type +1,$crlf,Option 2 blahblahblahblah type -2,$crlf,Option 3 blahblahblah type -3.),e)
}
Note that commas seperate parameters so you cannot use them as text, you need to use $chr(44) with $+ like I showed for the first option
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top
#235527 - 24/12/11 02:56 AM Re: Looking for a little help with $?="" [Re: Wims]
Szantovitch Offline
Nutrimatic drinks dispenser

Registered: 06/08/10
Posts: 5
ahh! thanks a lot! that's perfect!

Top
#235715 - 06/01/12 09:38 PM Re: Looking for a little help with $?="" [Re: Szantovitch]
Zmodem Offline
Babel fish

Registered: 10/12/02
Posts: 86
Loc: California, USA
A little late in the game to answer this, but thought I'd toss in my suggestion as well:

Quote:
Submenu
.Submenu Option: {
var %c = $crlf $+ $crlf | set %thingy $input(This is a definition within this box with a lot of different things notated to choose from. Here are your options: $+ %c $+ Option 1 (Blah blah) type +1 $+ %c $+ Option 2 (blahblah) type -2 $+ %c $+ Option 3 (blahblah) type -3,ieo,Select Option)
}


The "%c" variable is not really important, all I did was make a local (temporary) variable using the 'var' command and it contained the $crlf command. It isn't really a necessary step, but it makes the parsing of a script execute quicker and there is less repetitiveness in the code.

Next up, as was previously suggested, I used the '$input()' identifier to make a much more professional-feeling input box, rather than the $?="", which I'm not even sure why it still exists. $input() carries with it a whole load of options, including: having a title for your input prompt, a much more flexible description screen, options to change the alert icon (warning, info, critical warning and so on), and you can choose what you want included, such as ok/yes/no/cancel buttons and input/password-input edit boxes.

For more help on this command, go into mIRC and type: /help $input. Good luck! smile


Edited by Zmodem (06/01/12 09:40 PM)
_________________________
-Zmodem

Top
#235722 - 07/01/12 06:30 AM Re: Looking for a little help with $?="" [Re: Zmodem]
Scakk Offline
Ameglian cow

Registered: 17/10/09
Posts: 24
I myself use $crlf in some $input 's and have never had to use the $+ to make it work.

Top
#235726 - 07/01/12 05:14 PM Re: Looking for a little help with $?="" [Re: Scakk]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3462
Loc: France
You don't need $+ to make it working, but not using $+ will add spaces to the text and will make the window bigger
_________________________
Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net

Top