You beat me to it!
I just popped back in to offer my solution but found yours instead. Mine is very similar so no point posting both of them.
Thanks
[EDIT]
Change of mind - no harm in offering two solutions should anyone else need it:
function instr(source as string, search as string)
for k = 1 to len(source)-len(search)+1
if mid(source, k, len(search)) = search
exitfunction k
endif
next k
endfunction 0
[EDIT2]
A slight update.
In an ideal world we would be able to overload functions in AppGameKit but since we can't then the following code will require all four parameters even if you don't need the last two:
function instr(source as string, search as string, start as integer, caseSensative as integer)
if (start > len(source)-len(search)+1) or (start < 0)
exitfunction 0
endif
if not caseSensative
source = lower(source)
search = lower(search)
endif
for k = start to len(source)-len(search)+1
if mid(source, k, len(search)) = search
exitfunction k
endif
next k
endfunction 0
With the update (above) you can specify the starting search position within your source string and also ignore (or not) case sensitivity.
Whilst the above function works perfectly it would still be nice to have the command included in AGK.