Code: Select all
$docs = Document.openDocuments
if $docs.count > 1
exit $docs[1].filePath # you get nothing if the document is a new document not having a path
else
exit ‘Just a single document is open.’
end
Code: Select all
$docs = Document.openDocuments
if $docs.count > 1
exit $docs[1].filePath # you get nothing if the document is a new document not having a path
else
exit ‘Just a single document is open.’
end
Code: Select all
$doc = Document.active
$sels = $doc.textSelections
foreach $sel in reversed $sels
$doc.setSelection $sel
Document.setActive $doc
Menu ':Nisus Writer Pro:Services:New TextEdit Window Containing Selection'
end