Re: run app hidden on remote machine, possible?
Re: run app hidden on remote machine, possible?
- Subject: Re: run app hidden on remote machine, possible?
- From: demski <email@hidden>
- Date: Sat, 24 Dec 2005 00:40:45 +0100
Am 24.12.2005 um 00:22 schrieb Paul Berkowitz:
On 12/23/05 2:28 PM, "demski" <email@hidden> wrote:
If you 'open' an app then it will come frontmost, just like if you
'activate' it.
However, if you 'tell application "iCal" to launch', it should
launch in the
background, behind any other active applications.
Yeah, I tried "launch" but this won't RUN the app, if it wasn't
before, this only works with local apps, I guess, but they would be
started in any case, when spoken to locally.
maybe there is another hint? I found articles covering stuff like the
constant "hidden"; could this be something worth of?
Although I didn't find any glue how the syntax works, or better: if
it works together with running or opening apps...
What exactly does "running" iCal involve, other than simply
launching it?
as far as I experienced, launch will not "start" a remote application
if it was not running before. By definition of the
AppleScriptLanguageGuide from Apple the difference seems to be, that
launch will start (launch, run) a not running application without
doing things like the otherwise normal starting procedures (bringing
to front, opening starting windows...). So my first idea was that
this should be the right approach... but like I said before it doesn't.
the only command I got to work was open til now. launch won't run it,
and run will crash scriptEditor.
maybe You can adapt the following snippet for a little testing?
repeat with amac in my alleFinden() --calls a handler which gets any
of 5 running machines
set calla to "iCal" as string
set se to "System Events"
set fin to "Finder"
tell application "Finder" of machine amac -- like: "eppc://
user:email@hidden.1.x:3031"; this is inside a loop for I have to do
it on a number of machines
set appFol to path to applications folder as string
set appFol to appFol as string -- maybe unneccessary?
set ical to appFol & "iCal.app" as string -- maybe unneccessary, too?
open ical -- I tried also run, run application, tell ical to run,
none worked; all expressions containing 'run' crashed scriptEditor...
delay 3 -- is at least neccessary until I find another way to wait
for ical to be finished starting
end tell
tell application calla of machine (amac as string)
using terms from application "iCal"
if not (exists calendar "Auftraege") then
set myCal to make new calendar with properties
{name:"Auftraege", writeable:true}
end if
set tV to (summary of events of calendar "Auftraege")
if jobNr is not in tV then
set KVda to make new event at end of events of calendar
"Auftraege" with properties {start date:deadline, end date:(deadline
+ 1800), summary:jobNr, description:job}
make new sound alarm at end of sound alarms of KVda with
properties {trigger date:((current date) + 30)}
make new sound alarm at end of sound alarms of KVda with
properties {trigger interval:-1440}
make new sound alarm at end of sound alarms of KVda with
properties {trigger interval:-60}
set url of KVda to myPath
show KVda
end if
end using terms from
end tell
end repeat
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40unter-anderem.com
This email sent to email@hidden
_______________________________________________
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