Re: Sockets within Applescript?
Re: Sockets within Applescript?
- Subject: Re: Sockets within Applescript?
- From: "Daniel A. Shockley" <email@hidden>
- Date: Fri, 3 Oct 2003 20:56:56 -0400
Jim,
I haven't done this myself (know almost nothing about programming
sockets directly), but it looks like your best bet is to write a C or
perl program and then call it from AppleScript using do shell script.
I've seen one method where you have the entire code of the C/Perl
program in a string in your AppleScript, write it to a temp file,
compile/run it and then send it parameters. Not always the most
efficient way to do this, but perhaps creating it if needed.
O'Reilly has a column about using sockets from C in OS X that may help:
<
http://www.macdevcenter.com/lpt/a/3059>
Hey! If you write an AppleScript interface to sockets, perhaps you
could pass on any useful code. Of course, most of my networking needs
are covered by the command-line utility cURL.
----
Daniel A. Shockley, Database Programmer
MacEasy Computing
email@hidden
email@hidden
http://www.maceasycomputing.com
http://www.danshockley.com
Date: Fri, 3 Oct 2003 15:31:42 -0700
From: "Jim M." <email@hidden>
Subject: Sockets within Applescript?
Is there a way to read and write TCP/IP sockets from Applescript?
Specifically, I need to communicate via sockets with an Excel VBA
program, and I was thinking of using Applescript to deliver the socket
data to the VBA app. Where I'm not clear is how to read TCP/IP sockets from
Applescript. Is this done natively, or via an intermediate program
written in Perl or C?
For more background, under Windows I establish the socket connection
under VBA with the Winsock control, but ActiveX isn't available on
the Mac, hence my interest in establishing the socket connection via
Applescript.
--
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.