mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2011
Posts: 6
D
dutchy Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Feb 2011
Posts: 6
hi. I want to send some trading signals which are generated automatically during the day to the command line in some MIRC channel to be automatically displayed to participants in that channel.

The program which I use to generate these signals uses it's own script language but also allows for me to use jscript and vbscript.

I wonder if there is some jscript or vbscript already available somewhere which can do this. I have been looking but can't find any,

thanks, dutchy

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You can use a DDE command line tool like http://www.robvanderwoude.com/ddecommandline.php#DDE_Run

to interact with mIRC (see /help DDE)

You can also use SendMessage.

Both of these (DDE, SendMessage) might be available directly from within VBScript, so you can check for that too.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Feb 2011
Posts: 6
D
dutchy Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Feb 2011
Posts: 6
that was quick smile

I will have a look if I can figure it out.

thanks!

Joined: Feb 2011
Posts: 6
D
dutchy Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Feb 2011
Posts: 6
I looked at it but I already see that it will take be quite some time and effort to figure it out.

I'd like to ask my question again if there is already someone who has figured this out in jscript or vbscript. I program in another script language but this program (Amibroker) also allows you to add code within it's native AFL script using jscript or vbscript.

I thought that this is what a lot of people already had done but apparently not. If you have worked it out in jscript or vbscript I would be very interested,

thanks, Dutchy

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
One way, though not the best would have your VBS/JS write to a file everything you want to send via sendmessage within your mIRC's directory. Then within mIRC run a timer to check that file every so often. If it contains info, process it, delete the lines.



Something like the following, but this is just an example and hasn't been tested:


In your mIRC
Code:
On *:Start:{
  .timerCheckFile -oi 0 60 CheckFile
}
alias CheckFile {
  if ($isfile(Thisfile.txt)) {
    while ($read(ThisFile.txt,np,1)) {
      echo -s :: Hey, I just read this line: $v1
      write -dl1 ThisFile.txt
    }
  }
}



Then in your vb script
Code:
set FSO = CreateObject("Scripting.FileSystemObject")
if (FSO.FileExists("path to mirc\ThisFile.txt")) then
  mFile = FSO.OpenTextFile("path to mIRC\ThisFile.txt")
else
  mFile = FSO.CreateTextFile("path to mIRC\ThisFile.txt")
end if

mFile.Writeline("Data to write to TheFile.txt")
mFile.Close

Last edited by FroggieDaFrog; 04/03/11 12:33 PM.

I am SReject
My Stuff
Joined: Feb 2011
Posts: 6
D
dutchy Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Feb 2011
Posts: 6
thanks for your help. I will try it out. Indeed an idea although the signals I am wanting to send to mIRC are real time. But it is very helpfull and I will try it out, regards, Dutchy


Link Copied to Clipboard