AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Daten aus Delphi über Irc ausgeben
Thema durchsuchen
Ansicht
Themen-Optionen

Daten aus Delphi über Irc ausgeben

Ein Thema von meccs · begonnen am 17. Apr 2004 · letzter Beitrag vom 20. Apr 2004
Antwort Antwort
meccs

Registriert seit: 23. Mai 2003
Ort: Münster
9 Beiträge
 
#1

Daten aus Delphi über Irc ausgeben

  Alt 17. Apr 2004, 23:22
Hallo
Ich will beim einem buttonklick Daten aus Delphi über ein Irc clienten (mirc usw.) ausgeben nur hab ich jetzt leider absolut kein plan wie... ich hab mir zwar schon mit der Suchefunktion ein bissel geholfen nur leider hat es mein Problen nie wirklich getroffen... hoffe mir kann da einer helfen


so long
meccs
  Mit Zitat antworten Zitat
Benutzerbild von Pseudemys Nelsoni
Pseudemys Nelsoni

Registriert seit: 24. Dez 2002
Ort: Hamburg-Harburg
3.551 Beiträge
 
#2

Re: Daten aus Delphi über Irc ausgeben

  Alt 18. Apr 2004, 09:39
hi,

Delphi-Quellcode:
uses
  DDEMan;

...

procedure TForm1.Button1Click(Sender: TObject);
var
  DDE: TDDEClientConv;
begin
  try
    DDE := TDDEClientConv.Create(nil);
    with DDE do
    begin
      SetLink('mIRC', 'COMMAND');
      OpenLink;
      PokeData('COMMAND', PChar('//echo -a blub'));
    end;
  finally
    DDE.Free;
  end;
end;
Mario
  Mit Zitat antworten Zitat
meccs

Registriert seit: 23. Mai 2003
Ort: Münster
9 Beiträge
 
#3

Re: Daten aus Delphi über Irc ausgeben

  Alt 18. Apr 2004, 17:36
super funktioniert

Vielen Dank!

meccs
  Mit Zitat antworten Zitat
Benutzerbild von Pseudemys Nelsoni
Pseudemys Nelsoni

Registriert seit: 24. Dez 2002
Ort: Hamburg-Harburg
3.551 Beiträge
 
#4

Re: Daten aus Delphi über Irc ausgeben

  Alt 20. Apr 2004, 18:04
np, n kleiner tip, guck nochmal in die mirc hilfe unter "DDE"

Zitat:
DDE

mIRC supports DDE communication, which allows external applications to control mIRC or to request information from it. Note that it's also possible to communicate with mIRC directly by using SendMessage().

mIRC's default service name is mIRC, though note that this can be changed via the options dialog.

DDE Topics
mIRC supports the following DDE Topics.

For each of the following DDE topics an example is given using mIRC's /dde command and $dde() identifier (both are explained after this section) which should help you understand how they work.

Topic: COMMAND
Transaction Type: XTYP_POKE
Item: None
Data (Arguments): One line of text containing the command to be performed.
Returns:Nothing
Example: /dde mirc command "" /server irc.dal.net
Description: This tells mIRC to execute whatever command you give it.

Topic: EVALUATE
Transaction Type: XTYP_REQUEST
Item: The line of text containing variables or identifiers that you want evaluated
Data (Arguments): None
Returns:Evaluated line

Topic: CONNECT

Transaction Type: XTYP_POKE
Item: None
Data (Arguments): one line of text in the form: address,port,channel,number
Returns:Nothing
Example: /dde mirc connect "" irc.undernet.org,6667,#mIRC,1
Description: This will tell mIRC to connect to the server irc.undernet.org, port 6667 and after it has connected it will automatically join channel #mIRC. If the number at the end is a 1 then the mIRC window will be activated, if it is a 0 it will not.

Topic: CONNECTED

Transaction Type: XTYP_REQUEST
Item: None
Data (Arguments): None
Returns:"connected" if you're connected to a server, "connecting" if you're in the process of connecting to a server, and "not connected" if you're not currently connected to a server.
Example: //echo mIRC is currently $dde(mirc, connected) to a server

Topic: EXENAME
Transaction Type: XTYP_REQUEST
Item: None
Data (Arguments): None
Returns: The full path and name of the mIRC EXE file. eg. "c:\mirc\mirc.exe"

Example: //echo The mIRC exe path and name is $dde(mirc, exename)
Description: This might be useful for applications that need to know the path and name of the exe file.

Topic: VERSION
Transaction Type: XTYP_REQUEST
Item: None
Data (Arguments): None
Returns: mIRC version info.
Example: //echo mIRC's version number is $dde(mirc, version)

Topic: INIFILE
Transaction Type: XTYP_REQUEST
Item: None
Data (Arguments): None
Returns: The full path and name of the main INI file that is being used. eg. "c:\mirc\mirc.ini"

Example: //echo mIRC's main ini file is $dde(mirc, inifile)
Description: This might be useful for applications that need to take a look at the INI file for various bits of information.

Topic: NICKNAME
Transaction Type: XTYP_REQUEST
Item: None
Data (Arguments): None
Returns: The nickname currently being used.
Example: //echo My mIRCbot is using the nickname $dde(mirc, nickname)

Topic: SERVER
Transaction Type: XTYP_REQUEST
Item: None
Data (Arguments): None

Returns: The server to which you were last or are currently connected. eg. "irc.undernet.org"
Example: //echo My mIRCbot's irc server is $dde(mirc, server)

Topic: PORT
Transaction Type: XTYP_REQUEST
Item: None
Data (Arguments): None
Returns: The port currently being used to connect to the irc server
Example: //echo My mIRCbot is using port $dde(mirc, port)

Topic: CHANNELS
Transaction Type: XTYP_REQUEST
Item: None
Data (Arguments): None
Returns: A single line of text listing the channels which you are currently on separated by spaces. eg. "#mirc #mircremote #irchelp"

Example: This should only be called by an application, not from within an mIRC alias.
Description: The line of text that this returns could end up being quite long, maybe several k's worth of text, so an application should be prepared to handle this.

Topic: USERS
Transaction Type: XTYP_REQUEST
Item: Channel name, in the form #channel
Data (Arguments): None
Returns: A single line of text listing the users on the specified channel separated by spaces.
Example: This should definitely only be called by an application, not from within an mIRC alias.

Description: You can only request the names of users on a channel which mIRC has joined. The line of text it returns could be very, very long, so any application that uses this must be prepared to handle a single line of several k's worth of text.

DDE Commands and Identifiers
The following commands and identifiers allow you to communicate with other DDE-enabled applications.

All DDE transactions are synchronous, mIRC waits at most one second for a reply or acknowledgement to any DDE request that it makes.

/ddeserver [[on [service name]] | off]
mIRC's default service name is mIRC. The mIRC DDE Server defaults to on at startup unless it finds another mIRC or another application using it's current DDE Service name.

You can use the /ddeserver command to manually turn the dde server on or off. If you have more than one mIRC acting as a DDE server then you should specify a different service name for each mIRC.

/dde [-re] <service> <topic> <item> [data]

This sends an XTYP_POKE by defaults unless you specify the -r switch in which case an XTYP_REQUEST is sent, or if you specify the -e switch, an XTYP_EXECUTE is sent.

If you are sending an XTYP_POKE then all four arguments are mandatory.

If you are sending an XTYP_REQUEST then the first three arguments are mandatory. This is why you can see a "" in the examples above, it acts as a filler and isn't actually used for anything.

If you are sending an XTYP_EXECUTE then only the first three arguments are required.

$dde(name, topic, item, delay)
Returns the value returned by the specified service name, topic, and item, by sending an XTYP_REQUEST.

//echo My other mIRC is $dde(mirc, connected) to $dde(mirc, server)

The item and delay parameters are optional.

The delay value indicates that you want $dde() to wait N seconds for a reply before giving up. The default is one second, which is usually enough.

Note: If the value returned by $dde is too long for mIRC to handle, $dde returns a value of $error.

$isdde(name)
Returns $true if the specified dde name is in use, $false otherwise.

$ddename
Returns the current dde service name in use by the mIRC DDE Server.
Mario
MSN: cyanide@ccode.de
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:10 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz