Unfortunately the MD5 is really longer than the original text
That not works for what i need to do
For the moment..i have create a cow pat code..
But it's not perfect (KCC trademark

), i have the same REF for two different titles
Debugger wrote:DIBAEL4
DIBAEL4
Code: Select all
Procedure.s CreateUniqueShortKey(NomElement.s)
NormElement$ = RemoveString(NomElement, "'")
Interprete$ = Trim(StringField(NormElement$, 1, "("))
If Interprete$ <> ""
Interprete$ = ReplaceString(Interprete$, " ", " ")
MaxEspaces = CountString(Interprete$, " ") + 1
Ref$ = ""
For i = 1 To MaxEspaces
Ref$ + UCase(Left(StringField(Interprete$, i, " "), 2))
Next
EndIf
Titre$ = Trim(StringField(StringField(NormElement$, 2, "("), 1, ")"))
Titre$ = Trim(StringField(Titre$, 1, "'"))
If Titre$ <> ""
Titre$ = ReplaceString(Titre$, " ", " ")
MaxEspaces = CountString(Titre$, " ") + 1
For i = 1 To MaxEspaces
Ref$ + UCase(Left(StringField(Titre$, i, " "), 2))
Next
Ref$ + Trim(Str(Len(Titre$)))
EndIf
ProcedureReturn Ref$
EndProcedure
Title1$ = "Didier Barbelivien (Elle) Slow.mp3"
Title2$ = "Didier Barbelivien (Elsa) Slow.mp3"
Debug CreateUniqueShortKey(Title1$)
Debug CreateUniqueShortKey(Title2$)