Code: Select all
s := " 1234567890123456"
sOriginalString := "qweQWEghjklöpoiqwe123456df"
sSubStr := "QWE"
iTest := Instr( sOriginalString, sSubStr, 0,, 3 )
Code: Select all
s := " 1234567890123456"
sOriginalString := "qweQWEghjklöpoiqwe123456df"
sSubStr := "QWE"
iTest := Instr( sOriginalString, sSubStr, 0,, 3 )
Code: Select all
#SingleInstance
#Requires AutoHotkey v2.0
sOriginalString := "qweQWEghjklpoiqwe123456df"
sSubStr := "QWE"
msgbox iTest := Instr(sOriginalString, sSubStr, 0,, 3)
You are obviously using ANSI encoding for your script file and not the recommended UTF-8 (with or without BOM). I was using UTF-8 with BOM in my test above.
Code: Select all
#SingleInstance
#Requires AutoHotkey v2+
sOriginalString := "123456789"
sSubStr := "5"
msgbox iTest := Instr(sOriginalString, sSubStr, 0,,)
There are plenty of topics on the v1 forums about this. But if people don't read the docs - and the FAQs are an important part of the introduction - it can't be helped.
The Replace function of the editor or write an AHK script to do it?how I can automatically substitute all chars?
My autocorrect tool has a bunch of accented-words. Something I remember running in to, is that, if your characters are already messed up, then changing the formatting to UTF won't fix them. Instead, I had to create a new ahk file with the correct encoding, then paste the code into it after creating it.
Users browsing this forum: ntepa and 57 guests