Yes, but I did not think it was the same thing... I don't understand that just adding the name property changes the nature of the file (now, it that's a bug, that's a different thing :)
You can't give a document a name and then save it to a folder path.
You have to provide the full save-path.
This seems to work:
save as "com.apple.rtfd" in file destPath
Ok, so you confirm that there is no "format" property or anything in TE, right ?
command syntax
parameters
| | | | direct parameter | required | reference | the object for the command | as | optional | text | The file type in which to save the data. | in | optional | alias | The file in which to save the object. |
|
rtfd is a file type.
To contrast – try saving as this:
save as "public.plain-text" in file destPath
Be sure to change the file extension too.
Save as any given file-type and get the Type Identifier of the file – splice it into the script and test.
can't. System Events sees them but only offers the ability to click the link – not open.
Ok, but that would actually result in opening the thing right? Which would for for me. I just need to have the thing be on a link and "click" it to open the target file.
If all you need to do is click the link then it's not too difficult.
------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2017/04/24 18:05
# dMod: 2017/04/24 18:13
# Appl: TextEdit, System Events
# Task: Click first hyperlink in a RTF document.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @System_Events, @TextEdit, @Click, @Hyperlink, @RTF, @Document
------------------------------------------------------------------------------
tell application "System Events"
tell application process "TextEdit"
tell (first window whose subrole is "AXStandardWindow")
tell scroll area 1
tell text area 1
tell (first UI element whose role description is "hyperlink")
perform action "AXPress"
end tell
end tell
end tell
end tell
end tell
end tell
------------------------------------------------------------------------------