TLM, first of all,
thank you very much. I appreciate your knowledge and time. But I wasn't asking how to use InStr, I was asking what you would do if you couldn't. There is no InStr in Macro Creator. Instead it uses the outdated StringGetPos.
“Deprecated: This command is not recommended for use in new scripts. Use the InStr function instead.”
Maybe I should have mentioned a couple things, but I tend to be too long, so I was trying to avoid that:
1) The goal of this project is to end up making an executable (exe) file.
2) I can ultimately get the result I want without StringGetPos or InStr, but it's fairly ridiculous, opening Notepad, putting the file list (filelist variable) in it, having the user select, or highlight a number in a file name, in an out of order file list, possibly with several thousand files. Sort doesn't work for the file names I'm using, they are non standard and don't show up in an easily sort-able list. They're listed like this:
[email protected]
[email protected]
[email protected]
11.fnt
11.png
111-0.png
[email protected]
I'm trying to find the greatest number that comes before they hyphen, or period if there is no hyphen.
3) The lines of script I'm working on are in the middle of the bunch of script.
So if I understand correctly, I've got to figure out a way to use InStr, and until I hear different I should just continue assuming StringGetPos will not work in a file loop. Or at least it won't work with A_LoopFileName. I hope someone can tell me I'm wrong on this assumption, and I'm doing something wrong in the script.
So am I correct, that other than scripting the rest of the project manually, my only solution is to?:
1) Continue to code the rest of the project in Macro Creator,
2) Leave out the part in the middle I'm having trouble with, while figuring out some kind of work around for testing purposes,
3) When finished in Macro Creator, edit the script manually using InStr,
4) Test it by making it an exe, since I can't test it with Macro Creator.
I hope you can tell me that's not my last option.
Or does anyone know of an acceptable AHK gui creator that uses InStr? Do I just have to try them all until I find one that does?
Anyway, thanks again for your help.