Yup real newbie question, but what is the find text command, like instr, or findtext, and could you provide the code?
Posted on 2004-07-12 16:44:49 by skull_block
The Masm32 Library contains a function called "InString".
You might want to try that, but I understand a superior replacement for it has been posted.
Posted on 2004-07-12 16:48:39 by Homer
I kno instr is one but i dont know how to use it so.
Posted on 2004-07-12 16:52:00 by skull_block
include masm32includemasm32.inc
includelib masm32libmasm32.lib

Please look in your masm folder for a folder called HELP, there you will find some helpful files.



InString searches for a substring in a larger string and if it is found, it returns its starting position in eax. It uses a one (1) based character index (1st character is 1, 2nd is 2 etc...) for both the "StartPos" parameter and the returned character position.

InString proc StartPos:DWORD, lpszString:DWORD, lpszSubStr:DWORD

invoke InString,1,ADDR szMainString,ADDR szSubString
mov txtPos, eax

1. StartPos Starting position to search for the substring.

2. lpszString Address of string to be searched.

3. lpszSubStr Address of substring to search for within the main string.

Return Values.
If the function succeeds, it returns the 1 based index of the start of the substring or 0 if no match is found.

Error Values
If the function fails, the following error values apply.
-1 = substring same length or longer than main string
-2 = "StartPos" parameter out of range (less than 1 or greater than main string length)
Posted on 2004-07-12 17:28:57 by Homer
Thanks, I'll look @ it.
Posted on 2004-07-12 19:13:39 by skull_block