Reply to topic  [ 13 posts ] 
When are macros visible in the Finders Column view? 
Author Message

Joined: 2007-04-12 14:59:36
Posts: 229
If I open the Nisus Macro Folder in the Finder, some macros can be read directly in the Finders Column View, but most show only the Nisus icon. Why is that?


2013-11-05 04:55:28
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
I'll say that I never noticed this before, but it seems to be due to whether the file is saved as plain text or not. Obviously perl macros are plain text, so you can see their code, and for a nisus macro it wouldn't matter if it is plain text or not (unless there are some attribute sensitive find statements in them). But I guess more recently Nisus saves macros (as rtf?) by default, and without the .rtf extension the Finder can't read them.

Well that's my interpretation of the facts anyway… :roll:

_________________
philip


2013-11-05 05:21:41
Profile

Joined: 2007-04-12 14:59:36
Posts: 229
I was talking of standard Nisus macros, with the ending .nwm not on applescript or perl used by Nisus.
I did not find a clear indication about readability from the date of creation.
The interest of seeing the contents of macros is of course to let you find older models when you write a new one.
I am also astonished that the finder seems unable to search for words in the contents of macros, visible or not ...
I think it would be helpful if a Nisus person would clear up this little mystery.


2013-11-05 08:28:22
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
js wrote:
I was talking of standard Nisus macros, with the ending .nwm

Well me too.
You can try the following little experiment. Save a .nwm macro as text. Then replace the .txt extension with .nwm. You will now find that you can read the macro in the finder no problem. And the macro still runs.
Now try the following. Save a macro as .nwm and then in the finder change the extension to .rtf. Presto! You will also be able to read it it in the finder. (But it won't appear in the macro menu anymore :( )

So you can see that .nwm files are just .rtf files with a funky extension.

_________________
philip


2013-11-05 20:09:44
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
Philip is exactly right here. NWP macro files are most often just stored using RTF codes inside, with a ".nwm" file extension. It's also possible to store plain text inside a ".nwm" file; NWP is just as happy to load that.

For whatever reason, the Finder will display a preview for the macros containing plain text, but is not smart enough to detect and decode the RTF. If we really wanted to solve this, NWP would have to come with a QuickLook generator that handles the ".nwm" extension and decodes the RTF.


2013-11-06 17:55:04
Profile WWW
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Maybe an option to save macros as text might be a simpler solution? (For some cases at least?)

_________________
philip


2013-11-06 20:05:04
Profile

Joined: 2007-04-12 14:59:36
Posts: 229
Martin says:

For whatever reason, the Finder will display a preview for the macros containing plain text, but is not smart enough to detect and decode the RTF. If we really wanted to solve this, NWP would have to come with a QuickLook generator that handles the ".nwm" extension and decodes the RTF.

Quote:
But my question at the outset was: Why does the Finder show the text of SOME Nisus ".nwm" macros with colors and all. And why does it not do the same for most of them. I cannot discover any difference. I have a number of Nisus Macros which are shown in the Finder as they should, the last two are from Sept 2010, but most older ones as well as newer ones don't show contents. I can't remember having done anything special for those that work.


Of course one could make text only macros, as phspaelti suggests, but I would like to keep the colors.


PS


2013-11-07 09:43:44
Profile

Joined: 2007-04-12 14:59:36
Posts: 229
Martin says:

Quote:
For whatever reason, the Finder will display a preview for the macros containing plain text, but is not smart enough to detect and decode the RTF. If we really wanted to solve this, NWP would have to come with a QuickLook generator that handles the ".nwm" extension and decodes the RTF.


But my question at the outset was: Why does the Finder show the text of SOME Nisus ".nwm" macros with colors and all. And why does it not do the same for most of them. I cannot discover any difference. I have a number of Nisus Macros which are shown in the Finder as they should, the last two are from Sept 2010, but most older ones as well as newer ones don't show contents. I can't remember having done anything special for those that work.

Of course one could make text only macros, as phspaelti suggests, but I would like to keep the colors.


PS


2013-11-07 09:45:27
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
js wrote:
But my question at the outset was: Why does the Finder show the text of SOME Nisus ".nwm" macros with colors and all. And why does it not do the same for most of them. I cannot discover any difference. I have a number of Nisus Macros which are shown in the Finder as they should, the last two are from Sept 2010, but most older ones as well as newer ones don't show contents. I can't remember having done anything special for those that work.

I'm afraid I don't know why the Finder would have a preview for one ".nwm" containing RTF but not another. One hypothesis: at some earlier point (eg: OSX 10.6) the Finder was smart enough to recognize the RTF inside and generate a preview. These previews can be stored in the file's metadata, and perhaps it persists to this day?


2013-11-07 14:49:31
Profile WWW

Joined: 2007-04-12 14:59:36
Posts: 229
Martin wrote:

Quote:
I'm afraid I don't know why the Finder would have a preview for one ".nwm" containing RTF but not another. One hypothesis: at some earlier point (eg: OSX 10.6) the Finder was smart enough to recognize the RTF inside and generate a preview. These previews can be stored in the file's metadata, and perhaps it persists to this day?


I think this is the right answer. It could explain the following: If you open a Macro with visible content and make whatever changement to the text, it is not visible any more afterwards.


2013-11-08 00:29:51
Profile
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
Just to come back to this once more. the following works and creates such a legible preview anytime you want:
  1. Change the macro extension to .rtf
  2. Open the macro, save, and close
  3. Change the extension back to .nwm
And the result is that you have a working macro and a legible preview.
Alternatively just save the macro as .rtf to begin with and then change the extension. (You need the .nwm extension, so that Nisus 'sees' the macro.)

Perhaps one could write some kind of apple script to do this (semi-)automatically?

_________________
philip


2013-11-14 01:10:23
Profile

Joined: 2007-04-12 14:59:36
Posts: 229
Great.
It can be done by a Keyboard Maestro Editor macro. (Give it half a second pause after returns and press buttons "Use .rtf" and "Use .nwm" with a space before the dot.)


2013-11-14 15:33:39
Profile
User avatar

Joined: 2006-06-16 16:17:50
Posts: 124
Location: Brighton & Hove, UK
phspaelti wrote:
Just to come back to this once more. the following works and creates such a legible preview anytime you want:
  1. Change the macro extension to .rtf
  2. Open the macro, save, and close
  3. Change the extension back to .nwm
And the result is that you have a working macro and a legible preview.
Alternatively just save the macro as .rtf to begin with and then change the extension. (You need the .nwm extension, so that Nisus 'sees' the macro.)

Perhaps one could write some kind of apple script to do this (semi-)automatically?


An AppleScript could of course be created to do this as I know you know but the simplest way is to use Automator and a very small bit of AppleScript.

In Automator there are the following actions in "Files & Folders" library:

Get Selected Finder Items
Rename Finder Items
Open Finder Items

And in the Utilities library there is the action:

Run AppleScript

With "Rename Finder Items" you can do a "Replace Text" in "extension only".

I think you will need a tiny AppleScript to close the Nisus Writer files, that is all, and this is because Nisus Writer doesn't install any Automator actions. I think it would be great if Nisus Writer did install some Automator actions actually.

I haven't created this Automator script myself, but I do use Automator a lot for file renaming and that kind of thing. I really like Automator :)

_________________
Patrick


2013-11-16 15:23:38
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ] 

Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software