[FIXED] Address script ignored with text files

Any Get Address script is ignored if the application’s document type is a plain text file. (a hook://file address is always returned, instead of the address defined by the script).

Plain text applications like TaskPaper and MultiMarkdown compiler can make good use of an Open Item script and a hook:customScheme address.

This works well with manually prepared markdown links like like [name](hook://taskpaper/...), but specification of such links for plain text files in a Get Address script is getting ignored in favour of the hook://file default.


In an Open Item script for a custom taskpaper scheme, for example, we can make use of TaskPaper’s own API to restore/specify document fold and filter states.

In an Open Item script for a custom mmdcomposer scheme, we can, for example specify the position and size of the document window opened.


There is no such problem :slight_smile:

(A script was failing quietly, and politely deferring to a default, where I was failing to coerce an apparently string-like value to a real string)

Is there any kind of error log that we can look at to detect when scripts are choking ?

Can you post the three scripts you’re trying to use?

Sure – I’ll post to the Script Sharing section once it becomes possible to override the default to hook://file with text documents in Get Address.

(Open Item and Get Name both work fine)

I meant so that I can try and see what’s going wrong — what you’re trying to do should work.

Edit: just seen your update above.

1 Like

My error was to treat the return value of POSIX path as a string. The output in Script Editor gets automatically coerced to a string, so it appeared to be working there, but in fact I needed to properly coerce it for use outside that context.