RE: Telnet friendly App

new topic     » goto parent     » topic index » view thread      » older message » newer message

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. smile


--( 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/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu