Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
; Checks for a-z, A-Z, 0-9 #DefineFunction isAlphaNumeric(str) hUser32 = DllLoad(StrCat(DirWindows(1),"USER32.DLL")) ; Convert to UNICODE. sUnicode = ChrStringToUnicode(str) For x = 1 To StrLen(sUnicode) item = Char2Num(StrSub(sUnicode,x,1)) If !DllCall(hUser32,long:"IsCharAlphaNumericW",word:item) DllFree(hUser32) Return @FALSE EndIf Next DllFree(hUser32) Return @TRUE #EndFunction ; Checks for a-z, A-Z #DefineFunction isAlpha(str) hUser32 = DllLoad(StrCat(DirWindows(1),"USER32.DLL")) ; Convert to UNICODE. sUnicode = ChrStringToUnicode(str) For x = 1 To StrLen(sUnicode) item = Char2Num(StrSub(sUnicode,x,1)) If !DllCall(hUser32,long:"IsCharAlphaW",word:item) DllFree(hUser32) Return @FALSE EndIf Next DllFree(hUser32) Return @TRUE #EndFunctionFor more info see: http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/strings/stringreference/stringfunctions/ischaralphanumeric.asp?frame=true
Article ID: W16260
File Created: 2006:10:13:09:31:48
Last Updated: 2006:10:13:09:31:48