mIRC Home    About    Download    Register    News    Help

Print Thread
#268464 19/02/21 12:47 PM
Joined: Dec 2019
Posts: 45
Q
quartz Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Dec 2019
Posts: 45
a few things on the list....some things I've been wondering for a while

I haven't exhaustively tested these, if some of them already have a solution


1)

dialog 'id' use $gettok, so rather than

dialog %id1
dialog %id2
dialog %id3
dialog %id4

we can have

dialog $gettok(%id,1,44)
dialog $gettok(%id,2,44)
dialog $gettok(%id,3,44)
dialog $gettok(%id,4,44)

would save variable file lines for when there are 100's of id's. %id being "1001,1002,1003,1004" so on


2) colours in dialog multi line text boxes, poss even also bold - at the moment the right angle characters come up

3) is it possible on remote aliases, to have an alias alphabetical list menu, the same way as alias files have

4) any way to disable the square yellow balloon that pops up on conn/dconnect?

5) do all timers get stopped on a disconnection? is it possible to have timers continue on a d/c? (I know on disconnect and can set variables to restart)

6) plus previous request of having a scrollable area of text inside a dialog - a bit like a vertically/horiz scrollable listbox inside a dialog - but just a regular text area

7) also I believe a horizontal scrollbar is only available for a text box in a dialog, and not for a listbox in a dialog

8) also possible to have tooltips for text inside a dialog? for instance if you wanted a 100(x) pixel by 20(y) pixel text, but wanted to pop up a 400 wide area of text when you hovered your mouse over it

9)

; is a comment
can we do comments on the same line

/set %var this ;;;; this is a description


10) also there might be a small bug in the /draw -n switch...

on a desktop picture window,

using these lines (along with a few other windows and stuff being open at the time)

drawrect -nf @perc 11 1 %xpos %ypos 80 20
drawtext @perc 1 arial 14 %xpos %ypos prim: %loop_display

(this is updated many times per sec, the above is called on a /timer -m or /timer -h). it's actually a percentage progress meter

that draws the rectangle, then the text. I have found that sometimes, when other windows have the mouse click focus, the "/drawrect -nf" doesn't clear the 80 x 20 area

in this case the draw rect only clears tha actual area the drawtext is using up (slightly less than the 80 x 20 box). so the light blue colour 11 box will fill the exact area the text is taking up. clicking away from the picture window (a different window), then back on the picture window, updates the graphic properly, and the blue box fills 80 x 20, rather than the /drawtext area


11) final thing, for now - similar to icons in custom dialog's, can we have picture window areas in custom dialogs, eg, I have a progress meter dial, but it needs a seperate picture window. it would be nice if the "picture" window (with /drawlines etc) could be integrated inside a custom dialog


I can sort out screenshots if anyone prefers

quartz #268465 19/02/21 06:48 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
For #9, the syntax you want makes it harder for a variable to contain a semicolon. You can do like:

Code
alias testcomment {
  echo -a $scriptline | ; this is a comment
}


Pro Tip: You can also begin a line with REM instead of a semi-colon, which is why things won't go well if you try to create an alias of that name. i.e. this will create a bracket mis-match in alt+D window which might be hard to locate:

Code
rem {
  echo -a scriptline
}

maroon #268468 20/02/21 12:26 PM
Joined: Dec 2019
Posts: 45
Q
quartz Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Dec 2019
Posts: 45
ah, the pipe is good

rem { - same as

/*

*/ ?

quartz #268470 20/02/21 03:15 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Actually, closing curly-braces can be seen inside a REM or ; comment, and pipe symbols can also be seen inside a comment for purposes of treating the remainder as a comment. /semicolontestA 1 and /semicolontestA 0 behave as you expect, but /semicolontestB never shows the $false message because the comment is not separated from that closing brace by a pipe. REM works the same way as semi-colon here, and the closing bracket is seen for other code, it's just that using the if() demonstrates that conditional branching can't play nice with this edge case. I'm guessing while { } would also have the same branching glitch.

The /* */ comment format won't have any of those issues. It does indent using braces, but won't trigger the mismatch warning if the braces don't match. You can also use braces inside this block to format your text comment for easier reading, but it won't work as expected if you put anything else on the same line with your braces.

Code
/*
{
  text
  text
  {
    emphasized text
    emphasized text
  }
  text
  text
}

*/

Code
alias semicolontestA {
  if ($1 == 1) { echo -a $true msg | rem noop | noop }
  else echo -a $false msg
}
alias semicolontestB {
  if ($1 == 1) { echo -a $true msg | noop | rem noop }
  else echo -a $false msg
}


More detail in https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/232920/

maroon #268494 23/02/21 11:16 AM
Joined: Dec 2019
Posts: 45
Q
quartz Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Dec 2019
Posts: 45
another quick one. again, don't know if I am missing something

alias spacetest {
echo -s firstbit $space
}

alias space {
return $+ next
}


I'd like /spacetest to echo "firstbitnext" in status

so the identifier parses the $+ in "spacetest"

what it actually does is try to run commend "/returnnext"

quartz #268495 23/02/21 01:22 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
$+ is a way to join 2 things together without a space between them, so when you used "return $+ string" it joined them together to see RETURNSTRING used as if it's a command. You could accomplish your goal several ways:

(1)
Code
alias spacetest {
  echo -s $space(firstbit)
}

alias space {
  return $1 $+ next
}


(2) Or simply do:

Code
//echo -s firstbit $+ next
or
//echo -s $+(firstbit,next)

(from the editbox you need the 2 slashes, but when this is in a script you don't)

Have a look at some of the links here, especially the box along the right side: https://en.wikichip.org/wiki/mirc/introduction

maroon #268498 23/02/21 04:38 PM
Joined: Dec 2019
Posts: 45
Q
quartz Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Dec 2019
Posts: 45
ah right the trick is, sometimes I want the result to be

firstbit something.ext

sometimes I want the result to be

firstbitnext.ext

so the identifier that returns "next", I want to hunker up to "firstbit" (using the $+)

but if it's "something", does not have to hunker up

in fact I could probably do it by setting the something var to "$chr(32) something"

Last edited by quartz; 23/02/21 04:51 PM.

Link Copied to Clipboard