This is the Wiki Home page for the Notetab Clips group. It is the portal to info and tutorials on writing and using Notetab clips plus links to a repository of user uploaded clips The Wiki is member generated and maintained. Please contribute your experience and knowledge.
Re: String Replace Backwards
Axel Berger
flo.gehrke@t-online.de wrote:
The last comma in a list followed by a space is matched with ',\s\Z'.Thanks. I didn't know \z and just looked it up and tried ti understand. If I get it right, your suggesetion would deal with trailing commas. That's not what I mean. I have a list like "Peter, Paul, Mary" and want "Peter, Paul & Mary" Of course Mary could be a name of several parts not all of which are letters. The only shure thing is, the 'name' must not contain ", ". It's easy with ^!Replace ", " >> " & " HB Danke Axel -- /¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067 \ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de / \ Mail | -- No unannounced, large, binary attachments, please! --
|
|
Re: String Replace Backwards
On Wed, Jul 29, 2020 at 03:33 PM, Axel Berger wrote:
Is there any way to transfer ^!Replace ", " >> " \& " HBSTI to working on a variable?The last comma in a list followed by a space is matched with ',\s\Z'. Try... ^!Set %Authors%="XXX^PYYY^PZZZ, " ^!Info ^%Authors% ^!Set %Authors%=^$StrReplace(",\s\Z";"";"^%Authors%";R)$ ^!Info ^%Authors% This is using the new ^$StrReplace$ that was added in NT 7.0. Regards, Flo
|
|
Re: Help with message boxes
This is a "bug by design" ;-)
In those clips from the Stone Age of NT you will find at notetab.com, many users produce that line break with '>>>'. It's one of several relicts which were never changed. Regards, Flo
|
|
Re: Any serious interest in code with advanced techniques?
Axel Berger
loro wrote:
I'm surprised though that the document loaded in the clipbook as it was,Well, the header line sets up some values and declarations. A good program shopuld come with decent defaults when these are not given. Good to find NT is a good program in this sense. After all you have effectively already staed "This is supplosed to be a clip library. Please try and treat it as such." -- /¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067 \ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de / \ Mail | -- No unannounced, large, binary attachments, please! --
|
|
Re: Any serious interest in code with advanced techniques?
loro
Joy wrote:
| No problem. It was because I assumed it was a complete library. WhenYes, I added the header and commented out the separators once I realized it wasn't a library. I'm surprised though that the document loaded in the clipbook as it was, when I just renamed it to .clb, even though it looked funny. I made a small test with just the below, no header. The individual ^! clips and the comment work. The rest becomes paste text, that is the H="TEST" and the labels. And of course the first text line. --------------------- paste-text test test test ^!calc.exe ^!Info Hello ;------------ H="TEST" ^!If 2=2 next else :foo ^!Info Next :foo ^!Info Foo --------------------- Lotta -- Computer says no.
|
|
Re: Any serious interest in code with advanced techniques?
joy8388608
| No problem. It was because I assumed it was a complete library. When I realized it wasn't I just wrapped H="" around the names of the three clips.
Uhhhh I just had a 3 AM thought... if you or anyone else just wraps names with H, make sure you remove the visual separator lines of equal signs between the three clips since some subs may not end with GOTO END. I'm also surprised the library header line "= V7 MultiLine NoSorting TabWidth=30" is not required unless you also added it. I never paid much attention to it and don't know exactly how it is used althought I'd like to if anyone knows. Joy
|
|
Any serious interest in code with advanced techniques?
loro
Joy wrote:No problem. It was because I assumed it was a complete library. When I realized it wasn't I just wrapped H="" around the names of the three clips. Lotta -- Computer says no.
|
|
Re: Any serious interest in code with advanced techniques?
loro
Joy wrote:No problem. It was because I assumed it was a complete library. When I realized it wasn't I just wrapped H="" around the titles of the three clips. Lotta
|
|
Re: Any serious interest in code with advanced techniques?
joy8388608
Joy wrote:
The code along with the two subroutines have been uploaded in one text file. The two subroutines should be saved as individual clips so you will end up with THREE new clips. That explains it! I didn't realize the headers were missing and was wondering what I looked at when I had renamed the file to .clb and opened it in the clipbook. :-D Sigh. I was worried about people not knowing how to manipulate uploaded code. It's only obvious what to do if you already know what to do. That's not how I upload code but it might be a good idea in the future. I believe uploading a ready to go, properly formatted clb file to be copied into the Libraries folder would create a new library containing only the main clip and the two subs with everything ready to run. I didn't think of doing it that way. I assumed people already had libraries and would rather create a few new clips in their existing libraries. Sorry for the confusion. I can just look at the text and know what to do. I don't know everyone's individual level of knowledge. Doing this by memory, I suggest opening the uploaded text document and selecting and copying (control-c) the main clip down to the first subroutine then right clicking on the library window where you have existing clips and choose COPY FROM CLIPBOARD. Repeat for each of the two subroutines. Save the library. You should now have three new clips in your existing library. (Or you can first create a brand new empty library) The very first line should be the name of the clip (or subroutine) which is what will appear in the Library window. NOTE this first line may or may not be visible depending on a setting in options. If the name of the clip ever inserts itself in your document when running a clip, it's because the clip name appears twice at the beginning of your code. It may only appear once due to the "Hide the clip name line" option. If this is on, the line you see is just text and not the clip name and the clip will insert this line as the text that it is. For those who may find it useful, I think I covered how to create clips in the "Notetab Intro to Clip Writing.txt" tutorial I uploaded to the main clips file area. Joy
|
|
Re: Any serious interest in code with advanced techniques?
loro
Joy wrote:
The code along with the two subroutines have been uploaded in one textThat explains it! I didn't realize the headers were missing and was wondering what I looked at when I had renamed the file to .clb and opened it in the clipbook. :-D Thank you, Joy. Lotta
|
|
Re: Any serious interest in code with advanced techniques?
joy8388608
The code along with the two subroutines have been uploaded in one text file.
The two subroutines should be saved as individual clips so you will end up with THREE new clips. I have my subroutines in a different library but changed the code so you should put the subs in the same library as the calling program. Easily changed, if you wish. (Change ^!Clip to ^!FarClip and add the library name) I'm sure it was a mistake for me to notice I didn't code the program to return a Return Code for use when using as a subroutine as I frequently do. This means you can check the code after it is called each time to make sure it didn't find a problem. That required some minor code changes which I think I made correctly but I've learned there are NO safe code changes. When new to a language, I crashed a production system by making ONE itty, bitty, innocent, temporary change to ONE line. My friend who was on call that night was phoning me at 3 AM while I SWORE my change couldn't have been the cause. I learned several things that night... Let me know if you find any bugs. Joy
|
|
File /Joy_Mycroft/BoxAndUnbox.txt uploaded
#file-notice
Clips@Notetab.groups.io Notification <Clips@...>
The following files have been uploaded to the Files area of the Clips@Notetab.groups.io group. By: joy8388608 Description:
|
|
Re: Any serious interest in code with advanced techniques?
joy8388608
Thank you all for your honesty. There is enough interest that I will upload the code soon. If nothing else, someone may find the clip useful.
It's very true we don't have a lot of options for finding existing code elsewhere. Like I said, I did learn quite a bit following all the questions and answers posted here over the years but to go back through all the existing posts would be difficult and boring. Sorry to hear about Lotta's impending difficulty and I do understand how Axel likes to watch the code run. So do I. I remember doing things manually for hours that I can now automate. It always amazes me. I enjoy coding like artists like to paint and writers like to write. It's my art and I write clips I will possibly never use just for the fun of it. To each his own. I really do think the code is understandable if you print it out and give it some thought. There are plenty of comments and I can answer questions. Maybe later today... Joy
|
|
Re: Selection box wizard question
John Shotsky
Not really - About the best I could do is add a user option to either check all
toggle quoted messageShow quoted text
checklists or not, but usually they will want them all checked. It is a folder full of individual html files that are to be merged into a single file. I'm working with 227 such files now, because I need enough variety to find outlier cases, such as URL's in the wrong place, etc. For my own purposes, I could just run it with all unchecked, but users would not know how to do that. I may just add that user option so they can change it from Y to N in the option. Regards, John
-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of James McBride Sent: Monday, August 3, 2020 6:23 AM To: Clips@Notetab.groups.io Subject: Re: [NTB-Clps] Selection box wizard question Hello, I am not sure that I can help here or not, but I am certainly going to try. Rather than put all entries with a preceding '_' into your list (which means that they will be checked in that list), couldn’t you conditionally add the entry with either the _ or not based on a set of conditions? --Jim -----Original Message----- From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of John Shotsky Sent: Monday, August 3, 2020 8:41 AM To: Clips@Notetab.groups.io Subject: Re: [NTB-Clps] Selection box wizard question Thanks, Axel, that sounds like it will work for me. Regards, John -----Original Message----- From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of Axel Berger Sent: Monday, August 3, 2020 5:15 AM To: Clips@Notetab.groups.io Subject: Re: [NTB-Clps] Selection box wizard question John Shotsky wrote: As it is, I presentI presume you know this already and don't want it: You can have a separate Question first and depending on that present one of two wizards, either all checked or all unchecked. Or perhaps a way to dismiss that wizard and present one with all theThat is easy. Have an unchecked pseudo-entry first "uncheck all" and close with the normal "OK". Look at that entry first and if checked ignore all others but reopen the wizard -- with another pseudo-entry "check all". If the pseudo-entry is unchecked process the rest as normal. -- /¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067 \ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de / \ Mail | -- No unannounced, large, binary attachments, please! --
|
|
Re: Selection box wizard question
James McBride
Hello,
toggle quoted messageShow quoted text
I am not sure that I can help here or not, but I am certainly going to try. Rather than put all entries with a preceding '_' into your list (which means that they will be checked in that list), couldn’t you conditionally add the entry with either the _ or not based on a set of conditions? --Jim
-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of John Shotsky Sent: Monday, August 3, 2020 8:41 AM To: Clips@Notetab.groups.io Subject: Re: [NTB-Clps] Selection box wizard question Thanks, Axel, that sounds like it will work for me. Regards, John -----Original Message----- From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of Axel Berger Sent: Monday, August 3, 2020 5:15 AM To: Clips@Notetab.groups.io Subject: Re: [NTB-Clps] Selection box wizard question John Shotsky wrote: As it is, I presentI presume you know this already and don't want it: You can have a separate Question first and depending on that present one of two wizards, either all checked or all unchecked. Or perhaps a way to dismiss that wizard and present one with all theThat is easy. Have an unchecked pseudo-entry first "uncheck all" and close with the normal "OK". Look at that entry first and if checked ignore all others but reopen the wizard -- with another pseudo-entry "check all". If the pseudo-entry is unchecked process the rest as normal. -- /¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067 \ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de / \ Mail | -- No unannounced, large, binary attachments, please! --
|
|
Re: Selection box wizard question
John Shotsky
Thanks, Axel, that sounds like it will work for me.
toggle quoted messageShow quoted text
Regards, John
-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of Axel Berger Sent: Monday, August 3, 2020 5:15 AM To: Clips@Notetab.groups.io Subject: Re: [NTB-Clps] Selection box wizard question John Shotsky wrote: As it is, I presentI presume you know this already and don't want it: You can have a separate Question first and depending on that present one of two wizards, either all checked or all unchecked. Or perhaps a way to dismiss that wizard and present one with all theThat is easy. Have an unchecked pseudo-entry first "uncheck all" and close with the normal "OK". Look at that entry first and if checked ignore all others but reopen the wizard -- with another pseudo-entry "check all". If the pseudo-entry is unchecked process the rest as normal. -- /¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067 \ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de / \ Mail | -- No unannounced, large, binary attachments, please! --
|
|
Re: Selection box wizard question
Axel Berger
John Shotsky wrote:
As it is, I presentI presume you know this already and don't want it: You can have a separate Question first and depending on that present one of two wizards, either all checked or all unchecked. Or perhaps a way to dismiss that wizard and present one with all theThat is easy. Have an unchecked pseudo-entry first "uncheck all" and close with the normal "OK". Look at that entry first and if checked ignore all others but reopen the wizard -- with another pseudo-entry "check all". If the pseudo-entry is unchecked process the rest as normal. -- /¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067 \ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de / \ Mail | -- No unannounced, large, binary attachments, please! --
|
|
Selection box wizard question
John Shotsky
I may have asked this before, but don't remember the answer. I think the answer
is that 'you can't do that'. Anyway, there are times when a group of files need to be merged together. There can be many, many (hundreds of) files to merge, mostly single html files to be merged into one big html file. They problem is that when the user is presented with the wizard to choose what files they want, they either have to check all the files they want, or uncheck the ones they don't want. As it is, I present them with all boxes checked because that is what is usually wanted. But what if they want only a couple of those many files? What I'd like is a way to check or uncheck all the boxes while looking at the wizard. Or perhaps a way to dismiss that wizard and present one with all the checkboxes unchecked. Either way would require some sort of action other than cancel or ok. Ideas? Regards, John
|
|
Any serious interest in code with advanced techniques?
loro
Hi Joy,
Joy wrote: I've put lots of thought into whether I wanted to invest the time and<snip> As discussed before, it does take a surprising and unexpected amount ofI would be interested. But since you ask us to be honest I'll be that. As said, I am interested, but I would probably not study your clip right off. First, I have a lot of catching up to do. First things first and all than. Second, my living situation is about to become really messy. Change of pipe system coming up among other things and I'll be living either at some cheapo and depressing hotel or in the middle of the mess for months, that isn't decided yet. Both options are scary and will probably shrink my already small brain significantly. But I would eventually study your clip, just not straight away. That doesn't mean I'll understand i, but I will try to. :-) Great of you to offer to do this! Lotta -- Computer says no.
|
|
Re: Any serious interest in code with advanced techniques?
Thomas Gruber Yahoo
Hi Joy, Jim,
toggle quoted messageShow quoted text
I‘d certainly take a thorough look at this if you publish it. As Jim says, any well documented and working example of clip code is welcome, and I particularly like the part about making it sensitive of which version of NoteTab it‘s running in. So if you‘re willing to do this then thanks in advance. And yes - publishing code for others is really a different thing from writing and even documenting it just for your own use. So I appreciate that you‘re willing to go through this. Kind regards Thomas (Computerhusky)
Am 02.08.2020 um 03:07 schrieb James McBride <mr.james.e.mcbride@gmail.com>:
|
|