mIRC Home    About    Download    Register    News    Help

Print Thread
#138288 28/12/05 12:04 AM
Joined: Mar 2005
Posts: 212
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Mar 2005
Posts: 212
i'd like to set a variable
with the -u switch
and the time for the -u switch
be determined by the contents of another variable

i am unsure of how to accomplish this
any help is appreciated
thankyou

#138289 28/12/05 12:07 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
example:
Code:
var %time = 20
set -u $+ %time %nick nick
  


That will set %nick to nick, then unset it 20 seconds later

#138290 28/12/05 12:11 AM
Joined: Mar 2005
Posts: 212
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Mar 2005
Posts: 212
i knocked this out while waiting for a reply
alias test {
set %testu 10
set $+(-su,$(%testu)) %testv on

i think i was over complicating things
even when i reached a solution i still was smile

Last edited by NeUtRoN_StaR; 28/12/05 12:12 AM.
#138291 28/12/05 12:15 AM
Joined: Mar 2005
Posts: 212
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Mar 2005
Posts: 212
alias test {
set %testu 10
set -su $+ %testu %testv on
returns
* /set: invalid parameters (line 3, script5.ini)

perhaps i should have mentioned both would be global for now

#138292 28/12/05 12:50 AM
Joined: Jul 2004
Posts: 59
S
Babel fish
Offline
Babel fish
S
Joined: Jul 2004
Posts: 59
Code:
alias test {
  set %t 5
  set [ -u $+ [ %t ] ] %v LOL
  .timer 1 3 echo -a %v
}


Works for me. The timer was just to get the variable contents ('LOL') after 3 seconds to make sure it kept it.



#138293 28/12/05 01:06 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
set $+(-su,$(%testu)) %testv on

Thats pretty close to optimal try //set $+(-su,%testu) %testv on

#138294 28/12/05 01:58 AM
Joined: Mar 2005
Posts: 212
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Mar 2005
Posts: 212
works as well
ill have to clean that up in the next update


Link Copied to Clipboard