Date   

Re: ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

loro
 

Axel Berger wrote:
What Lotta found is:

If <condition> <command to execute>

I'm very surprised that ever works and I'm certainly not ever going to
use
it. Why rely on flaky side effects, when it's so easy to do things the
right way?
I don't use it either. I still would like to know why it's sometimes OK and sometimes not.

I don't know much programming, but I once read a short book about programming in general. What I took with me is that one should strive for readability above all. That it's more important than compactness and even speed.

I think nested Clip functions are about the most hard to read code I've seen. Sure, I nest too. But sometimes it takes me longer to understand something that I wrote some time ago than it took me to write it in the first place - a lot longer. Especially for demos I think several lines with repeated ^!Set make it easier to follows than 10 nested functions on one row.

And I constantly slap myself for not always writing comments in clips for my own use. When I later want to change them a little it isn't always as easy if it could have been had I written comments and used self explanatory variable names...

Lotta

--
Computer says no.


Re: ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

Axel Berger
 

John Shotsky wrote:
If this condition is false Exit
If this condition is false Exit
Here is what needs to be done, because they were both true.
:Exit
Yes, that's the canonical way:
If <condition> <label1> [ELSE <label2>]

That way is documented and always works. END and others can be read as
pseudo-labels here, not commands in the usual sense. Without ^!If you'd use
them as "^!GoTo END" not as naked "END" (no idea if that would work at
all).

What Lotta found is:

If <condition> <command to execute>

I'm very surprised that ever works and I'm certainly not ever going to use
it. Why rely on flaky side effects, when it's so easy to do things the
right way?


--
/¯\ 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: ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

James McBride
 

Thank you, John! That structure seemed to work for me......seems so obvious to do that, but for some reason, to me, it wasn’t ☹

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of John Shotsky
Sent: Friday, July 31, 2020 10:05 AM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

I do this 'conditional' fairly often
If this condition is false Exit
If this condition is false Exit
Here is what needs to be done, because they were both true.
:Exit
Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of loro
Sent: Friday, July 31, 2020 6:46 AM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

At 09:23 AM 2020-07-31 -0400, James McBride wrote:
Holy Schnikes, that is a 'lotta' emails (yeah, I just made that pun
up.....you can thank me later 😝 )
Maybe I should buy a domain like alottaemails.com to use for my email needs. :-)

Now that I know that the clip language handles 'if' statements in a
rather strange way, I know that they may require some special
debugging. I have a series of conditions that need to be met to set a
certain variable and it def doesn’t seem that it works right if I just do:

^!If <condition1> and <condition2> action
But sometimes it does!

^!If 2 = 2 ^!calc

I'm confused about this too. Originally it didn't enter my mind that a command could be placed on the same line as a conditional statement. Then I saw some clips that did exactly that. I still keep things on separate lines since that's what I'm used to, but it would be interesting to know what the rules are, when things can be shoved together on one line and when they can't. It seems pretty random to me, but I'm sure it isn't.

Lotta

--
Computer says no.


Re: ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

John Shotsky
 

I do this 'conditional' fairly often
If this condition is false Exit
If this condition is false Exit
Here is what needs to be done, because they were both true.
:Exit
Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of loro
Sent: Friday, July 31, 2020 6:46 AM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

At 09:23 AM 2020-07-31 -0400, James McBride wrote:
Holy Schnikes, that is a 'lotta' emails (yeah, I just made that pun
up.....you can thank me later 😝 )
Maybe I should buy a domain like alottaemails.com to use for my email needs. :-)

Now that I know that the clip language handles 'if' statements in a
rather strange way, I know that they may require some special
debugging. I have a series of conditions that need to be met to set a
certain variable and it def doesn’t seem that it works right if I just do:

^!If <condition1> and <condition2> action
But sometimes it does!

^!If 2 = 2 ^!calc

I'm confused about this too. Originally it didn't enter my mind that a command could be placed on the same line as a conditional statement. Then I saw some clips that did exactly that. I still keep things on separate lines since that's what I'm used to, but it would be interesting to know what the rules are, when things can be shoved together on one line and when they can't. It seems pretty random to me, but I'm sure it isn't.

Lotta

--
Computer says no.


Re: ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

loro
 

At 09:23 AM 2020-07-31 -0400, James McBride wrote:
Holy Schnikes, that is a 'lotta' emails (yeah, I just made that pun
up.....you can thank me later 😝 )
Maybe I should buy a domain like alottaemails.com to use for my email needs. :-)

Now that I know that the clip language handles 'if' statements in a rather
strange way, I know that they may require some special debugging. I have
a series of conditions that need to be met to set a certain variable and
it def doesn’t seem that it works right if I just do:

^!If <condition1> and <condition2> action
But sometimes it does!

^!If 2 = 2 ^!calc

I'm confused about this too. Originally it didn't enter my mind that a command could be placed on the same line as a conditional statement. Then I saw some clips that did exactly that. I still keep things on separate lines since that's what I'm used to, but it would be interesting to know what the rules are, when things can be shoved together on one line and when they can't. It seems pretty random to me, but I'm sure it isn't.

Lotta

--
Computer says no.


Re: ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

James McBride
 

Holy Schnikes, that is a 'lotta' emails (yeah, I just made that pun up.....you can thank me later 😝 )



Now that I know that the clip language handles 'if' statements in a rather strange way, I know that they may require some special debugging. I have a series of conditions that need to be met to set a certain variable and it def doesn’t seem that it works right if I just do:

^!If <condition1> and <condition2> action



This is what learning a new language is all about, finding its idisyncracies.

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of loro
Sent: Friday, July 31, 2020 9:06 AM
To: Clips@Notetab.groups.io
Subject: [NTB-Clps] ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax



I wrote:

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


I've skimmed through some of the emails. They are a little confusing, even to me who was there. But I think if you primarily focus on the assignments and the related posts it becomes clearer. Also, a few posts from the Clip list had sneaked in there. And note this is the basic stuff. You won't learn fancy here.



Lotta









--

Computer says no.


ClipClass WAS: 'IsNumber' and 'IsAlpha' functions syntax

loro
 

I wrote:
<https://notetab.groups.io/g/Clips/files/ClipClass.zip>
I've skimmed through some of the emails. They are a little confusing, even to me who was there. But I think if you primarily focus on the assignments and the related posts it becomes clearer. Also, a few posts from the Clip list had sneaked in there. And note this is the basic stuff. You won't learn fancy here.

Lotta




--
Computer says no.


Re: Help with message boxes

Axel Berger
 

John Shotsky wrote:
The problem is that the user can't review the text in the interim.
Yes. That's waht I found in my test and that's why I gave the full example.
Open message boxes block everthing. So the answer is to end the clip
completely and restart it at just the right point. My code should do just
that.


--
/¯\ 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: 'IsNumber' and 'IsAlpha' functions syntax

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



Re: 'IsNumber' and 'IsAlpha' functions syntax

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.


Re: 'IsNumber' and 'IsAlpha' functions syntax

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


Re: 'IsNumber' and 'IsAlpha' functions syntax

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


Re: Help with message boxes

John Shotsky
 

The problem is that the user can't review the text in the interim. The Notetab
messages prevent access to the document to review it. It can be thousands of
lines of text that they scroll through. With shellwait, I start a different text
viewer that everyone has in Windows, and when they close it they get the
^!Continue and choose whether to stop or continue.

Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of Axel Berger
Sent: Thursday, July 30, 2020 2:33 PM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] Help with message boxes

John Shotsky wrote:
I was really just looking for a way to do it without running a separate
program.

Help says: "Variables keep their value as long as the Clipbook is kept open."
You could have a label and ^!Set that label to a variable right at the break
point. With a ^!Continue you could ask whether to just go on or stop for
inspection.
Make the first command in the clip a jump to the variable.

When the clip is invoked it ought to start right at the very place it broke off
before.

---------------------------------------------
^!Goto ^%vLbl%
...
^Set %vLbl%="break-here
^!Continue Go on without inspection?
:break-here
---------------------------------------------

I fear this can't be very reliable and will result in unintended consequences
but it ought to work in principle.


--
/¯\ 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: Help with message boxes

John Shotsky
 

I was able to do this by using the shellwait command.
Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of John Shotsky
Sent: Thursday, July 30, 2020 11:18 AM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] Help with message boxes

A bookmark will return the cursor to the bookmark in the subject text. What I want is to resume execution where it left off. (Code, not text) I may be able to do it another way - I already run additional programs by shelling out to them, which freezes NoteTab until control is given back. I was really just looking for a way to do it without running a separate program.
Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of John Shotsky
Sent: Thursday, July 30, 2020 4:17 AM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] Help with message boxes

I've never used a bookmark, but I'll see if I can do something along those lines. More to learn.
Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of Ray Shapp
Sent: Wednesday, July 29, 2020 9:12 PM
To: Clips@notetab.groups.io
Subject: Re: [NTB-Clps] Help with message boxes

Hi John,

Please excuse me if this is too simpleminded. Why not set a "bookmark" at the point where the user stops to review his/her work. When they resume, your editor would search for the bookmark, remove it, and allow the user to continue from there.

Ray Shapp
---


On Wed, Jul 29, 2020 at 6:16 PM Axel Berger <Axel@...> wrote:

John Shotsky wrote:
Any ideas?
You could do the review in *another* editor and pause execution until
that is closed. Something along the the lines of:

^!ShellWait pdflatex ^$GetFileName(^%vFIL%)$ ^!Delay 5 ^!Shell
F:\Winutil\acrobat\Reader\AcroRd32.exe ^%vdst%

(Unmodified from a clip doing something entirely different, but shows
the principle. The pdflatex run can take quite some time. The delay is
to ensure all disk caches are flushed.)

That could also mean they 'tweaked'
something, and want that in the continuation.
This could prove to be difficult. It's safer to reload and start over.
But you know your own clips best, perhaps it can be done safely.


--
/¯\ 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: Help with message boxes

Axel Berger
 

John Shotsky wrote:
I was really just looking for a way to do it without running a separate program.
Help says: "Variables keep their value as long as the Clipbook is kept
open."
You could have a label and ^!Set that label to a variable right at the
break point. With a ^!Continue you could ask whether to just go on or stop
for inspection.
Make the first command in the clip a jump to the variable.

When the clip is invoked it ought to start right at the very place it broke
off before.

---------------------------------------------
^!Goto ^%vLbl%
...
^Set %vLbl%="break-here
^!Continue Go on without inspection?
:break-here
---------------------------------------------

I fear this can't be very reliable and will result in unintended
consequences but it ought to work in principle.


--
/¯\ 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: Help with message boxes

John Shotsky
 

A bookmark will return the cursor to the bookmark in the subject text. What I want is to resume execution where it left off. (Code, not text)
I may be able to do it another way - I already run additional programs by shelling out to them, which freezes NoteTab until control is given back. I was really just looking for a way to do it without running a separate program.
Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of John Shotsky
Sent: Thursday, July 30, 2020 4:17 AM
To: Clips@Notetab.groups.io
Subject: Re: [NTB-Clps] Help with message boxes

I've never used a bookmark, but I'll see if I can do something along those lines. More to learn.
Regards,
John

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of Ray Shapp
Sent: Wednesday, July 29, 2020 9:12 PM
To: Clips@notetab.groups.io
Subject: Re: [NTB-Clps] Help with message boxes

Hi John,

Please excuse me if this is too simpleminded. Why not set a "bookmark" at the point where the user stops to review his/her work. When they resume, your editor would search for the bookmark, remove it, and allow the user to continue from there.

Ray Shapp
---


On Wed, Jul 29, 2020 at 6:16 PM Axel Berger <Axel@...> wrote:

John Shotsky wrote:
Any ideas?
You could do the review in *another* editor and pause execution until
that is closed. Something along the the lines of:

^!ShellWait pdflatex ^$GetFileName(^%vFIL%)$ ^!Delay 5 ^!Shell
F:\Winutil\acrobat\Reader\AcroRd32.exe ^%vdst%

(Unmodified from a clip doing something entirely different, but shows
the principle. The pdflatex run can take quite some time. The delay is
to ensure all disk caches are flushed.)

That could also mean they 'tweaked'
something, and want that in the continuation.
This could prove to be difficult. It's safer to reload and start over.
But you know your own clips best, perhaps it can be done safely.


--
/¯\ 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: 'IsNumber' and 'IsAlpha' functions syntax

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.


Re: 'IsNumber' and 'IsAlpha' functions syntax

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


Re: 'IsNumber' and 'IsAlpha' functions syntax

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.


Re: 'IsNumber' and 'IsAlpha' functions syntax

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