Author Topic: StrCnt not working? [RESOLVED]  (Read 203 times)

cmp

  • Newbie
  • *
  • Posts: 4
StrCnt not working? [RESOLVED]
« on: May 17, 2022, 11:40:00 am »
Hello, and thank you for any help.

I've used WinBatch on and off for many years...  I seem to recall running into this a while back but can't remember the fix.

Simple issue, it seems that StrCnt is not a recognized function.  It's grayed out in WinBatch Studio.  I've tried it on three different PCs (Win 10.)  "Uninitialized variable or undefined function."

Any ideas?  Thanks again.

td

  • Tech Support
  • *****
  • Posts: 4094
    • WinBatch
Re: StrCnt not working?
« Reply #1 on: May 17, 2022, 01:10:51 pm »
You didn't mention your version of WinBatch but WinBatch Studio does not have the ability to grey out any function in its script display area and the StrCnt function is alive and well on Windows 10 or any other supported version of Windows. You mentioned the "Uninitialized variable or undefined function" error message. That may be the result of an undefined variable that you are attempting to pass to the function.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

cmp

  • Newbie
  • *
  • Posts: 4
Re: StrCnt not working? [RESOLVED]
« Reply #2 on: May 18, 2022, 09:05:44 am »
Thanks for the reply.

I was using version wb44i13a.  When I downloaded and installed wb44i22c, exact same code worked flawlessly including StrCnt.

Dunno...  Moving on, thanks again!

td

  • Tech Support
  • *****
  • Posts: 4094
    • WinBatch
Re: StrCnt not working? [RESOLVED]
« Reply #3 on: May 18, 2022, 01:12:49 pm »
The "StrCnt" function was added in WinBatch 2004B released May 19, 2004 so your version wasn't causing the problem.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade