As Nisus Writer Pro continues to crash when pasting content that has been copied from certain websites (especially threaded ones such as Twitter, Nextdoor, etc.), I have scripted a simple workaround. Just copy the content you want, and then run this little AppleScript. It will paste the clipboard contents into a blank Apple Pages document instead of into Nisus Writer Pro. It then copies the content from Pages to a new Nisus document. No crash. Tip: If you paste these lines into a new Scripting Shortcut, you can turn it into a simple menu item or a Stream Deck button.
tell application "Pages"
activate
make new document with properties {document template:template "Blank"}
tell application "System Events"
tell process "Pages"
key code 9 using {command down} -- paste
delay 1
key code 0 using {command down} -- select all
delay 1
key code 7 using {command down} -- copy
delay 1
end tell
end tell
end tell
tell application "Nisus Writer Pro"
activate
tell application "System Events"
tell process "Nisus Writer Pro"
key code 45 using {command down} --create new document
key code 9 using {command down} --paste
end tell
end tell
end tell
Paste without Crash (AppleScript)
Paste without Crash (AppleScript)
Al Hatch
Re: Paste without Crash (AppleScript)
Does it solve your problem if you run this AppleScript between copying the web page text and pasting it into NWP?
use scripting additions
set x to the clipboard as text
set the clipboard to x
use scripting additions
set x to the clipboard as text
set the clipboard to x
Re: Paste without Crash (AppleScript)
Thanks. Yes, that prevents the crashing, and the text portion is pasted.
However, the advantage of my more elaborate script is that it preserves images.
However, the advantage of my more elaborate script is that it preserves images.
Al Hatch
Re: Paste without Crash (AppleScript)
Good news! This month's version 3.4 update solves this problem.
Al Hatch
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Paste without Crash (AppleScript)
Thanks for the update Al! The crashes were probably caused by a bug related to SVG images, which are not infrequently encountered on certain websites. That bug was fixed with Nisus Writer Pro version 3.4.
Re: Paste without Crash (AppleScript)
Hmm... the release notes for Nisus 3.4 were pretty sparse. Did not mention any SVG changes. Was that part of the general Sonoma bug fix suite?
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Paste without Crash (AppleScript)
There were a variety of unmentioned system compatibility/stability fixes in version 3.4, but the SVG fix should have been called out separately because it wasn't related to Sonoma. That bug affects some earlier systems as well.