mIRC Home    About    Download    Register    News    Help

Print Thread
#153782 22/07/06 11:07 PM
O
Othello
Othello
O
Is it possible to set $nick as a Nick Identifier within a set %variable?

I know you can use /set -n to treat value as plain text.

When I use this statement in a alias it returns my nick and not the Identifier $nick

alias test {
set -n %line Hello $nick $+ , Your message has been recieved....
}

This is what i get
%line Hello , Your message has been recieved....

This is what I am trying to achieve when I set the command
%line Hello $nick $+ , Your message has been recieved....

The only way it seems to work is if I use this command
/set -n %line Hello $nick $+ , Your message has been recieved....

If I try to use it in a alias it does not work. any Ideas on how to achieve the correct responce to using this in a aliases?

#153783 22/07/06 11:14 PM
K
Kurdish_Assass1n
Kurdish_Assass1n
K
try to set $nick as a variable, and/or change $nick to $1, depends on where it's being used..

#153784 22/07/06 11:33 PM
G
genius_at_work
genius_at_work
G
Is this what you are looking for?

I'll use $ctime as an example:

//set %ctime $ctime
//echo -a %ctime

Echos: 1153611089


//set %ctime $!ctime
//echo -a %ctime

Echos: $ctime

-genius_at_work

#153785 22/07/06 11:54 PM
O
Othello
Othello
O
I am trying to set a variable %line
to contain this information

Hello $nick $+ , Your message has been recieved....

that way I can edit my message. the variable would be used in a statement like this

on ^:OPEN:?:*: { msg $nick %line }

#153786 23/07/06 12:01 AM
D
Darwin_Koala
Darwin_Koala
D
Code:
 
alias myLineOfText return Hello $1 $+ , Your message has been received.... 

on ^:OPEN:?:*: { msg $nick $myLineOfText($nick)}
 


Not the only way to skin this particular cat, of course!

Cheers,

DK

#153787 23/07/06 12:09 AM
O
Othello
Othello
O
I am trying to set the line as a variable so other users can edit the line without having to edit the script. that is why I am looking for a way to use this as an alias so when the script is loaded it will not display the users nick.

it seems to be more of a bug within the /set command being used as a alias.

it works using /set -n %line Hello $nick $+ , Your message has been recieved....

but not when I use it as an alias
alias test {
set -n %line Hello $nick $+ , Your message has been recieved....
}

#153788 23/07/06 12:15 AM
K
Kurdish_Assass1n
Kurdish_Assass1n
K
Quote:
Is it possible to set $nick as a Nick Identifier within a set %variable?

I know you can use /set -n to treat value as plain text.

When I use this statement in a alias it returns my nick and not the Identifier $nick

alias test {
set -n %line Hello $nick $+ , Your message has been recieved....
}

This is what i get
%line Hello , Your message has been recieved....

This is what I am trying to achieve when I set the command
%line Hello $nick $+ , Your message has been recieved....

The only way it seems to work is if I use this command
/set -n %line Hello $nick $+ , Your message has been recieved....

If I try to use it in a alias it does not work. any Ideas on how to achieve the correct responce to using this in a aliases?

you're trying to get the actual $nick in there, and, not to replace it with the nick? sorry, I'm just not understanding.

#153789 23/07/06 12:18 AM
O
Othello
Othello
O
yes. That is what I am trying to achieve

#153790 23/07/06 12:22 AM
K
Kurdish_Assass1n
Kurdish_Assass1n
K
ok, understood, I have NEVER tried this, but, I don't know, maybe you could do something like set %line $ni $+ ck w/e here
I don't know, I'll try it really quick, and, if I get there before you, then, I'll let you know what goes on laugh

#153791 23/07/06 12:23 AM
M
MikeChat
MikeChat
M
genius-at-work told you how to do this
test this
Code:
alias test {
  set %line Hello $!nick $!+ , Your message has been recieved....
  msg $active %line
}

using the ! stops the identifier from performing, see if this will do what you asked

#153792 23/07/06 12:25 AM
K
Kurdish_Assass1n
Kurdish_Assass1n
K
:\, lol, I came up with this.. $chr(36) $+ nick etc. lol, but, yea, I'd do what genius said to do :P

#153793 23/07/06 12:51 AM
O
Othello
Othello
O
Thank you MikeChat
That works command for me.....

Sometimes its the simplest thing that enables the most complicated script

#153794 23/07/06 03:54 AM
D
DaveC
DaveC
D
Quote:
Hello $nick $+ , Your message has been recieved....

For that as yuo have been told already its set %line Hello $!nick $!+ , Your message has been recieved....

Quote:
on ^:OPEN:?:*: { msg $nick %line }

For this i beleive you well find you need to use on ^:OPEN:?:*: { msg $nick $(%line,2) }

other wise you really well send "Hello $nick $+ , Your message has been recieved...." to the nick.

#153795 23/07/06 04:10 AM
O
Othello
Othello
O
Thanks davec.
What I was doing, was setting the variables for a script I need to update.

The problem was, when the identifiers were loaded into the dialog window on load. it was loading my own nick as the nick name in the reply message.


Link Copied to Clipboard