• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running Processes on Remote machine.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running Processes on Remote machine.


  • Subject: Re: Running Processes on Remote machine.
  • From: peter boardman <email@hidden>
  • Date: Fri, 25 Feb 2005 10:01:37 +0000

Kumar Shailove <email@hidden> said on 2005-02-25, 10:44 (+0530 GMT):

> set remoteMachine to "eppc://email@hidden"
> tell application "System Events" of machine remoteMachine
> set myList to name of every application process
> end tell
>
> It doesn't work and doesn't give me the list of processes.
> Any ideas whats the problem and how to resolve this??

My understanding of this is that AppleScript needs to access an application’s dictionary when it compiles a script, but in this example it can’t, since the location of the application you’ve specified isn’t known at that moment - you’re using a variable to specify the application’s location on your remote machine, and the variable isn’t really ‘working’ at compile time. (Compile time is when you click Compile or press Enter in Script Editor, when your typing gets formatted and coloured. It’s also done (if necessary) when you Run the script, usually so quickly you don’t notice.)

In your first example, you provided a route to an application’s dictionary that it could easily find at compile time, since it was on your easy-to-find local machine. But if you’re specifying the machine at runtime you have to provide AppleScript with a suitable dictionary substitute at compile time (even though a different dictionary will be used at run time). This is done with a ‘terms’ block:

--
set remoteMachine to "eppc:// whatever"
using terms from application "System Events"
    tell application "System Events" of machine remoteMachine
        set myList to name of every application process
    end tell
end using terms from
--

When AppleScript compiles this, it uses the System Events on your local machine. When it runs this, it uses the System Events on the target machine.

I think that’s how it goes, anyway.


Pete
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Running Processes on Remote machine. (From: "Kumar Shailove" <email@hidden>)

  • Prev by Date: Running Processes on Remote machine.
  • Next by Date: move / copy / duplicate
  • Previous by thread: Running Processes on Remote machine.
  • Next by thread: International number formats
  • Index(es):
    • Date
    • Thread