Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ntb-clips · The NoteTab Clips List

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 23409 - 23438 of 23829   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#23409 From: Axel Berger <Axel-Berger@...>
Date: Mon Nov 19, 2012 4:13 pm
Subject: Re: [Clip] Simple filename and the date for Sunday
absalom_nemini
Send Email Send Email
 
Adrian Worsfold wrote:
> a first part filename without its path and without its extension?
> There does not seem to be a simple way of getting the dcument
> name but just that part.

What's so difficult about

^$GetName(^$GetDocName$)$

> how do I do it so it is on any day the next Sunday's reverse date

^$GetDateFromInt(^$Calc(CEIL((^$GetDateToInt$+6)/7)*7-6)$;yyyymmdd)$

Axel

#23410 From: "C" <backup2abet@...>
Date: Sun Nov 18, 2012 6:14 pm
Subject: Script Line Number
abetsent
Send Email Send Email
 
Friends,

You see in the bottom and left corner of the NTP, two numbers like that

200:40,

200 are the script line number and 40 are the cursor position.

How is possible to get this script line number?

About the execution number, it is possible to get from a SetDebug c:\..., but I
need the script line number.

Thanks!

#23411 From: "Adrian Worsfold"<pluralist@...>
Date: Sun Nov 18, 2012 6:38 pm
Subject: R3e: [clip] Simple Filename and date for Sunday
pluralistsends
Send Email Send Email
 
Hello


It was difficult because I couldn't find it in the Clipbook Help. I've been
backwards and forwards looking. I appreciate the rapid answer.





Adrian Worsfold

http://www.pluralist.co.uk
http://pluralistspeaks.blogspot.com
pluralist@...
18-11-2012


[Non-text portions of this message have been removed]

#23412 From: Don <don@...>
Date: Sun Nov 18, 2012 8:50 pm
Subject: Re: [Clip] Script Line Number
dpasseng
Send Email Send Email
 
GetLine and GetRow functions.

> 200:40,
>
> 200 are the script line number and 40 are the cursor position.

#23413 From: "flo.gehrke" <flo.gehrke@...>
Date: Mon Nov 19, 2012 4:41 am
Subject: Re: Simple filename and the date for Sunday
flo.gehrke
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "Adrian Worsfold"<pluralist@...> wrote:
>
> Second question. I know how to make a filename from the day's reverse date,
say 20121118, but how do I do it so it is on any day the next Sunday's reverse
date - so from now on it's 20121125?

> Second question. I know how to make a filename from the day's
> reverse date, say 20121118, but how do I do it so it is on any
> day the next Sunday's reverse date - so from now on it's
> 20121125?

Adrian,

I think there are two different conditions:

"Any day" might be (1) the current date provided by the system (as Axel seems to
assume); or (2) any date that is entered manually or called by the clip, e.g. by
selecting a date in the document.

If it's about #2, then, in principle, the reverse date of the next Sunday
following "any date" could be provided with...


^!Set %Date%=^?{Enter a date (yyyymmdd):}
^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$

:Loop
^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
^!Inc %DateNr%
^!Goto Loop

:Match
^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$


Note: The comparison '^!IfSame "Sun"...' depends on what your system outputs as
short day names (being called with 'ddd').

Regards,
Flo

#23414 From: "flo.gehrke" <flo.gehrke@...>
Date: Mon Nov 19, 2012 4:50 am
Subject: Re: Script Line Number
flo.gehrke
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "C" <backup2abet@...> wrote:
>
> How is possible to get this script line number?
>
> About the execution number, it is possible to get from a SetDebug c:\..., but
I need the script line number.

I understand that "execution number" means the number of the instruction (or
"command line") that is currently parsed (as displayed in Debug mode). In
principle, this number doesn't differ from the "script line number".

However, if there are long word-wrapped command lines or remark lines then the
line counting on the screen differs from the command line counting. So, for an
exact match of screen lines and command lines, you have to set Word Wrap to
'off'.

In order to find a specific command line in a clip with its number, double-click
on that field on the left of the status bar showing line and column. This opens
the 'Search | Go to Line' dialog, or use 'Shift+Ctrl+L'.

Or choose 'View | Line Numbers' and scroll down to any line number.

Regards,
Flo

#23415 From: "Adrian Worsfold"<pluralist@...>
Date: Mon Nov 19, 2012 5:30 am
Subject: Re: [Clip] Re: Simple filename and the date for Sunday
pluralistsends
Send Email Send Email
 
Hello flo.gehrke

Thank you but it doesn't work - enter 20121119 and it produces

Next Sunday: 18991231

which should be 20121125

But the idea is to produce the very next Sunday.

I'm a long long way behind your level, so I'm just trying at present to enter a
length of time into a box so that the result is shown in a CD tracks list
display as here:

<Start 10: for 11:00 am start [:]>

where the bit after 10: is the time left in rounded up minutes from the time
entered that should display again within the [:] - in other words there is music
that plays up to the first hymn the length of which decides when the bespoke CD
starts to play towards stopping before the first hymn when the service begins.

Example from Sunday 18th:


Service 20121118

Rosemary Arthur

<Start 10:41 for 11:00 am start [19:00]>

01 Name of the Rose Kyrie [02:24]
02 Lord of the Rings Movement 1 [11:14]
03 Name of the Rose Veni Sancte Spiritus [03:13]
04 Taverner In Nomine [02:04]

05 SF 062 Old 124th choir [02:47]
06 HL 035 Vienna choir [03:07]

07 Perlman Schindlers List Remembrances [05:16] <meditation>

08 HL 125 Gerontius [01:59]

09 Clyde McLennan We Bring to the Altar [01:09] <collection>

10 HL 127 Woodlands choir tape [03:22]

11 Pheloung Inspector Morse [02:11]
12 Haydn Symphony 84 In Nomine Domini [24:28]
13 Name of the Rose Suite [10:52]







Adrian Worsfold

http://www.pluralist.co.uk
http://pluralistspeaks.blogspot.com
pluralist@...
19-11-2012
----- Received the following content -----
From: flo.gehrke
Receiver: ntb-clips
Time: 2012-11-19, 04:41:24
Subject: [Clip] Re: Simple filename and the date for Sunday


[Non-text portions of this message have been removed]

#23416 From: hsavage <hsavage@...>
Date: Mon Nov 19, 2012 5:57 am
Subject: Re: [Clip] Re: Simple filename and the date for Sunday
hrs62930
Send Email Send Email
 
> Adrian,
  >
  > I think there are two different conditions:
  >
  > "Any day" might be (1) the current date provided by the system (as
Axel seems to assume); or (2) any date that is entered manually or
called by the clip, e.g. by selecting a date in the document.
  >
  > If it's about #2, then, in principle, the reverse date of the next
Sunday following "any date" could be provided with...
  >
  >
  > ^!Set %Date%=^?{Enter a date (yyyymmdd):}
  > ^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$
  >
  > :Loop
  > ^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
  > ^!Inc %DateNr%
  > ^!Goto Loop
  >
  > :Match
  > ^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$
  >
  >
  > Note: The comparison '^!IfSame "Sun"...' depends on what your system
outputs as short day names (being called with 'ddd').
  >
  > Regards,
  > Flo

Flo,

As it is, your clip doesn't work.  Transpose the first 2 lines under
:Loop and it will.

···············································
¤. JD#...323 - ¤. SL...977 - 12.11.18~23.52.58

. Newspaper Headline...
. Drunken Drivers Paid $1000 In '84.

EUR hrs EUR  hsavage EUR pobox EUR com


[Non-text portions of this message have been removed]

#23417 From: "Adrian Worsfold"<pluralist@...>
Date: Mon Nov 19, 2012 10:55 am
Subject: Re: [Clip] date for Sunday
pluralistsends
Send Email Send Email
 
Hello hsavage, Flo etc.

The first two lines under loop transposed still produce a false result:


^!Set %Date%=3D^?{Enter a date (yyyymmdd):}
^!Set %DateNr%=3D^$GetDateToInt(^%Date%;yyyymmdd)$
:Loop
^!Inc %DateNr%
^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
^!Goto Loop
:Match
^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$


20121119 Produces Next Sunday: 18991231 when it is 20121125





Adrian Worsfold

http://www.pluralist.co.uk
http://pluralistspeaks.blogspot.com
pluralist@...
19-11-2012
----- Received the following content -----
From: hsavage
Receiver: ntb-clips
Time: 2012-11-19, 05:57:30
Subject: Re: [Clip] Re: Simple filename and the date for Sunday


[Non-text portions of this message have been removed]

#23418 From: "flo.gehrke" <flo.gehrke@...>
Date: Mon Nov 19, 2012 1:47 pm
Subject: [Clip] Re: Simple filename and the date for Sunday
flo.gehrke
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "Adrian Worsfold"<pluralist@...> wrote:
>
> Hello flo.gehrke
> Thank you but it doesn't work - enter 20121119 and it produces
> Next Sunday: 18991231
> which should be 20121125

Hi Adrian,

I'm sorry -- but for me, it's perfectly working. When entering '20121119', my
clip correctly outputs: 'Next Sunday: 20121125'.

I think it doesn't work for you because you changed the first line to...

^!Set %Date%=3D^?{Enter a date (yyyymmdd):}

Of course, this produces no valid date integer NT could work with.

So, with '3D20121119', the integer is 'empty', and it outputs '18991231' which
was Sunday, Dec 31, 1899, i.e. the first Sunday after the beginning of the date
number caculation (18991230).

Please check if NT displays a valid date integer with line #3 in...

^!Set %Date%=^?{Enter a date (yyyymmdd):}
^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$
^!Info The date integer is: ^%DateNr%

:Loop
^!IfSame "So" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
^!Inc %DateNr%
^!Goto Loop

:Match
^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$


Regards,
Flo

#23419 From: hsavage <hsavage@...>
Date: Mon Nov 19, 2012 1:48 pm
Subject: Re: [Clip] date for Sunday
hrs62930
Send Email Send Email
 
On 11/19/2012 4:55 AM, Adrian Worsfold wrote:
  > Hello hsavage, Flo etc.
  >
  > The first two lines under loop transposed still produce a false result:
  >
  >
  > ^!Set %Date%=3D^?{Enter a date (yyyymmdd):}
  > ^!Set %DateNr%=3D^$GetDateToInt(^%Date%;yyyymmdd)$
  > :Loop
  > ^!Inc %DateNr%
  > ^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
  > ^!Goto Loop
  > :Match
  > ^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$
  >
  >
  > 20121119 Produces Next Sunday: 18991231 when it is 20121125

Adrian,

What does the '3D' at each variable entry point represent?  Without that
the clip works.  If it's necessary add it after the calculations are
finished.

···············································
¤. JD#...324 - ¤. SL...980 - 12.11.19~07.40.17

. Newspaper Headline...
. Farmer Bill Dies In House.

EUR hrs EUR  hsavage EUR pobox EUR com


[Non-text portions of this message have been removed]

#23420 From: "flo.gehrke" <flo.gehrke@...>
Date: Mon Nov 19, 2012 1:58 pm
Subject: [Clip] Re: Simple filename and the date for Sunday
flo.gehrke
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
>
> Flo,
>
> As it is, your clip doesn't work.  Transpose the first 2 lines under
> :Loop and it will.

Thanks, Harvey. But what do you mean with "Transpose the first 2 lines under
:Loop"?

When changing my clip to...

:Loop
^!Set %Date%=^?{Enter a date (yyyymmdd):}
^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$
^!IfSame "So" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
^!Inc %DateNr%
^!Goto Loop

:Match
^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$

...it endlessly prompts the user to enter a date.

I think the problem is in my reply to Adrian (#23418).

Regards,
Flo

#23421 From: hsavage <hsavage@...>
Date: Mon Nov 19, 2012 2:32 pm
Subject: Re: [Clip] Re: Simple filename and the date for Sunday
hrs62930
Send Email Send Email
 
On 11/19/2012 7:58 AM, flo.gehrke wrote:
  > --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
  >>
  >> Flo,
  >>
  >> As it is, your clip doesn't work.  Transpose the first 2 lines under
  >> :Loop and it will.
  >
  > Thanks, Harvey. But what do you mean with "Transpose the first 2
lines under :Loop"?
  >
  > When changing my clip to...
  >
  > :Loop
  > ^!Set %Date%=^?{Enter a date (yyyymmdd):}
  > ^!Set %DateNr%=^$GetDateToInt(^%Date%;yyyymmdd)$
  > ^!IfSame "So" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
  > ^!Inc %DateNr%
  > ^!Goto Loop
  >
  > :Match
  > ^!Info Next Sunday: ^$GetDateFromInt(^%DateNr%;yyyymmdd)$
  >
  > ...it endlessly prompts the user to enter a date.
  >
  > I think the problem is in my reply to Adrian (#23418).
  >
  > Regards,
  > Flo

Flo,

Your clip is as follows and you entered the date '1119', I mistakenly
entered '1118' and the clip didn't loop because it looked for 'Sun' on a
'Sun'.

:Loop
^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
^!Inc %DateNr%
^!Goto Loop

I swapped the first 2 lines and since '%DateNr%' incremented first the
clip ran OK.

:Loop
^!Inc %DateNr%
^!IfSame "Sun" "^$GetDateFromInt(^%DateNr%;ddd)$" Match
^!Goto Loop


···············································
¤. JD#...324 - ¤. SL...980 - 12.11.19~08.11.25

. Newspaper Headline...
. Farmer Bill Dies In House.

EUR hrs EUR  hsavage EUR pobox EUR com


[Non-text portions of this message have been removed]

#23422 From: "C" <backup2abet@...>
Date: Mon Nov 19, 2012 3:05 pm
Subject: Re: Script Line Number
abetsent
Send Email Send Email
 
Dear Gehrke and fiends, thanks.

My questions are:

As you know, the NTP debug system is not complete (the NP are very good, but not
his debug). Therefore, I want to write a script or a program to do a powerful
debug using a database and/or the Excel. If you write a script with thousands of
lines, this is imperative.

For that, I need two things:

1. The line number of the "execution", as you see in the SetDebug c:/.....

2. The line number of the script concerning this specific "execution".

Do not matter if they are different, this is not a problem.

There exist any way to get these two numbers, to use in a clip?

Other question: Did you know any script to do a NTP debug, as we have in several
languages, scripts, etc?


Thanks again.

Carlos

1.

--- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
>
> --- In ntb-clips@yahoogroups.com, "C" <backup2abet@> wrote:
> >
> > How is possible to get this script line number?
> >
> > About the execution number, it is possible to get from a SetDebug c:\...,
but I need the script line number.
>
> I understand that "execution number" means the number of the instruction (or
"command line") that is currently parsed (as displayed in Debug mode). In
principle, this number doesn't differ from the "script line number".
>
> However, if there are long word-wrapped command lines or remark lines then the
line counting on the screen differs from the command line counting. So, for an
exact match of screen lines and command lines, you have to set Word Wrap to
'off'.
>
> In order to find a specific command line in a clip with its number,
double-click on that field on the left of the status bar showing line and
column. This opens the 'Search | Go to Line' dialog, or use 'Shift+Ctrl+L'.
>
> Or choose 'View | Line Numbers' and scroll down to any line number.
>
> Regards,
> Flo
>

#23423 From: "C" <backup2abet@...>
Date: Mon Nov 19, 2012 3:15 pm
Subject: To transfer adjacent Clips
abetsent
Send Email Send Email
 
Friends,

I have several Clipbooks, and sometimes I need to copy a lot of Clips from a
Clipbook to another Clipbook.

Using the clipboard, I transfer only one Clip per time, and this are time
consuming as we have, for example, a Clip that work jointly with 20 more Clips.

My question are:

There exist a easy way to transfer a lot of ADJACENT Clips, as we have in the
Windows using the Ctrl+C and V?

Thanks!

Carlos.

#23424 From: "John Shotsky" <jshotsky@...>
Date: Mon Nov 19, 2012 3:28 pm
Subject: RE: [Clip] To transfer adjacent Clips
shotsky1
Send Email Send Email
 
Open the clip library as a document, and save it with a new name. Then just
delete anything you don't need or don't use
the ones you don't need.
Another way is to create a new clip named 'Start' and another one named 'End',
save, and then open the library as a
document, and copy from Start to End, paste into a new document, and save THAT
as a new library. (Obviously, you would
want all the desired clips between Start and End.) If you don't want the Start
through End in the original, you can use
those tags to delete that section, too.

Regards,
John
RecipeTools Web Site:  <http://recipetools.gotdns.com/>
http://recipetools.gotdns.com/

From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of
C
Sent: Monday, November 19, 2012 07:16
To: ntb-clips@yahoogroups.com
Subject: [Clip] To transfer adjacent Clips


Friends,

I have several Clipbooks, and sometimes I need to copy a lot of Clips from a
Clipbook to another Clipbook.

Using the clipboard, I transfer only one Clip per time, and this are time
consuming as we have, for example, a Clip that
work jointly with 20 more Clips.

My question are:

There exist a easy way to transfer a lot of ADJACENT Clips, as we have in the
Windows using the Ctrl+C and V?

Thanks!

Carlos.



[Non-text portions of this message have been removed]

#23425 From: Axel Berger <Axel-Berger@...>
Date: Mon Nov 19, 2012 4:36 pm
Subject: Re: [Clip] date for Sunday
absalom_nemini
Send Email Send Email
 
hsavage wrote:
> What does the '3D' at each variable entry point represent?

That's a "quoted printable" encoding for 7-bit mail transfer, that
someone's reader has not decoded again. All these encodings begin with
"=", which is why the "=" itself has to be encoded too, yielding the
ubiquitous =3D.

#23426 From: hsavage <hsavage@...>
Date: Mon Nov 19, 2012 5:03 pm
Subject: Re: [Clip] date for Sunday
hrs62930
Send Email Send Email
 
On 11/19/2012 10:36 AM, Axel Berger wrote:
> hsavage wrote:
>> What does the '3D' at each variable entry point represent?
> That's a "quoted printable" encoding for 7-bit mail transfer, that
> someone's reader has not decoded again. All these encodings begin with
> "=", which is why the "=" itself has to be encoded too, yielding the
> ubiquitous =3D.

Thank's Axel.

--
···············································
¤. JD#...324 - ¤. SL...980 - 12.11.19~08.31.58

. Newspaper Headline...
. Farmer Bill Dies In House.

EUR hrs EUR  hsavage EUR pobox EUR com



[Non-text portions of this message have been removed]

#23427 From: "beshtin" <beshtin@...>
Date: Mon Nov 19, 2012 9:08 pm
Subject: replace tokens on shorter line too
beshtin
Send Email Send Email
 
I have hundreds of lines of text such as the following:

5 (5) PARSONS, MARY AST 40045 19 525 320
7 (9) MORRIS, ALICE FRG 2400 25

The following clip converts the first line and all other lines with the same
number of blocks of characters to a row of six cells in an HTML table:

^!Jump Doc_Start
;long line follows
^!Replace "^(\d+) ([(]\d+[)]) (.*?) ([A-Z]{3}) (\d+) (\d+)
(.*)">>"<tr><td>$1</td><td>$2</td><td>$3</td><td>$4</td><td
align=right>$5</td><td align=right>$6</td></tr>" RAWS
;long line prior
^!Jump Doc_End

But, it simply ignores shorter lines like the second line of text above. 
Getting the clip to process the shorter line like the longer line seems as if it
should require only a simple modification, but after a few hours of trying to
figure it out, I'm stumped.  Any suggestions?

#23428 From: Axel Berger <Axel-Berger@...>
Date: Mon Nov 19, 2012 9:26 pm
Subject: Re: [Clip] replace tokens on shorter line too
absalom_nemini
Send Email Send Email
 
beshtin wrote:

> ^!Replace "^(\d+) ([(]\d+[)]) (.*?) ([A-Z]{3}) (\d+) (\d+) (.*)">>

> I'm stumped.  Any suggestions?

It's the space in front of the last pair of parentheses.

Axel

#23429 From: "Eb" <ebbtidalflats@...>
Date: Mon Nov 19, 2012 10:21 pm
Subject: Re: To transfer adjacent Clips
ebbtidalflats
Send Email Send Email
 
Open the source file as document (rightclick in the clipbook name).
Then open the target lib in the clipbook.

In the source file, select the desired clips, including headers (H="name"...)and
code.

In the target clipbook place the mouse cursor on the clip ABOVe where you want
the copied clips to locate, and Right-click, select "Add from Document".

Done.


Cheers,


Eb

--- In ntb-clips@yahoogroups.com, "C" <backup2abet@...> wrote:
>
> Friends,
>
> I have several Clipbooks, and sometimes I need to copy a lot of Clips from a
Clipbook to another Clipbook.
>
> Using the clipboard, I transfer only one Clip per time, and this are time
consuming as we have, for example, a Clip that work jointly with 20 more Clips.
>
> My question are:
>
> There exist a easy way to transfer a lot of ADJACENT Clips, as we have in the
Windows using the Ctrl+C and V?
>
> Thanks!
>
> Carlos.
>

#23430 From: Don <don@...>
Date: Mon Nov 19, 2012 10:47 pm
Subject: Re: [Clip] replace tokens on shorter line too
dpasseng
Send Email Send Email
 
On 11/19/2012 4:08 PM, beshtin wrote:
> 5 (5) PARSONS, MARY AST 40045 19 525 320
> 7 (9) MORRIS, ALICE FRG 2400 25

^(\d+) ([(]\d+[)]) (.*?) ([A-Z]{3}) (\d+) (\d+) ?(.*)

Make the space optional by adding the ? character after it.

#23431 From: "joy8388608" <mycroftj@...>
Date: Mon Nov 19, 2012 11:03 pm
Subject: Re: Using ^$GetDocListAll$ in an outline document
joy8388608
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
>
> --- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@> wrote:
> >
> > Some ways of getting ^$GetDocListAll$ to work on ALL text in an
> > outline are clip code to loop through all the topics, code to
> > copy all topics to a new, temp doc and work on that, maybe code
> > to save the outline as a temp file and rename ext to .txt then
> > open that and work on it, etc.
> >
> > Has anyone found a nicer way of doing this?
>
> Hi Joy,
>
> I wouldn't loop through all the topics. Open any sample OTL and try this...
>
> ^!SetScreenUpdate Off
> ^!Toolbar New Document
> ^$GetFileText(^$GetDocumentPath$SAMPLE.OTL)$
> ^!Select All
> ^!InsertText ^$GetDocListAll("Search pattern";$0\r\n)$
>
> You will see the output immediately in a second document.
>
> Regards,
> Flo
>

Hi Flo,
Thanks for the good idea. I didn't think about using GetFileText for returning
the entire .otl file as text so that works great.

There still is the problem of functions such as ^$GetDocReplaceAll$ which only
works on the current outline topic. But I found that adding two lines such as

^!Save AS "C:\<origfolder>\<origfilename>.otl"
^!ToolBar Reload Document

works pretty well as long as you don't accidentally overwrite the original doc
if that was not the intent.

Joy

#23432 From: "flo.gehrke" <flo.gehrke@...>
Date: Tue Nov 20, 2012 12:29 am
Subject: Re: replace tokens on shorter line too
flo.gehrke
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "beshtin" <beshtin@...> wrote:
>
> I have hundreds of lines of text such as the following:
>
> 5 (5) PARSONS, MARY AST 40045 19 525 320
> 7 (9) MORRIS, ALICE FRG 2400 25
>
> The following clip converts the first line and all other lines with the same
number of blocks of characters to a row of six cells in an HTML table:
>
> ^!Jump Doc_Start
> ;long line follows
> ^!Replace "^(\d+) ([(]\d+[)]) (.*?) ([A-Z]{3}) (\d+) (\d+)
(.*)">>"<tr><td>$1</td><td>$2</td><td>$3</td><td>$4</td><td
align=right>$5</td><td align=right>$6</td></tr>" RAWS
> ;long line prior
> ^!Jump Doc_End
>
> But, it simply ignores shorter lines like the second line of text
> above...

Your search string defines seven capturing groups whereas your replace uses six
back references only.

Maybe you could just omit the seventh capturing group and write:

^!Replace "(?x)^(\d+)\x20 (\(\d+\))\x20 ([A-Z,\x20]+)\x20 ([A-Z]{3})\x20
(\d+)\x20 (\d+).+$" >> "<tr><td>$1</td><td>$2</td><td>$3</td><td>$4</td><td
align=right>$5</td><td align=right>$6</td></tr>" WARS

I've used \x20 to make spaces more visible; also used Extended Mode to separate
the subpatterns a bit.

For me, the result is:

<tr><td>5</td><td>(5)</td><td>PARSONS, MARY</td><td>AST</td><td
align=right>40045</td><td align=right>19</td></tr>
<tr><td>7</td><td>(9)</td><td>MORRIS, ALICE</td><td>FRG</td><td
align=right>2400</td><td align=right>2</td></tr>

Regards,
Flo

#23433 From: "beshtin" <beshtin@...>
Date: Tue Nov 20, 2012 2:00 am
Subject: Re: [Clip] replace tokens on shorter line too
beshtin
Send Email Send Email
 
Thank you, Don.  So simple, and it works perfectly!

--- In ntb-clips@yahoogroups.com, Don <don@...> wrote:
>
> On 11/19/2012 4:08 PM, beshtin wrote:
> > 5 (5) PARSONS, MARY AST 40045 19 525 320
> > 7 (9) MORRIS, ALICE FRG 2400 25
>
> ^(\d+) ([(]\d+[)]) (.*?) ([A-Z]{3}) (\d+) (\d+) ?(.*)
>
> Make the space optional by adding the ? character after it.
>

#23434 From: "beshtin" <beshtin@...>
Date: Tue Nov 20, 2012 2:03 am
Subject: Re: replace tokens on shorter line too
beshtin
Send Email Send Email
 
Thank you for the extra tips, Flo!

--- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
>
> --- In ntb-clips@yahoogroups.com, "beshtin" <beshtin@> wrote:
> >
> > I have hundreds of lines of text such as the following:
> >
> > 5 (5) PARSONS, MARY AST 40045 19 525 320
> > 7 (9) MORRIS, ALICE FRG 2400 25
> >
> > The following clip converts the first line and all other lines with the same
number of blocks of characters to a row of six cells in an HTML table:
> >
> > ^!Jump Doc_Start
> > ;long line follows
> > ^!Replace "^(\d+) ([(]\d+[)]) (.*?) ([A-Z]{3}) (\d+) (\d+)
(.*)">>"<tr><td>$1</td><td>$2</td><td>$3</td><td>$4</td><td
align=right>$5</td><td align=right>$6</td></tr>" RAWS
> > ;long line prior
> > ^!Jump Doc_End
> >
> > But, it simply ignores shorter lines like the second line of text
> > above...
>
> Your search string defines seven capturing groups whereas your replace uses
six back references only.
>
> Maybe you could just omit the seventh capturing group and write:
>
> ^!Replace "(?x)^(\d+)\x20 (\(\d+\))\x20 ([A-Z,\x20]+)\x20 ([A-Z]{3})\x20
(\d+)\x20 (\d+).+$" >> "<tr><td>$1</td><td>$2</td><td>$3</td><td>$4</td><td
align=right>$5</td><td align=right>$6</td></tr>" WARS
>
> I've used \x20 to make spaces more visible; also used Extended Mode to
separate the subpatterns a bit.
>
> For me, the result is:
>
> <tr><td>5</td><td>(5)</td><td>PARSONS, MARY</td><td>AST</td><td
align=right>40045</td><td align=right>19</td></tr>
> <tr><td>7</td><td>(9)</td><td>MORRIS, ALICE</td><td>FRG</td><td
align=right>2400</td><td align=right>2</td></tr>
>
> Regards,
> Flo
>

#23435 From: "beshtin" <beshtin@...>
Date: Tue Nov 20, 2012 2:04 am
Subject: Re: [Clip] replace tokens on shorter line too
beshtin
Send Email Send Email
 
Thank you, Axel.

--- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
>
> beshtin wrote:
>
> > ^!Replace "^(\d+) ([(]\d+[)]) (.*?) ([A-Z]{3}) (\d+) (\d+) (.*)">>
>
> > I'm stumped.  Any suggestions?
>
> It's the space in front of the last pair of parentheses.
>
> Axel
>

#23436 From: Don <don@...>
Date: Tue Nov 20, 2012 3:18 am
Subject: Re: [Clip] Re: replace tokens on shorter line too
dpasseng
Send Email Send Email
 
>> I've used \x20 to make spaces more visible; also used Extended Mode to
separate the subpatterns a bit.

How did you learn all of this stuff ... geez!  Extended mode is a new
one to me.  All proud to understand \K and now more ...

Triggered with the (?x):
In free-spacing mode, whitespace between regular expression tokens is
ignored. Whitespace includes spaces, tabs and line breaks. Note that
only whitespace between tokens is ignored. E.g. a b c is the same as abc
in free-spacing mode, but \ d and \d are not the same. The former
matches  d, while the latter matches a digit. \d is a single regex token
composed of a backslash and a "d". Breaking up the token with a space
gives you an escaped space (which matches a space), and a literal "d".

From RegEx Buddy help.

#23437 From: Don <don@...>
Date: Tue Nov 20, 2012 11:25 pm
Subject: Re: [NTB] Basic Clip "Move cursor position" question
dpasseng
Send Email Send Email
 
There is a clips list that you should write for an answer to this.
ntb-clips@yahoogroups.com

Keyboard commands should be avoided when possible as they are
unpredictible due to delays in execution.

Instead find, then use move:
^!MoveCursor +/-nnn

Here is what it looks like in your example I think:
^!Find "CCCCCCCC" TIS
^!MoveCursor +4





> ^!Find "CCCCCCCC"
> ^!Keyboard [something goes here]
>
> If there's a specific place I can go to look up keyboard movements like this,
a pointer would also be appreciated...
>
> Thanks!
>
> Rob

#23438 From: Ian NTnerd <indiamcq@...>
Date: Wed Nov 21, 2012 3:03 pm
Subject: Re: [Clip] Re: To transfer adjacent Clips
indiamcq
Send Email Send Email
 
If you want to do this a lot, here is a way to organise and have the
clips just a click away.

I use a clip that adds items to the ClipHelp.clh. ClipHelp.clh is
replaced when you upgrade. If you directly edit this file when you
upgrade your work will be lost. So with a clip, you can make additions
again, after an upgrade.

To make additions you right click on the ClipHelp.clh and choose 'Open'.
The file can be shown or hidden by pressing F6.

I call the following clip MyClipHelpAdditions.clb. My real one is longer
I have just included enough to demonstrate its usage. It makes two
entries into the ClipHelp. One is used to insert that function into a
clip, the other is where the clip is stored. After inserting a new clip
you need to save the clip and go to another clip and come back again to
refresh the clip list.

My other thought is to put your common clips into a FarFunc. This does
not work for all clips, but many can be made to work that way.

MyClipHelpAdditions.clb

H="Insert Clip into ClipHelp"
^!set %options%=^$StrReplace("^P";"|";"^$GetClipText("FuncList")$";Yes;Yes)$
^!set %insert%=^?{(T=L;H=10)Function name to insert=^%options%}
^!clip "insertfunc" ^%insert%

H="_FuncList"
loopA
xdigits

H="_InsertFunc"
^!InsertText H="Insert ^& Func"^%nl%
^!Clip ~Circonflex
^!InsertText !ClipBoardSave^%nl%
^!Clip ~Circonflex
^!InsertText !CopyClip ~^&^%nl%
^!Clip ~Circonflex
^!InsertText !Paste^%nl%
^!Clip ~Circonflex
^!InsertText !ClipBoardRestore^%nl%^%nl%

^!InsertText H="_~^&"^%nl%H="_^&"^%nl%
^!ClipBoardSave
^!CopyClip ~^&
^!Paste
^!ClipBoardRestore

H="_~Circonflex"
^!InsertText ^

H="_~loopa"
^!Set %IndexA%=0
^!Set %LoopCounta%=^%arraya0%
^!IfCancel End

:LoopStartA
^!Inc %Indexa%
^!If ^%IndexA% > ^%LoopCountA% EndLoopA
^!If "^%arrayA^%indexA%%"="" LoopStartA
^!clip "^&" ^%arrayA^%indexA%%

^!GoTo LoopStartA
:EndLoopA

H="_~xdigits"
; Output a set number of digits, that is paddes with zeros.
; ^$xdigits(2;5)$ would return 05
; ^$xdigits(4;50)$ would return 0050
; can be call as a far function by farfunc clip.
; example ^$farfunc(call:xdigits;4;5)$ will return 0005
^!SetListDelimiter ;
^!SetArray %numb%=^&
^!set %digits%=^%numb1%
^!if ^$IsNumber(^%numb2%)$=1 switch else outofrange

:switch
^!if ^$StrSize("^%numb2%")$>^%digits% outofrange
^!set %zeros%=^$calc(^%digits%-^$StrSize("^%numb2%")$)$
^!set %outvalue%=^$StrFill(0;^%zeros%)$^%numb2%
^!goto endxdigits

:outofrange
^!info Out of range. No number with between 1 and ^%digits% digit imput.
The script will exit.
^!goto exit
:endxdigits
^!result ^%outvalue%

Ian

On 20/11/2012 6:21 AM, Eb wrote:
>
> Open the source file as document (rightclick in the clipbook name).
> Then open the target lib in the clipbook.
>
> In the source file, select the desired clips, including headers
> (H="name"...)and code.
>
> In the target clipbook place the mouse cursor on the clip ABOVe where
> you want the copied clips to locate, and Right-click, select "Add from
> Document".
>
> Done.
>
> Cheers,
>
> Eb
>
> --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>,
> "C" <backup2abet@...> wrote:
> >
> > Friends,
> >
> > I have several Clipbooks, and sometimes I need to copy a lot of
> Clips from a Clipbook to another Clipbook.
> >
> > Using the clipboard, I transfer only one Clip per time, and this are
> time consuming as we have, for example, a Clip that work jointly with
> 20 more Clips.
> >
> > My question are:
> >
> > There exist a easy way to transfer a lot of ADJACENT Clips, as we
> have in the Windows using the Ctrl+C and V?
> >
> > Thanks!
> >
> > Carlos.
> >
>
>



[Non-text portions of this message have been removed]

Messages 23409 - 23438 of 23829   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help