Re: [Clip] Trouble creating a new document
- Larry -
You're right, I didn't scroll all the way through your message. Sorry about
Indeed your solution works, but offends my delicate sensibilities <g>:
creating a document, removing it (both automatic by NTB), opening a file,
adding a new document, moving to the opened file, closing it, and then
re-opening it. Creative !
Now that I know that NTB _replaces_ a new document with an opened file
(instead of just adding the opened file), I've found another way, that I
like better, I think.
By adding a character, then deleting it, NTB evidently marks the document as
'in use', and thus does not remove it when opening the scriptfile. So I get
my empty new document followed by the script file.
I tried to trick NTB by inserting a ^%Null%, without the DeleteLine, but I
couldn't fool NTB -- it knew that was really a no-op, and removed the
document when opening the file. There may be _some_ command that doesn't
add content to the document, but still causes NTB to keep it, but I don't
know. This will work OK.
----- Original Message -----
From: "Larry Thomas" <larryt@...>
Sent: Friday, 12 December, 2003 3:28 PM
Subject: Re: [Clip] Trouble creating a new document
At 11:02 AM 12/12/03 +0800, you wrote:
>Thanks, Lotta and Larry -
>Granted, I could do what you suggest. It is just that I would like the
>empty document to be at index position 1, because the clip will be opening
>and closing multiple files , extracting some data, and pasting it into the
>new document. It is easiest to ^!SetDocumentIndex 1 or ^!Document FIRST.
>But that doesn't address the strange behaviour here. In the construction:
>> ^!Close ALL,DISCARD
>> ^!Delay 10
>> ^!Open ^%ScriptFile%
>I DO NOT get a new document. I would expect that the ^!Close ALL would
>result in a new document, and then would open Scriptfile. Not so,
>Kenosabe... Scriptfile is the only document on the tab bar.
>But if I stick in a ^!Keyboard Ctrl+n, then I get TWO new documents (plus
>That was my point.
Unfortunately, it appears that you did not carefully read my message. If
you had tested the last clip that I posted, you would have found ONE new
document at index position one.
Here it is again:
^!Keyboard Ctrl+n Ctrl+Shift+Tab Ctrl+F4 Alt+F R 1
The first line of the clip closes all files and NoteTab automatically opens
a new document at index position one. The third line opens your script
file and NoteTab replaces the new document with it so that you only have
one file open (The script file). The fourth line does a complete series of
things with the ^!Keyboard command all on one line.
Ctrl+n opens a new document at index position two.
Ctrl+Shift+Tab switches the focus back to your open script file at index
Ctrl+F4 closes your open script file and leaves the new document at index
Alt+F R 1 reopens your script file at index position two.
And now the sequence is just the way you said you want it with the new
document at index position one and the script file at index position two.
The code looks messy and it takes a bit of juggling but it is fairly fast
and it get the job done. Why don't you try it?
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/