WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: cmp on May 17, 2022, 11:40:00 AM

Title: StrCnt not working? [RESOLVED]
Post by: cmp 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.
Title: Re: StrCnt not working?
Post by: td 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.
Title: Re: StrCnt not working? [RESOLVED]
Post by: cmp 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!
Title: Re: StrCnt not working? [RESOLVED]
Post by: td 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.