mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 28
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2003
Posts: 28
Hello!!

I have i question,

I have te follow command :

/services memo $me list

It's used by chatspace to read memo's but me question is how put i the output of that command into a listbox/textfield?

I hope you can help me!! I have try it en try it again but it don't work.

GReetzz

Thank you for your help!

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
You use the on *:NOTICE:*:?: event. You can modify the matchtext section or check for formatting using IF-ELSEIF-ELSE statements to check what's been sent. Also, you would check for if ($nick == MemoServ) or whatever your memo service is called.

Without seeing the exact format of the notices sent by MemoServ, it's impossible to tell you exactly what the code would be. It's not hard to filter the lines from any of the services, though.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Mar 2003
Posts: 28
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2003
Posts: 28
The command give the follow output:

End of Memo List

But when i have memo's :

1 chatlog 07/22/03 06:47:43 New
2 chatlog 07/22/03 06:47:44 New
3 chatlog 07/22/03 06:47:45 New
4 chatlog 07/22/03 06:47:45 New
5 chatlog 07/22/03 06:47:46 New
End of Memo List

I would like to put that output into a listbox (dialog)

Thank you

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Assuming that chatlog is the nickname that sent you those memos, you can boil all that down to the following wildcarded string for use in an on NOTICE matchtext:
Code:

on ^*:NOTICE:& & ??/??/?? ????????*:?:{
  if ($nick == MemoServ) {
    did -a dialogName ID $1-
    haltdef
  }
}
on ^*:NOTICE:End of Memo List:?:{
  if ($nick == MemoServ) {
    haltdef
  }
}

The wildcard * means zero or more characters.
The wildcard ? means one and only one character.
The wildcard & means one and only one word.

Modify that basic script to suit your specific needs.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Mar 2003
Posts: 28
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2003
Posts: 28
But what's the problem i don't kwow the nick of memoserv. I can't see that nick. The output of the command is dropped into me status window without nick. confused

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Then you will have to open a debug window (/debug -p @Debug to turn it on, /debug off to turn off logging) and see exactly how it is coming to you. It might be a SNOTICE instead of a NOTICE. If it is, just replace NOTICE with SNOTICE, change the :?:{ to :{ and get rid of the nick check and its closing }
Code:

on ^*:SNOTICE:& & ??/??/?? ????????*:{
  did -a dialogName ID $1-
  haltdef
}
on ^*:SNOTICE:End of Memo List:{
  haltdef
}

Or it might just be that $nick will be the services server (services.yourIRC.net).


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Mar 2003
Posts: 28
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2003
Posts: 28
It don't work i have try it the following scripts

Code:
 
on ^*:SNOTICE:& & ??/??/?? ????????*:{  
  echo #lobby Hellow
  did -a dialogName 1 $1-  
  haltdef
}

on ^*:SNOTICE:End of Memo List:{  haltdef }
 


I have snotic change in notic but the echo i have build in to test doesn't appears.

greetz

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
In order to proceed any further, I would need to see the output from the @Debug window I mentioned earlier. I have no idea what format your message are coming in, so I can't predict what kind of event is triggering in response to them.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Mar 2003
Posts: 28
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2003
Posts: 28
Oke this is my output:


-> site.chat.server SERVICES memo chatlog list
<- :site.chat.server 277 chatlog 1 TheDude 07/23/03 02:18:20 Old
<- :site.chat.server 277 chatlog 2 TheDude 07/23/03 02:21:44 Old
<- :site.chat.server 278 chatlog :End of Memo List

Thank you

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
-> site.chat.server SERVICES memo chatlog list

You send the command: SERVICES memo chatlog list

<- :site.chat.server 277 chatlog 1 TheDude 07/23/03 02:18:20 Old
<- :site.chat.server 277 chatlog 2 TheDude 07/23/03 02:21:44 Old
<- :site.chat.server 278 chatlog :End of Memo List

Services responds using a numeric 277 for each memo. That means you can use raw 277:*:{ commands } to capture the response and do whatever you want with it. You will know you have reached the end of the list of memos when you get raw 278:*:{ commands }. $1 will be chatlog, $2 in the 277 will be the memo number, while $2- in the 278 wil be the End of Memo List message. Consider how $1 through $6 work out.
Code:

277 chatlog 1 TheDude 07/23/03 02:18:20 Old
       $1  $2   $3       $4       $5     $6
277 chatlog 2 TheDude 07/23/03 02:21:44 Old

From this, you should be able to do what you want to do. smile Good luck and happy scripting.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Mar 2003
Posts: 28
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2003
Posts: 28
Oke i have try the raw command

Code:
 raw 278:*:/echo $active Testing 


Is give no action when i used the /services memo $me list command.

I have try another code to test
Code:
 raw 322:*:/echo 5 $1- 


Raw 233 is for listing channels. I used the /list command but no echo is displayed.

thank you!

bye



Link Copied to Clipboard