Posts: 45
Threads: 7
Joined: Feb 2012
I am trying to Find After Input
1 Input something to find
2 After that to High Light the string inputed
I wrote the following Simple Macro but it stops at if findrx
str+ f1_input
if(!inp(f1_input "Find:") or !author_input.len) ret
f1_input.trim
if findrx (f1_input)
key SE ;; Shift+End
Posts: 12,087
Threads: 142
Joined: Dec 2002
Macro
Macro1997
str f1_input
if(!inp(f1_input "Find:") or !f1_input.len) ret
f1_input.trim
if findw(f1_input "end")>=0
,out "''end'' found"
,key SE ;; Shift+End
Posts: 45
Threads: 7
Joined: Feb 2012
What you posted did not work or more probably I am not using it correctly. I tried to use it in word as follows neither macro worked
act "Word"
str f1_input
if(!inp(f1_input "Find:") or !f1_input.len) ret
f1_input.trim
if findw(f1_input "end")>=0
,out "''end'' found"
,key SE ;; Shift+End
act "Word"
str f1_input
if(!inp(f1_input "Find:") or !f1_input.len) ret
f1_input.trim
if findw(f1_input "end")>=0
,out "''end'' found"
,"tag"
Posts: 45
Threads: 7
Joined: Feb 2012
Of course the following does work using the find function in Word
act "Word"
key CH ;; Ctrl+Home
str f1_input
if(!inp(f1_input "Find:") or !f1_input.len) ret
f1_input.trim
key Cf ;; Ctrl+F
outp f1_input
key Y ;; Enter
key Z ;; Esc
But I wanted to try and not use the find function in Word
Posts: 1,337
Threads: 61
Joined: Jul 2006
if you want to find in word you have two options.Use word find function or start using word Type Library in qm.
search forum for typelib word
tip-- to show qm code in forum
Q. How to post QM code to the forum?
A. In QM, to copy all or selected text, use menu Edit -> Other Formats -> Copy for QM Forum. It copies correct and colored code to the clipboard. Then simply paste in the forum. Don't use the Code button.
http://www.quickmacros.com/forum/showthread.php?tid=786
Posts: 45
Threads: 7
Joined: Feb 2012
Thank you very much. It looks like that you have to use visual basic inside qm. Is that correct?
Posts: 1,337
Threads: 61
Joined: Jul 2006
no use typelib Word in side qm
search forum for typelib word
Posts: 1,337
Threads: 61
Joined: Jul 2006
the type library has built in functions