Tim,
Good catch!
I copied the wrong code example.
It should be “open”. (SORRY)
> $script_t:="tell application \"Finder\""+$LF
> $script_t:=$script_t+"open\""+$Path_Doc_t+"\" as alias"+$LF
> $script_t:=$script_t+"end tell"+$LF
> LAUNCH EXTERNAL PROCESS("osascript
> -";$script_t;$outputStream_t;$errorStream_t)
David Ringsmuth
From: Tim Nevels via 4D_Tech
Sent: Friday, March 10, 2017 5:03 PM
To: [email protected]
Cc: Tim Nevels
Subject: Re: osx open url vs osascript FYI
On Mar 10, 2017, at 9:12 AM, David Ringsmuth wrote:
> 4D v15.2
> OSX 10.12+
>
> I tried many different things to launch a .htm on OSX using OPEN URL, and it
> would not automatically open the document.
>
> Included “safari” in the OPEN URL.
> Used the “*” parameter in OPEN URL.
> Stripped the volume name.
> Removed Document Type and Creator, replaced with 4*char(0).
> Added the Type in CREATE DOCUMENT.
>
> So I used:
>
> $outputStream_t:=""
> $errorStream_t:=""
>
> $LF:=Char(Line feed)
>
> $script_t:="tell application \"Finder\""+$LF
> $script_t:=$script_t+"print \""+$Path_Doc_t+"\" as alias"+$LF
> $script_t:=$script_t+"end tell"+$LF
> LAUNCH EXTERNAL PROCESS("osascript
> -";$script_t;$outputStream_t;$errorStream_t)
>
> This works great!
I am confused by this post. Your first statement is you are trying to OPEN an
.htm document on macOS. But your AppleScript code will not open the document,
it PRINTs it.
Tim
********************************************
Tim Nevels
Innovative Solutions
785-749-3444
[email protected]
********************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************