Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find after Input
#1
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
#2
Macro Macro1997
Code:
Copy      Help
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
#3
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"
#4
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
#5
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
#6
Thank you very much. It looks like that you have to use visual basic inside qm. Is that correct?
#7
no use typelib Word in side qm
search forum for typelib word
#8
the type library has built in functions


Forum Jump:


Users browsing this thread: 1 Guest(s)