Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: execute command line using javascript


Message #1 by "Trio Yulistianto" <triojavascript@y...> on Sun, 15 Sep 2002 04:52:10
thanks for your advice,

can you help explain to me step by step what should i do..?  that my command line program (Disp.exe) can automatically run when any
users load my web...i have copied Disp.exe to each users pc that will load my web

i use redhat server with php supported, my all users use windows 98 with Internet Explorer Browser, 

i made my Disp.exe with C++ programming...

this is the list of my program in c++ named Disp.cpp

Disp.cpp

#include <dos.h>
#include <stdlib.h>

void tulis_ke_display(int terminal,int angka);
int main(int argc,char* argv[])
{
tulis_ke_display(atoi(argv[1]),atoi(argv[2]));
return 0;
}

void tulis_ke_display(int terminal,int angka)
{
static int client[8] = {0x3e0,0x3e4,0x3e8,0x3ec,0x3a0,0x3a4,0x3a8,0x3ac};
static int no_disp[10]={0x03,0x3f,0x52,0x32,0x2e,0xa2,0x82,0x3b,0x02,0x22};

  outport(client[terminal-1]+3,0x80);
  outport(client[terminal-1]+1,no_disp[angka%10]);
  outport(client[terminal-1]+3,0x80);
  outport(client[terminal-1]+1,no_disp[(angka%100)/10]);
  outport(client[terminal-1]+3,0x80);
  outport(client[terminal-1]+1,no_disp[(angka%1000)/100]);
}


this program will send data to ISA card with address io in 1st parameter (terminal)  and display the 2nd parameter (angka)

i have test my Disp.exe in client pc and work well...i just want it run by web..(in client side of course, using
vbscript/javascript).

i really need your help...i really apreciatte your help

thanks, sorry if my english is not good

trio



---------------------------------
Do you Yahoo!?
Yahoo! News - Today's headlines

  Return to Index