mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
- As someone pointed out in the scripts forum, there's no way to retrieve what's been queued with /splay -q. A simple $squeue(N) returning filename would be nice.

- It's currently impossible (AFAIK) to set a local variable to a string with the format number mathematical-operator number without it being calculated. Personally I'd like to see the auto-calculation removed altogether, but seeing as it'd no doubt break a lot of scripts I'd happily settle for a switch to prevent such behaviour.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Are you familiar with the -n switch in /set? If you are and suggesting that there should be a /var -n too, I agree.

Btw, you may know this too, but you can do something like //var %a | set -n %a 1 + 2 | echo -a %a
/set works with the local variable %a and not with a global, just because %a was declared as local with /var earlier in the routine.

Last edited by qwerty; 25/03/04 06:12 PM.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
OK that just blew me away - it turns out I didn't know half as much about /set as I thought I did. I didn't know about the -n switch, in fact I didn't even know that /set performed the calculation in the same way that /var did. And I didn't have a clue that it operated on local variables if they're already declared. I haven't really used /set in years because I thought it only worked with global variables.

Eegads and /unset works too!
I just had a field day with //set %n global | echo -a %n | var %n | set %n local | echo -a %n | unset %n | echo -a %n

Anyway, yes, I was basically suggesting -n for /var.

In light of all this perhaps /unset should also have a switch so that it only unsets local vars if a wildcard is used.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jun 2003
Posts: 195
N
Vogon poet
Offline
Vogon poet
N
Joined: Jun 2003
Posts: 195
couldnt you also do

/var %blah = $eval(1 + 2,0)

I know it works with identifiers and the like such as

var %blah = $eval($me,0)

%blah in this case is $me and not your nickname

No i guess not i just tried it and got 3 anyway. forget this post smile

Last edited by Narusegawa_Naru; 25/03/04 09:05 PM.

Have Fun smile
Joined: Mar 2004
Posts: 4
D
Self-satisified door
Offline
Self-satisified door
D
Joined: Mar 2004
Posts: 4
I don't know if this is in mirc.hlp or not, but I read somewhere that /var is somewhat of a shortcut to /set -l (the -l switch being 'local'). I occasionally use this for keeping the math operations from being parsed (/set -nl).

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
True, now that I know about /set's -n switch I can use that, however since the /set -l vs. /var connection and the 'local variable precedence' behaviour of /set that qwerty described are both undocumented it would still be nice to have a -n switch for /var. In fact it'd still be useful even if they were documented since /var has greater capabilities than /set (ie. multi-variable assigment) and so is preferential in most instances.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Mar 2004
Posts: 26
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Mar 2004
Posts: 26
Quote:
- As someone pointed out in the scripts forum, there's no way to retrieve what's been queued with /splay -q. A simple $squeue(N) returning filename would be nice.


$squeue
Return $true if the queue is occupied, $false otherwise.

Would be nice as well.


Joined: Mar 2004
Posts: 26
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Mar 2004
Posts: 26
Another suggestion, if possible....

have $insong return $false if a song is paused using /splay pause

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
$insong.paused perhaps, but $insong should still return $true if the song you're listening to is just paused at a particular position.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard