Search found 239 matches

by js
2007-06-15 00:58:00
Forum: Nisus Writer Pro Macros
Topic: Bookmarking through macros
Replies: 3
Views: 8248

Bookmarking through macros

I am still wondering, in beta 2, that you cannot bookmark the insertion point. Within a macro you often want to start some process from the insertion point and afterwards get back there. You could do this with the bookmark function, like Bookmark as "myStart" ... actual macro Select bookmark "myStar...
by js
2007-06-11 03:55:04
Forum: Nisus Writer Pro Macros
Topic: Run selection as macro behaviour
Replies: 1
Views: 5505

Run selection as macro behaviour

In beta 2 The "open filepath" macro executes as expected: it opens the file on that path. But if you run a selection "open filepath" thru the 'Run selection as macro' command, the behaviour in beta 2 is different: The file is opend in the background. In beta 1 it was opened in the foreground. Why ha...
by js
2007-05-17 01:37:01
Forum: Nisus Writer Pro Macros
Topic: getting the path of the front document
Replies: 4
Views: 8798

I don't have any advice on AppleScript macros, but you can get the document path using Nisus Macros: $path = Document Property “file path” Write Clipboard $path Thanks. That was helpful, as always. And it's a fine command to have for a macro that inserts links to other files. Just wondering: I have...
by js
2007-05-16 03:21:37
Forum: Nisus Writer Pro Macros
Topic: getting the path of the front document
Replies: 4
Views: 8798

getting the path of the front document

I think Nisus macro language can't return a docment path. So I tried it with an Applescript

Code: Select all

tell application "Nisus Writer Pro public beta"
	set the clipboard to (path of document 1 as text)
end tell
Why does this not work?
by js
2007-05-07 04:39:41
Forum: Nisus Writer Pro Macros
Topic: a wordlist in perl without the print command
Replies: 1
Views: 6225

a wordlist in perl without the print command

The manual says that the original dedicated Perl macros are kept for backward compatibility, but you don't need them any more since you can integrate Perl into Nisus Macros. But earlier Nisus Perl macros often used the print command, which is anoutput command. Those earlier dedicated macros would de...
by js
2007-05-04 01:38:23
Forum: Nisus Writer Pro Macros
Topic: Select text between two bookmarks
Replies: 1
Views: 6560

Select text between two bookmarks

What would a macro look like that selects the text between two bookmarks?
In this context I wonder why Nisus Pro can't set a bookmark to an empty selection. (To the position of the cursor that is).
by js
2007-05-02 10:33:55
Forum: Nisus Writer Pro Macros
Topic: regular expression in a file name
Replies: 8
Views: 11995

Perl will only interpolate variables in a string literal if you use double quote marks, eg: @paths = glob("~/Documents/$filePath*.txt"); Thanks. Finally my macro seems to work. Nearly. First I found problems with empty space in pathnames and or input and how this can be solved. Llke a pathname 'My ...
by js
2007-05-01 04:45:26
Forum: Nisus Writer Pro Macros
Topic: regular expression in a file name
Replies: 8
Views: 11995

Re: regular expression in a file name

$openFile = '' Begin Perl @paths = glob('~/Documents/*.txt'); $openFile = $paths[0]; End Open $openFile If you use Firefox and copy the code, the code will execute as it is. You must have used Safari, I presume; it added spaces, including 2 no-break spaces and a Control character to the code. Remov...
by js
2007-04-30 00:43:07
Forum: Nisus Writer Pro Macros
Topic: Entering formated text into a Find Replace macro
Replies: 2
Views: 7526

Entering formated text into a Find Replace macro

With an open file I would like to use a macro to find any text in Courier (if there is any) and replace it with Times. This seems simple and the Macro Find language has the u and U for considering attributes. But how can I enter ".+" with font attributes into Find and Replace? (You can of course use...
by js
2007-04-28 01:58:10
Forum: Nisus Writer Pro Macros
Topic: regular expression in a file name
Replies: 8
Views: 11995

This is possible, but will require Perl's "glob" operator, which returns an array of matching file names. An example which opens the first text file in the user's Documents folder: $openFile = '' Begin Perl @paths = glob('~/Documents/*.txt'); $openFile = $paths[0]; End Open $openFile Thanks. This w...
by js
2007-04-27 02:41:10
Forum: Nisus Writer Pro Macros
Topic: regular expression in a file name
Replies: 8
Views: 11995

regular expression in a file name

I wrote a macro that uses the Open command, like this:

Open "~/Documents/myFolder/myFile"

Now if I don‘t know the complete name of myFile, but just let‘s say the beginning, is it possible to open it anyway, using a regular expression? (This seems to work with command lines in the terminal).
by js
2007-04-13 11:36:00
Forum: Nisus Writer Pro Macros
Topic: list of discontinuous selections
Replies: 3
Views: 8575

phspaelti wrote:You can collect all the selected bits on the clipboard. Is that what you want?
Assuming you want the bits separated by returns the following will work:

Find and Replace '.+', '\0\n', 'aEs'
Copy
Undo
Yes. that's what I wanted. Thank you.
by js
2007-04-13 02:53:38
Forum: Nisus Writer Pro Macros
Topic: list of discontinuous selections
Replies: 3
Views: 8575

list of discontinuous selections

I had a recurring problem with macros in NWE, but I am not sure whether there is a solution with that in Pro macros. It‘s really very simple: Let‘s say you got a text from the internet with some keywords words marked in italics, and you would like to have a list of them. Easy job with Nisus macros t...
by js
2007-04-12 15:19:49
Forum: Nisus Writer Pro Macros
Topic: Where are the sample macros?
Replies: 1
Views: 7681

Where are the sample macros?

I tried a simple macro, like this $my_text = Read Selection Find $my_text, a without the "a" at the end it works as expected: The selected text is picked up and a Find Next is executed. After reading the manual I expected that adding ", a" would do a Find All. Why does this not work? Also I wonder w...