Idea from Kentaro Kurosaki These are custom identifiers for DCX.dll. These identifiers make a few things a bit easier and faster, such as instead of typing xdialog -c $dname then the did then the control, you would just type $xdc then the did then the control. Simple as pancakes. Enjoy.
xdc return xdialog -c $dname **For easier control creation**
blk return xdialog -g $dname +b $rgb(0,0,0) **For coloring your dialog black**
grn return xdialog -g $dname +b $rgb(0,255,0) **For green dialogs**
red return xdialog -g $dname +b $rgb(255,0,0) **For red dialogs**
blu return xdialog -g $dname +b $rgb(0,0,255) **For blue dialogs**
You talked about "super complicated" at the beginning and then stressed it again at the end.
from Lucius' comment:
if ($super($+(complicated,retireval))) {
that's where i got "super complicated retrieval" from.
The goes without saying you talked about easy and then ended it "not simple."
i defined what i meant by 'simple', then went on to say that i would also use Lucius' idea in the case where v1 is not necessarily 'super complicated', but merely 'non-simple'.
You jargonized your explanation, to me, in an awkward manner that didn't make it concise
jargon, awkwardness, and verbosity are 3 distinct and negative features that i don't recognize in my post. it may be slightly wordy, but i believe that's often necessary in order to be satisfactorily accurate - all things considered.
let alone those who utilize English as a second language.
are you genuinely worried about this?
I'm just being blunt to say what I want to say as a straight shooter.
that's fine, i like when people do that ;)
You talked about "super complicated" at the beginning and then stressed it again at the end. The goes without saying you talked about easy and then ended it "not simple." You jargonized your explanation, to me, in an awkward manner that didn't make it concise and clear for readers to digest it mentally, let alone those who utilize English as a second language.
I'm not trying to offend you in any way, jaytea. I hope you don't steer me wrong. I'm just being blunt to say what I want to say as a straight shooter.
i can see 'philosophy' implying romanticizing or soapboxing (is that a word?) in some way, but i can't see how my post comes across as such. after all, we are discussing a scripting language and not campaigning to end hunger or for world peace ;P
what i dislike is the suggestion that i'm being 'roundabout' or speaking in riddles. it's not the first time i've been accused of it, which is puzzling because i do try to explain things in a direct way that can, primarily, be understood by the person or people i'm talking to, and, secondarily, to any other enthusiast who may come across the post. the distribution of information related to mSL is scattered enough as it is without me having to lead people on an easter egg hunt
wouldn't it be easier to use $v1?
we don't have any super complicated retrievals up there, just a series of elseifs with $v1 = $3. not sure what you mean by 'easier'. easier to type? perhaps. easier to understand? again, sometimes, since it requires the reader to look up to see where $v1 takes its value from. yes, it's a good technique to use in cases where: 1) the original $v1 is a piece of code that is subject to change, and the nature of the code is such that the subsequent elseifs need to change also, or 2) the original $v1 is a piece of code that isn't a simple identifier (one without arguments) or variable. not 'super complicated', but anything that isn't simple.
wouldn't it be easier to use $v1?
if ($super($+(complicated,retireval))) {
if ($v1 == 1) { do this }
elseif ($v1 == 2) { do this instead }
elseif ($v1 == savvy) { touch ProSec's hair }
I haven't ever tried it but I should think the elseif would make sure the $v1 would stay for the main if, although in this format it wouldn't make a difference. The point I'm making is you only need to log the first if as in existance then $v1 for what it actually is. that should shorten a code down but I have never seen incomplete if brackets in any msl script.
Suggestions?
yes, re-write the code in such a way that you don't need to use your idea ;P i gave one example of that and there are many more suitable alternatives depending upon the nature of the overall script
Wait. What if i made the identifier $elseif? mIRC would evaluate it and it would still shorten the code, right?
no, not in the way you want at least. 'elseif' has to appear statically and as the name of the command. you'll discover at some point that short code is not necessarily good code. unfortunately, the pages and pages of explanation about this are buried in various places on this site!
Savvy?
no Jack Sparrow, mIRC script doesn't work like that ;)
if statements, while loops, /var and a few others are commands that involve exceptional parsing routines. in order for this to happen in the case of elseif, for example, "elseif" needs to appear literally at the start of the command. mIRC needs to be able to detect it before it starts evaluating identifiers and variables in your code.
and even if it did work, it would result in rather poor code since the condition(s) contained in '$sc' would be re-examined unnecessarily. this is the logic you're aiming for:
if ($2 == sclick) {
if ($3 == 2) {
}
elseif ($3 == 3) {
}
elseif ($3 == 4) {
}
}
Will your sc identifier work like that? I haven't done mSL in quite some time though but it still just doesn't look right to me... By the way you can use $1 $2 $3- etc etc with aliases as you would in text events
For example:
$test(color) - $1 can call "color".
$test(color, text, name) - $1 calls 'Color'; $2 calls text; $3 calls name.
Just a suggestion as these may clean them up a little bit, but otherwise looks good.