mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#32123 25/06/03 09:04 AM
Joined: Jun 2003
Posts: 77
O
ozyvent Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Jun 2003
Posts: 77
Im wondering if its possible to add an event "on SNICK" or similar to be a trigger for when a nickname is selected in the nicklist.

I have a dialog and I want an editbox to update with a nick selected from the nicklist. People have given me answers such as using timers and stuff, while that does work, there's no way to trigger these timers etc. when a nick is selected.


.
#32124 25/06/03 12:21 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
if u are talking about dialog, so when u are selecting a line in a list the 'sclick' dialog event is triggered, for example:
on *:dialog:NAME:sclick:ID:{ command }
NAME - dialog name
ID - the list's id

#32125 25/06/03 12:23 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
no he means the identifiers - $snick and $snicks


new username: tidy_trax
#32126 25/06/03 12:58 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
well, after that he said 'dialog' so i think he mean a dialog list, but i'm not sure

#32127 25/06/03 01:03 PM
Joined: Jun 2003
Posts: 77
O
ozyvent Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Jun 2003
Posts: 77
My idea would be something like:
on *:SNICK:{ do stuff }

in my specifc case:
on *:SNICK:{ did -o user 5 $snick($active,1) }
5 being the id of the editbox


.
#32128 25/06/03 01:06 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
the select is on the listbox of a channel or a dialog list ?

#32129 25/06/03 01:09 PM
Joined: Jun 2003
Posts: 77
O
ozyvent Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Jun 2003
Posts: 77
Of the channel.

I have one in the dialog, except its on another tab, and its a bit of a pain going back and forth from tab to tab everytime i need to (for example) kick/ban a user.


.
#32130 25/06/03 01:15 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
ok.. the only way is a timer

#32131 25/06/03 01:16 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
menu nicklist {
Add Dialog: did -a dialog id $$1
}
put in remote but change dilog to name of dialog and id to id of edit box


new username: tidy_trax
#32132 25/06/03 01:17 PM
Joined: Jun 2003
Posts: 77
O
ozyvent Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Jun 2003
Posts: 77
Yeah thats what the were adament about telling me on mircscripts.org except theres 1 SMALL problem...There is nothing to trigger the timer when a new nick is selected. And no START, JOIN etc. dont do what im asking for wink


.
#32133 25/06/03 03:26 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I guess that could be useful, however I'd suggest it be added a little different, instead of ON *:SNICK:commands, I'd say ON *:SNICK:#channel:commands so that way you can limit it to only functioning on certain channels.

#32134 25/06/03 08:07 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
This could be done with the mouse events in a Nicklist menu, if only they were permitted. Why so many mouse/keyboard events are prohibited from being used in #channel windows, is beyond me. (If it's because they can encourage unscrupulous spy scripts... well, there are plenty which do so already)

MENU Nicklist {
sclick: if (%mouse.lb) editbox -a $snick($active,1)
}

Or better yet:

Menu Nicklist {
lbclick: editbox -a $snick($active,1)
}

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#32135 25/06/03 08:24 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
I think this would be ideal:

menu nicklist {
lbclick : selected $1 in nicklist
}

if you look into "/help MOUSE event" this would be uniform w/ it...


Code:
//if ( khaled isgod ) echo yes | else echo no
#32136 25/06/03 09:05 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
... or what I said. :tongue:


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#32137 25/06/03 09:17 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
indeed..., did i actually edit my post over 17minutes?


Code:
//if ( khaled isgod ) echo yes | else echo no
#32138 26/06/03 02:52 AM
Joined: Jun 2003
Posts: 77
O
ozyvent Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Jun 2003
Posts: 77
I personally dont mind how it would work, i suppose thats up to khaled, just as long as it is a trigger for when nicks are selected in the nicklist. smile


.
#32139 26/06/03 12:01 PM
Joined: Dec 2002
Posts: 29
R
Ameglian cow
Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 29
I am quite supprised that you don`t get simple thing as that.
You want new selected nick in nicklist to show up in your dialog editbox,while your dialog is open.
Timer is your event.But you need to start timer first.and you dont start timer every time you select nick you start timer once when you join channel where you are Operator.
When times come to do some action you open your dialog and then select nick in nicklist and that nick will show up in dialog editbox.Then select another nick and that nick will show up in dialog editbox,and so on until you decide to Stop timer or you close your mIRC.You didn`t even try code you got,and you are whining about that.

#32140 26/06/03 02:40 PM
Joined: Jun 2003
Posts: 77
O
ozyvent Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Jun 2003
Posts: 77
Ok... i get what you're saying, but I dont get how the timer is the event, and how it would work when a new nick is selected.

Could you explain a bit further, better yet give me some general idea of what code to use?


.
#32141 26/06/03 03:38 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
for example:
//timer 0 1 if ($active ischan) && ($snick($active,1)) && ($dialog(YOUR DIALOG NAME)) did -a $!ifmatch ID $!snick($active,1)
this will check every second what nick is selected

#32142 26/06/03 05:20 PM
Joined: Dec 2002
Posts: 29
R
Ameglian cow
Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 29
Ok this goes in remote section of mIRC.
on *:join:#: {
if ($nick == $me) {
.timersnick -m 0 500 selectednick
}
}
Replace this caracter # in on join event with name of the channel where are you operator.
Now this is a sample with simple dialog just to show you what it does.
dialog test {
title "Test"
size -1 -1 86 27
option dbu
edit "", 1, 4 3 78 10
button "Close", 2, 26 15 37 11, cancel
}
alias t {
$iif(!$dialog(test),dialog -m test test)
}
alias selectednick {
if ($snick(#)) && ($dialog(test)) { did -ra test 1 $snick(#) }
}
Now put this in remote section and join channel ,to open test dialog type /t then start selecting nicknames in nicklist.
to stop timer type /timersnick off

Page 1 of 2 1 2

Link Copied to Clipboard