Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 01-26-2005, 09:04 PM
jamesb jamesb is offline
Junior Member
 
Join Date: Dec 2004
Posts: 13
Default DDE

procedure Command(Service, Cmd: String);
begin
try
DDE := TDDEClientConv.Create(nil);
DDE.SetLink(Service, 'COMMAND');
DDE.OpenLink;
DDE.PokeData('COMMAND', PChar(Cmd));
finally
DDE.Free;
end;
end;



it works for: Command('mIRC', '/msg #Channel Hello ');

i cant figure out how to send in channel content of Label1.Caption, any help with this?

James
Reply With Quote
  #2  
Old 01-26-2005, 10:09 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 6,699
Default RE: DDE

Should be easy:

Code:
Command('mIRC', Format('/msg #Channel %s ', [Label1.Caption]));
MvG
Peter


Objective reality is a delirium caused by lack of alcohol in blood.
24 hous in a day, 24 beers in a case. Coincidence ???
There are 10 kinds of people: Those who understand binary and those who don't
Reply With Quote
  #3  
Old 01-27-2005, 11:39 AM
jamesb jamesb is offline
Junior Member
 
Join Date: Dec 2004
Posts: 13
Default RE: DDE

it works great, the only problem is that when a $ sign is there the $ and numbers after it are not showing.

for example: $100 shows nothing in channel
$0.01 shows 0 only

James
Reply With Quote
  #4  
Old 01-27-2005, 10:01 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 6,699
Default RE: DDE

Hi ...

This can be done also:
Code:
Command('mIRC', '/msg #Channel ' + Label1.Caption);
Perhaps you'll need to typecast:
Code:
Command('mIRC', PChar('/msg #Channel ' + Label1.Caption));
MvG
Peter

Objective reality is a delirium caused by lack of alcohol in blood.
24 hous in a day, 24 beers in a case. Coincidence ???
There are 10 kinds of people: Those who understand binary and those who don't
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.