Re: There is no TextEdit.app???
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 > 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 > 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
Re: There is no TextEdit.app???
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 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 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 >>> 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
Re: There is no TextEdit.app???
Craig, the system is not case sensitive. Should the Symlink produce true for there is a folder? If so then I suppose it is a bug. But it's a minor one and it can be worked around. It makes sense for Apple to put such apps in the system, as deleting or worse yet modifying them would take more than admin credentials. Bob S > On Mar 22, 2022, at 06:01 , Craig Newman via use-livecode > wrote: > > Bob. > > There is no way that the uppercase/lowercase difference in a character in a > literal can have that sort of effect. Are you saying you can duplicate this??? > > Craig > >> On Mar 22, 2022, at 7:01 AM, Andre Garzia via use-livecode >> wrote: >> >> Damn, I took a long time formatting that message so the source-code would be >> legible. Well, sorry, don’t know if it was my mail app or the mailing-list >> software, but something borked it. >> >>> On 22 Mar 2022, at 10:36, Andre Garzia wrote: >>> >>> Bob, >>> >>> Another way to check if an application is installed on a mac is by using >>> AppleScript. Here are some functions that work together to check if >>> TextEdit is installed. >>> >>> function q txt >>> return quote & txt & quote >>> end q >>> >>> function isApplicationInstalledByBundleID pID >>> put "try" & cr into tScript >>> put "tell application " & q("Finder") & " to get application file id " & >>> q(pID) & cr after tScript >>> put "return true" & cr after tScript >>> put "on error" & cr after tScript >>> put "return false" & cr after tScript >>> put "end try" & cr after tScript >>> >>> do tScript as “applescript" >>> >>> if the result is "{true}” then >>> return true >>> else >>> return false >>> end if >>> end isApplicationInstalledByBundleID >>> >>> function isTextEditInstalled >>> return isApplicationInstalledByBundleID("com.apple.TextEdit") >>> end isTextEditInstalled >>> >>> >>> >>>> On 21 Mar 2022, at 22:58, Bob Sneidar via use-livecode >>>> 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 > > > ___ > 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
Re: There is no TextEdit.app???
Bob. There is no way that the uppercase/lowercase difference in a character in a literal can have that sort of effect. Are you saying you can duplicate this??? Craig > On Mar 22, 2022, at 7:01 AM, Andre Garzia via use-livecode > wrote: > > Damn, I took a long time formatting that message so the source-code would be > legible. Well, sorry, don’t know if it was my mail app or the mailing-list > software, but something borked it. > >> On 22 Mar 2022, at 10:36, Andre Garzia wrote: >> >> Bob, >> >> Another way to check if an application is installed on a mac is by using >> AppleScript. Here are some functions that work together to check if TextEdit >> is installed. >> >> function q txt >> return quote & txt & quote >> end q >> >> function isApplicationInstalledByBundleID pID >> put "try" & cr into tScript >> put "tell application " & q("Finder") & " to get application file id " & >> q(pID) & cr after tScript >> put "return true" & cr after tScript >> put "on error" & cr after tScript >> put "return false" & cr after tScript >> put "end try" & cr after tScript >> >> do tScript as “applescript" >> >> if the result is "{true}” then >> return true >> else >> return false >> end if >> end isApplicationInstalledByBundleID >> >> function isTextEditInstalled >> return isApplicationInstalledByBundleID("com.apple.TextEdit") >> end isTextEditInstalled >> >> >> >>> On 21 Mar 2022, at 22:58, Bob Sneidar via use-livecode >>> 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 ___ 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
Re: There is no TextEdit.app???
Damn, I took a long time formatting that message so the source-code would be legible. Well, sorry, don’t know if it was my mail app or the mailing-list software, but something borked it. > On 22 Mar 2022, at 10:36, Andre Garzia wrote: > > Bob, > > Another way to check if an application is installed on a mac is by using > AppleScript. Here are some functions that work together to check if TextEdit > is installed. > > function q txt > return quote & txt & quote > end q > > function isApplicationInstalledByBundleID pID > put "try" & cr into tScript > put "tell application " & q("Finder") & " to get application file id " & > q(pID) & cr after tScript > put "return true" & cr after tScript > put "on error" & cr after tScript > put "return false" & cr after tScript > put "end try" & cr after tScript > > do tScript as “applescript" > > if the result is "{true}” then >return true > else >return false > end if > end isApplicationInstalledByBundleID > > function isTextEditInstalled > return isApplicationInstalledByBundleID("com.apple.TextEdit") > end isTextEditInstalled > > > >> On 21 Mar 2022, at 22:58, Bob Sneidar via use-livecode >> 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
Re: There is no TextEdit.app???
Bob, Another way to check if an application is installed on a mac is by using AppleScript. Here are some functions that work together to check if TextEdit is installed. function q txt return quote & txt & quote end q function isApplicationInstalledByBundleID pID put "try" & cr into tScript put "tell application " & q("Finder") & " to get application file id " & q(pID) & cr after tScript put "return true" & cr after tScript put "on error" & cr after tScript put "return false" & cr after tScript put "end try" & cr after tScript do tScript as “applescript" if the result is "{true}” then return true else return false end if end isApplicationInstalledByBundleID function isTextEditInstalled return isApplicationInstalledByBundleID("com.apple.TextEdit") end isTextEditInstalled > On 21 Mar 2022, at 22:58, Bob Sneidar via use-livecode > 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
Re: There is no TextEdit.app???
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 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 >> 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
Re: There is no TextEdit.app???
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 > 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
Re: There is no TextEdit.app???
Also of great curiosity to me, set the tool to "Browse Tool" throws an error in the SE. set the tool to "browse tool" does NOT throw an error in the SE! Bob S > On Mar 21, 2022, at 15:58 , Bob Sneidar 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
There is no TextEdit.app???
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