Try this one below:
Code: Select all
Function p_chktype(dateiname$)
DebugPrint(dateiname$)
dateityp = False
r = MatchPattern(dateiname$,"*.jpg")
If r = True
dateityp = True
EndIf
r = MatchPattern(dateiname$,"*.jpeg")
If r = True
dateityp = True
EndIf
Return(dateityp)
EndFunction
DebugPrint("---Start---")
If p_chktype("test.jpg")
DebugPrint("match....")
Else
DebugPrint("no match....")
EndIf
WaitLeftMouse