Topics

'IsNumber' and 'IsAlpha' functions syntax


James McBride
 

Hello,
I hate to do this, ask a question that is probably gonna have such an easy answer it is pitiful, but here goes:
I cannot seem to use these functions properly. I have the following simple loop to get some input and say 'Is It alpha' (or is it numeric, when I change it.

:GetInput

^!Set %InVal%=^?{(S=10)}

^!Prompt Value Entered is ^%InVal%

^!If ^$IsAlpha(^%InVal%)$=1 ^!Prompt "Is Alpha" else ^!Prompt "Is Not Alpha"

^!GoTo GetInput

Can someone tell me what I am doing wrong here? I am also very confused about ClipWizards and the difference between ^?[] and ^?{}, but I can save that for another post

--Jim


loro
 

Hello James,

James McBride wrote:
I cannot seem to use these functions properly. I have the following simple
loop to get some input and say 'Is It alpha' (or is it numeric, when I
change it.

:GetInput

^!Set %InVal%=^?{(S=10)}

^!Prompt Value Entered is ^%InVal%

^!If ^$IsAlpha(^%InVal%)$=1 ^!Prompt "Is Alpha" else ^!Prompt "Is Not
Alpha"

^!GoTo GetInput
It seems you can't have the prompt code on the same line as the If statement. If you split it up it works.

^!Set %InVal%=^?{}
^!Prompt Value Entered is ^%InVal%
^!If ^$IsAlpha(^%InVal%)$=1 next else notalpha
^!Prompt Is Alpha
^!Goto end
:notalpha
^!Prompt Is Not Alpha
^!GoTo GetInput

Lotta


James McBride
 

Wow, Outlook borks the hell out of code that is copied in these conversations! I couldn't understand your response at all until I came back to the webpage to look at it.

Thank you! I am not a great programmer, by a longshot and it is taking me a long time to get used to this syntax.

I looked at other Notepad replacement programs, especially Atom, and they just do not have anywhere near the flexibility that NoteTab has. There is a lot of user-made stuff out there for Atom, but NoteTab comes with SO MUCH MORE right outta the box.


John Shotsky
 

I see that in my email, the :notalpha was pulled up one line. It should be on its on its own line. I think that is just a thing with Outlook, but thought I'd mention it, since others use outlook too.
Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of loro
Sent: Thursday, July 30, 2020 7:13 AM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] 'IsNumber' and 'IsAlpha' functions syntax

Hello James,

James McBride wrote:
I cannot seem to use these functions properly. I have the following
simple loop to get some input and say 'Is It alpha' (or is it numeric,
when I change it.

:GetInput

^!Set %InVal%=^?{(S=10)}

^!Prompt Value Entered is ^%InVal%

^!If ^$IsAlpha(^%InVal%)$=1 ^!Prompt "Is Alpha" else ^!Prompt "Is Not
Alpha"

^!GoTo GetInput
It seems you can't have the prompt code on the same line as the If statement. If you split it up it works.

^!Set %InVal%=^?{}
^!Prompt Value Entered is ^%InVal%
^!If ^$IsAlpha(^%InVal%)$=1 next else notalpha ^!Prompt Is Alpha ^!Goto end :notalpha ^!Prompt Is Not Alpha ^!GoTo GetInput

Lotta


loro
 

John Shotsky wrote:
I see that in my email, the :notalpha was pulled up one line. It should
be on its on its own line. I think that is just a thing with Outlook, but
thought I'd mention it, since others use outlook too.
Oops! Sure it's Outlook? I'm getting used to a new email client, so I
could have done something wrong. But it looked OK when it came back
to me, so I guess it is Outlook.

Anyway, let me know if something is odd with my emails. It's a little
hard to find the right settings and there are bugs... But it will be
great one day, so I stick with it.

Lotta

--
Computer says no.


loro
 

Hi James,

James McBride wrote:
Thank you! I am not a great programmer, by a longshot and it is taking me
a long time to get used to this syntax.
Most of us are or were where you're at. I still find clip code hard to read and untangle in comparison to many other languages. So many squiggly characters and and it all run together. The code can't hardly be structured at all to make it easier to follow. That doesn't help.

Came to think of something. Long ago some of us complained so much about that it was hard for non programmers to get a handle on clips (yes, I was one of the them, I confess!) that Jody started a Clip School. In form of a mailing list of course, called Clip Class, [CC] for short. It really helped us. For me it was godsent. Jody walked us through the basics, gave us assignments and told us what we could and could not use to get the job done. It worked, it was the way in I couldn't find for myself. This happened 20 years ago, in 2000 - jesus.

That list never got transferred. I think it was lost already when we moved from eGroups to Yahoo. I have all the emails saved. Would you or anyone else be interested in them? I think I can manage to get them out of the mailbox as separate, sortable text files so it would be fairly easy to follow threads. I have an old clip for it, just need to check if it needs any modifications. If there isn't too much to fix it's done in a blink. It wouldn't be the same, of course, since you can't interact. But you could do the assignments and if you get stuck you can ask here. We aren't Jody, but we can try our best.

Let me know if there's any interest for this.

Lotta


James McBride
 

Hello Lotta,
I certainly WOULD be interested!
I have been puttering around with clip programming for a couple of years now, just very off and on....I get frustrated, then give up for a while only to come back later and give it another shot. I have been working on variations of the same project for quite some time now, and I am coming to a better understanding of the language, albeit very slowly.

The help file is fairly well written, but really does leave a lot to be desired. From what I can see, though, this is not some major company of many people that wrote the NoteTab program and its accompanying script language. It was probably just one or 2 people, and it is a very impressive effort.
Like I said in my original email, I have looked at Atom as another possibility for a programmable text editor, but it REALLY pales in comparison, even though the language used to write its scripts might be a little more comprehensible. It has so few features compared to NoteTab, so there really is no comparison. Some of my friends at work use Atom and seem to like it, but I just don’t see the point.

I am working on learning Clip Programming and also AutoHotKey, another language that looks very interesting and useful to me.

--Jim

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of loro
Sent: Thursday, July 30, 2020 9:24 PM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] 'IsNumber' and 'IsAlpha' functions syntax

Hi James,

James McBride wrote:
Thank you! I am not a great programmer, by a longshot and it is taking
me a long time to get used to this syntax.
Most of us are or were where you're at. I still find clip code hard to read and untangle in comparison to many other languages. So many squiggly characters and and it all run together. The code can't hardly be structured at all to make it easier to follow. That doesn't help.

Came to think of something. Long ago some of us complained so much about that it was hard for non programmers to get a handle on clips (yes, I was one of the them, I confess!) that Jody started a Clip School. In form of a mailing list of course, called Clip Class, [CC] for short. It really helped us. For me it was godsent. Jody walked us through the basics, gave us assignments and told us what we could and could not use to get the job done. It worked, it was the way in I couldn't find for myself. This happened 20 years ago, in 2000 - jesus.

That list never got transferred. I think it was lost already when we moved from eGroups to Yahoo. I have all the emails saved. Would you or anyone else be interested in them? I think I can manage to get them out of the mailbox as separate, sortable text files so it would be fairly easy to follow threads. I have an old clip for it, just need to check if it needs any modifications. If there isn't too much to fix it's done in a blink. It wouldn't be the same, of course, since you can't interact. But you could do the assignments and if you get stuck you can ask here. We aren't Jody, but we can try our best.

Let me know if there's any interest for this.

Lotta


loro
 

James McBride wrote:
I certainly WOULD be interested!
OK. Here it comes.

From what I can see, though, this is not some major company of
many people that wrote the NoteTab program and its accompanying script
language. It was probably just one or 2 people, and it is a very impressive
effort.
I think it was just one, Eric. How it is now I don't know.

Well, it was quickly done. I only needed to make some minor changes because of the odd things people put in their subject lines. ;-)

I uploaded a zip file to the Clip groups file repository. It contains the emails as individual text files, an OTL that I don't think Jody never finished or I just don't have the latest edition and a Clip library that Imust have come with the class.

The emails are named after the pattern year-month-day-time-subject.txt. Because all characters can't be used in file names the date and time format is a little unusual with dots everywhere, but the point is to make the files sortable and findable, so it is at is. For example the fist list post is named like so:
2000.04.26_03.56.19 _Subject- Welcome to ntb-clipclass

There were a lot of reserved characters in the subject lines that Windows don't allow in file names. That was what I needed to change. I tried to come up with good replacements but gave up. Here's what I replaced them with.

: -> -
? -> ¤
< -> [
-> ]
/ -> ¤
\ -> ¤

So it looks a little odd here and there. But that's only in the file names. When you open a file the unaltered subject line is there. Oh, if you get confused by that there are different time stamps in the file name and in the headers in the email, that's because it's GMT time in the file names but the sender's time in the date field in the headers. I don't remember if that's by design or if it just happened that way. Good it's GMT in the file names anyway so they sort in the right order. Different time zones would have messed that up.

There are 368 emails. The 10 or so I checked were fine so I assume all are. But if you find some that aren't, just holler.

<https://notetab.groups.io/g/Clips/files/ClipClass.zip>

Lotta





--
Computer says no.


Peter Hulm
 

Yes, please. A great idea to make NoteTab Great Again.

On 31 Jul 2020, at 03:23, loro <tabbie@...> wrote:

Hi James,

James McBride wrote:
Thank you! I am not a great programmer, by a longshot and it is taking me
a long time to get used to this syntax.
Most of us are or were where you're at. I still find clip code hard to read and untangle in comparison to many other languages. So many squiggly characters and and it all run together. The code can't hardly be structured at all to make it easier to follow. That doesn't help.

Came to think of something. Long ago some of us complained so much about that it was hard for non programmers to get a handle on clips (yes, I was one of the them, I confess!) that Jody started a Clip School. In form of a mailing list of course, called Clip Class, [CC] for short. It really helped us. For me it was godsent. Jody walked us through the basics, gave us assignments and told us what we could and could not use to get the job done. It worked, it was the way in I couldn't find for myself. This happened 20 years ago, in 2000 - jesus.

That list never got transferred. I think it was lost already when we moved from eGroups to Yahoo. I have all the emails saved. Would you or anyone else be interested in them? I think I can manage to get them out of the mailbox as separate, sortable text files so it would be fairly easy to follow threads. I have an old clip for it, just need to check if it needs any modifications. If there isn't too much to fix it's done in a blink. It wouldn't be the same, of course, since you can't interact. But you could do the assignments and if you get stuck you can ask here. We aren't Jody, but we can try our best.

Let me know if there's any interest for this.

Lotta