Bob,

AppleScript still your friend. Use this AppleScript from your LiveCode app:

tell application "TextEdit"
set targetFilePath to "Macintosh HD:Users:myuser:Downloads:test.txt"

activate
open file targetFilePath
end tell


Just remember to alter the destination of targetFilePath to be the file you
want, and remember that paths are colon separated.

On Tue, 22 Mar 2022 at 15:17, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Andre, the goal for me on this one is to get the path to the app so I can
> use it in the launch command. For some reason, using the short name of the
> app does not work with the launch command, although maybe it should. Also
> launch using just the filename does not launch the default app like you
> would think.
>
> Bob S
>
>
> > On Mar 21, 2022, at 16:16 , Bob Sneidar <bobsnei...@iotecdigital.com>
> wrote:
> >
> > NVM on this one. Apparently the TextEdit.app application is actually in
> /System/Applications/ even though there is a TextEdit.app file in
> /Applications/. Must be a SymLink.
> >
> > Bob S
> >
> >
> >> On Mar 21, 2022, at 16:12 , Bob Sneidar <bobsnei...@iotecdigital.com>
> wrote:
> >>
> >> Also the launch command is not working with the TextEdit application.
> >>
> >> Bob S
> >>
> >>
> >>> On Mar 21, 2022, at 15:58 , Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>>
> >>> I have the following in a script, and it does not seem to be able to
> find the TextEdit.app application on a Mac!
> >>>
> >>> put "/Applications/TextEdit.app" into tTextEditorPath
> >>> if there is a folder tTextEditorPath  then
> >>>       put true into tValidPath
> >>> end if
> >>>
> >>> if tValidPath is false then
> >>>    put empty into tTextEditorPath
> >>> end if
> >>>
> >>> That cannot be right.
> >>>
> >>> MacOS Catalina 10.15.7 LC 9.6.7 lc2.
> >>>
> >>> Bob S
> >>>
> >>>
> >>> _______________________________________________
> >>> use-livecode mailing list
> >>> use-livecode@lists.runrev.com
> >>> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
https://www.andregarzia.com <http://www.andregarzia.com>
Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to