Re: Is same not the same?
Re: Is same not the same?
- Subject: Re: Is same not the same?
- From: Iurista GmbH <email@hidden>
- Date: Sun, 20 Mar 2016 17:03:10 +0100
Oh, thanks for your effort, Nigel.
It's surely true, that my piece of code is by far not the best at all, but this was not my concern.
I was solely wondering, why two AppleScript scripts (one beeing a copy of the other) do provide so different results. After all, this code worked best for a long time.
Rudolf
Am 20.03.2016 um 11.38 schrieb Nigel Garvey:
> Iurista GmbH wrote on Fri, 18 Mar 2016 14:01:17 +0100:
>> ...snip...snip...snip
>
> Filemaker Pro's being launched by having System Events open its
> application file. The script goes on to the next instruction when the
> file's been opened, not necessarily when Filemaker Pro's gone through
> its full launch procedure, so the application process may not actually
> exist when the script tells it to set its frontmost to true. You need
> another delay to wait for the process to appear.
>
> -- 'path to' has its own 'as text' parameter and can return the Applications folder path directly.
> set AF to (path to applications folder as text)
> set FMPfad to AF & "Programme (Users):Software for this MacOS:PPC Software for SL only:6 Büro:app| FileMaker Pro 6:Filemaker Pro.app"
>
> -- It's best to avoid nesting 'tell' statements to different applications.
> tell application "System Events" to set FMPrunning to (application process "Filemaker Pro" exists)
> if (FMPrunning) then
> tell application "Filemaker Pro" to quit
> else
> tell application "System Events"
> open item FMPfad
> repeat until (application process "Filemaker Pro" exists)
> delay 0.5
> end repeat
> tell application process "Filemaker Pro"
> set frontmost to true
> repeat until (window 1 exists)
> delay 0.5
> end repeat
> end tell
> keystroke return
> end tell
> end if
_______________________________________________
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