12-29-2005, 09:03 AM
;variables
str s1 s2
;activate notepad, select all, get all text into s1
act "Notepad"
key Ca
s1.getsel
;use regular expression to find and extract text between . and !
if(findrx(s1 "\.(.+?)!" 0 0 s2 1)<0) ret ;;exit if not found
;s2 now contains text between . and !
;activate QM and display s2
act _hwndqm
out s2This code finds all instaces of text between . and !
;variables
str s1
ARRAY(str) a
;activate notepad, select all, get all text into s1
act "Notepad"
key Ca
s1.getsel
;use regular expression to find and extract text between . and !
if(findrx(s1 "\.(.+?)!" 0 4 a)<0) ret ;;exit if not found
;a now contains all instances of text between . and !
;activate QM and display a
act _hwndqm
int i
for i 0 a.len
,out a[1 i]