[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re Command shell



PureBytes Links

Trading Reference Links

I found this one months ago ... and using some other software .. yesterday i
found out how to get TS to open the DLL.

Basically  The DLL lets you run a "batchfile or External Program" from TS

This is way coool

for the example [ in english not el ]

[to open a order to read to a broker]
If mov > mov[1] then begin
  print my order to order.txt;
  ccshell"notepad myorder.txt";
end;

OR.....

[to send a email to a broker]
If mov > mov[1] then begin
  print my order to order.txt;
  ccshell"EmailProg /myorder.txt /brokerdude@xxxxxxxx";
end;



OR.....

[to play a wav file]
If mov > mov[1] then begin
  ccshell"playwav c:\sound\movinaverageisup.wav";
end;

so the possibilities are endless to how many wav files you play.

There are heaps or other "command line programs" out there as well so if you
can dream it it should be possible to script it in a batchfile.

Below is a real example.
############################################
DefineDLLFunc: "c:\program files\omega
research\program\ccshell.dll",int,"CCSHELLEXEC",lpstr;

if currentbar = 1 then begin
 CCSHELLEXEC("start cmd.exe");  {this line starts a command window}
 CCSHELLEXEC("call C:\wavtest\t.bat"); {this runs a batchfile and then
closes the CMD window unlike the one before}
 CCSHELLEXEC("start notepad C:\wavtest\t.bat"); {this opens notepad and
notepad opens t.bat}
 end;

###########################################


IMPORTANT BIT
One final note ..... "YOU MUST HAVE A DIRECTORY CALLED "C:\TEMP"
the dll writes to this directory a txt file of what it did.

ANOTHER BIT
it returns "0" if it was successfull and "1" if the cmd failed.


Cheers
Cameron


[DLL is too large to distribute via the list.  It can be found at:]
  <ftp://ftp.eskimo.com/u/j/jimo/ccshell.zip>


-----Original Message-----
From: Ian Cunningham [mailto:cuncomm@xxxxxxxxxxx]
Sent: Friday, April 23, 2004 2:42 AM
To: c
Subject: Re[7]: cracking .ELS files

Hello c,

Thursday, April 22, 2004, 12:42:13 AM, you wrote:

c> Actually ....after some digging around .... i have something else that will
c> definately work ..probably better than alert.dll ... interested?

 What ya got?


--
Best regards,
 Ian                            mailto:cuncomm@xxxxxxxxxxx

{step 1 
make sure you have a c:\temp directory
step 2
copy ccshell.dll to omega's "program" directory
step 3 
include in your code the following
}
if currentbar = 1 then begin
DefineDLLFunc: "c:\program files\omega research\program\ccshell.dll",int,"CCSHELLEXEC",lpstr;
   CCSHELLEXEC("start cmd.exe");
{[will start a cmd window and continue processing stuff]}
 end;
{
returns 0 if successful
1 if errored}