I have a TextFactory and an AppleScript.
I do the following:
Open pdf in Acrobat
Select all, copy, paste in a new BBEdit Window, process with the TextFactory, 
run the AppleScript clicking in BBEdit Scripts,
And everything works.
But if I include the AppleScript as the last line in the TextFactory:
It saves the original text copied from the pdf with it’s first line as it’s 
name.
In other words, it’s as if the script (up to AppleScript line) did not work or 
the text was substituted in the AppleScript.
I’m baffled.
The AppleScript:
tell application "BBEdit"
        activate
        set firstLine to line 1 of document of text window 1
        copy firstLine
        set FileName to the clipboard
        set FileName to FileName & ".txt"
        set FileName to "iMac HD:Users:MyUser:Dropbox:Salta 2021 candidatos:" & 
FileName
        save text document 1 to file FileName without saving as stationery
        close project window 1 saving no
        make new text document
end tell

Regards,,
Francisco
--
Lic. Francisco A. Hirsch
https://www.fiscaldemesa.com.ar
Twitter: https://twitter.com/fiscaldemesa
 

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/F8A159E1-D26A-4179-AD8A-315FC639B501%40gmail.com.

Reply via email to