on 9/25/01 11:00 AM, andu wrote at [EMAIL PROTECTED] wrote:
> Re: Writing a file remotely
> where Drop Box is a folder on the receiving Mac with read and write file
sharing privileges enabled over TCP/IP. I'm obviously doing something wrong
in my muddling, and I imagine I have to establish a connection between the
two machines first, but I'm not sure how. Any suggestions?
>Use appletalk. Mount the remote folder via Chooser->appleShare and treat
>it like any other folder.
And the above can now be done automatically using apple script driven by
Metacard 2.4... so, this is all probably trivial for the wizards, but for
Mac user newbies:
Keep apple scripts in a substack, one per card, card name is
the label or identifier to call it with and fld name is theScript.
for mounting put this into a field somewhere
tell application "Finder"
mount volume
"afp://user:[EMAIL PROTECTED]/volume_to_mount/"
end tell
(note in the above the server name could be anything on the LAN such as
"Apples"...doesn't have to follow a name.format.type structure, conversely
it could also be the numeric IP address of the server machine, if you are
using local DNS to resolve LAN addresses, highly recommend you use the IP
address and NOT a name which is getting resolved, local DNS can be very
buggy especially if your network team is playing with Apple's latest server
software....assumes you have access to the IP matrix for your network, net
admin should be able to supply that or at least for the machine you are
wanting I/0 on.)
Then your Metacard handler looks like this, where it is assumed the above
script is on a card named "Mount SomeVolume" in a substack named
"CodeChunks"
on MouseUp
put fld theScript of card "Mount SomeVolume" \
of stack "codeChunks" into tScript
do tScript as "applescript"
--now do our file writing stuff
put fld "whatever" into url "file:someVolume/folder/filename.txt"
end mouseUp
Once the volume is mounted, do not specify the full remote path in your
file/url handlers...i.e. in the applescript you specify the path to the
machine/IP over the LAN. But once a volume on that server is mounted then
the path is just to the mounted volume and is NOT preceeded by the server
name ...
server.ip.address/MountedVolume/ ## in the applescript
becomes
url "file:MountedVolume" ## in your metacard script
Hope that helps... I use it every day for distributed delegated task work
that requires the user to be working on remote servers, the access to the
LAN volumes is completely transparent to the user. Well, almost, he has to
dismount them manually, but there is an apple script for that too if you
want it.
metacard + applescript = make your MAC do anything\
except make dosai (Indian pancakes)
Hinduism Today
Sivakatirswami
Editor's Assistant/Production Manager
[EMAIL PROTECTED]
www.HinduismToday.com, www.HimalayanAcademy.com,
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.