mIRC Home    About    Download    Register    News    Help

Print Thread
Looking for a little help with $?="" #235524 24/12/11 02:22 AM
Joined: Aug 2010
Posts: 5
S
Szantovitch Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2010
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

Re: Looking for a little help with $?="" [Re: Szantovitch] #235525 24/12/11 02:30 AM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
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
Re: Looking for a little help with $?="" [Re: Wims] #235527 24/12/11 02:56 AM
Joined: Aug 2010
Posts: 5
S
Szantovitch Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2010
Posts: 5
ahh! thanks a lot! that's perfect!

Re: Looking for a little help with $?="" [Re: Szantovitch] #235715 06/01/12 09:38 PM
Joined: Dec 2002
Posts: 86
Zmodem Offline
Babel fish
Offline
Babel fish
Joined: Dec 2002
Posts: 86
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

Last edited by Zmodem; 06/01/12 09:40 PM.

-Zmodem
Re: Looking for a little help with $?="" [Re: Zmodem] #235722 07/01/12 06:30 AM
Joined: Oct 2009
Posts: 24
Scakk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2009
Posts: 24
I myself use $crlf in some $input 's and have never had to use the $+ to make it work.

Re: Looking for a little help with $?="" [Re: Scakk] #235726 07/01/12 05:14 PM
Joined: Jul 2006
Posts: 3,559
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,559
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