nisus.com
https://www.nisus.com/forum/

Save As (and Save To) error
https://www.nisus.com/forum/viewtopic.php?f=17&t=4603
Page 1 of 1

Author:  tomoyuki-kosaka [ 2011-11-10 17:29:34 ]
Post subject:  Save As (and Save To) error

I made the simple macro, which make a new document from selected text on the now editing document.

Code:
$doc1 = Document.active
$text = Read Selection
$doc2 = $doc1.copy
Menu ':Edit:Select:Select All'
Menu ':Edit:Delete'
Select Document End
$doc2.insertText( $text, 'm' )
Save As

### end of macro ###


When I run this macro and saved the new file, always the error dialogue come as "Could not save the file"; however, the file is saved.
Is there anyone can solve this problem?
I'm using NWP 2.0.1 on macosx 10.6.8

Kosaka

Author:  martin [ 2011-11-11 00:58:55 ]
Post subject:  Re: Save As (and Save To) error

That "could not save" message should not be displayed, sorry about that. I think what's going wrong is that the "Save As" command is expecting you to give it a destination path and not handling the save dialog properly.

Luckily there is a workaround. Instead of using the built-in Save As command, you can activate the menu directly, eg:
Code:
Menu "Save As"

Author:  tomoyuki-kosaka [ 2011-11-13 22:36:09 ]
Post subject:  Re: Save As (and Save To) error

Thank you, martin.

That's it!
Menu "Save As" works for my macro.

Quote:
That "could not save" message should not be displayed, sorry about that. I think what's going wrong is that the "Save As" command is expecting you to give it a destination path and not handling the save dialog properly.

I remember this point.

Anyway, I appreciate your kindly support.

Kosaka

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/