Re: Using Applescript to talk to other computers.
Re: Using Applescript to talk to other computers.
- Subject: Re: Using Applescript to talk to other computers.
- From: Zavpublic <email@hidden>
- Date: Wed, 01 Feb 2012 09:24:01 -0600
The problem here is that I have seen cases between Snow Leopard and Tiger/Snow Leopard when this method seems to work intermittently at best. Even over ethernet.
Now, I use the same method as you, but using the TCP/IP address of the machine.
How instant is your response and sometimes, do you have to issue it twice?
On Feb 1, 2012, at 9:16 AM, Iurista GmbH wrote:
>
> Am 31.01.2012 um 21.22 schrieb Alex Zavatone:
>
>> In the past, I have tried to use AppleScript's eppc:// URLs to establish communications to other Macs with a lot of unreliable results and painful failure.
>>
>> However, using iChat as a command router surprisingly works pretty well.
>>
>> Has anyone out there been successful in using eppc URLs for inter machine communication in AppleScript? If so, would you be so kind to share your approach?
>
> I use this style of scripts to access Apps on the remote machine
>
> My remote Mac (iMac "Lamp") still is a PPC one, runnig either Tiger, Leo or Snow Leo, all of them located on a separate partition.
> Most of the work is done by applescripts sitting on the remote machine (although you can naturally access the remote software directly).
> This remote applescripts are called by local applescripts on my main computer
>
>
> In the two examples given hereunder, I'm going to listen to radio with radioShark.app, regardless which of the OSX'es is running.
>
> I have to start the software and adjust eventually the sound volume.
> The remote applescript to open (here: "Start radioSHARK") is the name of an applescript located in "THE_PATH_TO_THE_APP". NOTE: is is an APPLET.
> The software I want to use is /Applications/radioShark.app (in my case, available logically on all three potential startup disks).
>
> Terminology:
> OWNER: the_user_name_or_shortname_on_the_remote_machine
> PASSWORD: the_password_of_the_remote_user
> REMOTEMACHINE: the name of the remote machine, as it is defined in the sharing preference panel
> PATH_TO_THE_APP: well, that seem clear. In my case, it is the path to a folder on a special partition of the remote machine containing various non Apple software and various small applescripts to start, stop, or otherwise manipulate Software located on the respective startup disk of the remote machine.
>
>
> The starting script looks like this:
> set extMachine to "eppc://OWNER:email@hidden" --defines the access to remote machine
> tell application "Finder" of machine extMachine
> open file "THE_PATH_TO_THE_APP:Start radioSHARK"
> end tell
> Wrapped into a Quickey, the script even tests first at a given time (the daily News), if the remote machine exists before launching radioShark, and launches RealPlayer instead on the main machine, if the test fails.
>
>
> To vary the sound volume of the remote:
> tell application "Finder"
> set x to ""
> set Liste to {"1", "2", "3", "4", "5", "6", "7"}
>
> choose from list Liste with prompt "Wählen Sie die Lautstärke von myHome" default items {"5"} OK button name "Nimm das da" cancel button name "Keins" empty selection allowed 0 without multiple selections allowed
>
> if result = false then
> display dialog "Sie haben nichts ausgewählt" & return & return & return buttons {"Oh je.."} default button 1 with title "Dialogfenster" with icon stop giving up after 2
> error number -128
> else
> set x to result as text
> end if
> if x < 3 then --under 3 is not loud enough for me
> set x to 3
> end if
> end tell
>
>
> set extMachine to "eppc://OWNER:email@hidden" --defines the access to remote machine
> tell application "Finder" of machine extMachine
> open file "THE_PATH_TO_THE_APP:Volume " & x)
> end tell
> On the remote machine there are 7 Applescripts named "Volume 1"....a.s.f, which are then executed....
>
> I use other applescripts of the same style to quit an application, change the startup disk and then restart the remote machine or to shut it down completely.
> Hope that helped.
> Rudolf
>
>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden