Author Topic: Macro >> Find and Replace  (Read 1872 times)

Offline Alain

  • Registered User
  • Jr. Member
  • *
  • Posts: 50
  • Karma: +1/-0
    • View Profile
Macro >> Find and Replace
« on: February 16, 2013, 04:41:49 pm »
I want Find and Replace automatically by Macro
BUT when I register Find/Replace, the macro register only the Find part...
********************************
<?xml version="1.0" encoding="utf-8"?>
<FILEINFO author="Al" type="Macro" descr="Macro file for HippoEDIT"/>
<MACRO>
   <Find check_hidden="false" wrap="false" what="t813 " action="3"/>
</MACRO>
*****************************
What means action="3"   ?
How to REPLACE ?

HE is great but the Wiki don't Help in this case
Alain

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Macro >> Find and Replace
« Reply #1 on: February 18, 2013, 01:08:14 am »
Hi Alain,

action="3" means ReplaceAll, but by design you shall get <Replace ...> instead of <Find...>.
Code: XML
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FILEINFO type="Macro" descr="Macro file for HippoEDIT"/>
  3. <MACRO>
  4.         <Replace what="output" action="3" to="doc"/>
  5. </MACRO>
  6.  

It is a bug, I will fix it in next beta.

I have not covered Macro topic in the wiki yet. It will come.

BR,
Alex.
« Last Edit: February 18, 2013, 02:00:35 am by alex »

Offline Alain

  • Registered User
  • Jr. Member
  • *
  • Posts: 50
  • Karma: +1/-0
    • View Profile
Re: Macro >> Find and Replace
« Reply #2 on: February 18, 2013, 10:41:30 am »
Thank

In Edit macro, I have tested with the word REPLACE (because that seems logic)
but I writed WITH="xyz"  ....  and lost : it"s ...TO="xyz"
(But in the Find/Replace window the text is "with")

Alain

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2181
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Macro >> Find and Replace
« Reply #3 on: February 18, 2013, 01:42:22 pm »
Sorry Alain,

did not get what you mean :/

What was a macro (full source) and what was a result?

Offline Alain

  • Registered User
  • Jr. Member
  • *
  • Posts: 50
  • Karma: +1/-0
    • View Profile
Re: Macro >> Find and Replace
« Reply #4 on: February 18, 2013, 05:28:15 pm »
It was just before your reply, I have tested some possibilities:

In the macro I have tested the word REPLACE with "What=abc" and "With=xyz"
this don't work, because your key word is "To=...."
and work fine with TO not WITH.

Just to say : in your little window for Find/Replace, your text before input  is "Replace With".... not " Replace To"
and it's "Find What":  and "What" is the Key word in your macro : just for cohesion !

ah ah
Alain


 

Related Topics

  Subject / Started by Replies Last post
4 Replies
2566 Views
Last post March 30, 2009, 08:04:55 am
by Stefan
6 Replies
3300 Views
Last post January 21, 2012, 03:26:37 am
by alex
5 Replies
2623 Views
Last post January 21, 2012, 06:37:41 pm
by alex
1 Replies
1825 Views
Last post February 20, 2012, 10:10:49 pm
by alex
0 Replies
2140 Views
Last post February 29, 2012, 09:56:26 pm
by alex