RE: Telnet friendly App
- Posted by Nick Price <nickpriceis at hotmail.com> Sep 01, 2002
- 448 views
Mario and Andy At first glance this looks like a great approach. I’ll play around with this and post the results. There are several issues I need to test for this to work prime time. I may have 50 handhelds hammering away at my app and they need fast response so the response time to do the system_exec has to be fast. Also if the user kills the session I can’t leave any temporary files around. Thanks again. Nick. Mario Steele wrote: > Hey Again Nicky, > > After writting my last post, I got to thinking, and I happen to remember > > a short cut like way to solve this problem, but would involve writting a > > Euphoria Program inside a Euphoria Program. What you could do, is > create a Specialized Temporary File, in which you can write data in, > with the EXW File. And to solve the problem of the STDOUT with EXW > files, you can write yourself a Front End EX file, that will execute the > > EXW File, then when it finishes, you can read the File, grab the data in > > the file, and print it back out to the screen. > > To do this trick, I'll give you a small Example: > (Note, that I don't actually know how SQL Works, or the wrapper, > this is just for Example) > > -- Win32 Application > include sql.ew > > sequence myData > > SQL_open("mydatabase.sql") > myData = SQL_getField("myCustomer") > SQL_close() > > integer fh > fh = open("temp.dat","wb") > puts(fh,myData) > close(fh) > > -- DOS Program > integer myWait, fh > sequence myData > > myWait = system_exec("exw w32app.exw",2) -- system_exec() will wait for > a Return Code, DOS, or Win32 Program. > fh = open("temp.dat","rb") > myData = gets(fh) > close(fh) > puts(1,myData) > > That's all there is to it. This should work, and allow you to Access > DLL Files, to get data from it, temporarly put the data into a Simple > Text File, and get it back out, and printing it to the screen where the > Telnet Daemon can catch it, and post it to your Telnet Screen. > > Let me know if this works. > > > --( at )^.^( at )--|--( at )^.^( at )--|--( at )^.^( at )--|--( at )^.^( at > )--|--( at )^.^( at )--|--( at )^.^(@)-- > > > EuMario > Mario Steele > Euphoria Instant Messenger (Soon to Come!) > http://groups.yahoo.com/group/euim/ > >