StrCnt not working? [RESOLVED]

Started by cmp, May 17, 2022, 11:40:00 AM

Previous topic - Next topic

cmp

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

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

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

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