Macro Toolworks Products Discussion Forums :: General Discussion
Welcome Guest   
 Subject :replace of tab in text.. 26-01-2012 05:27:23 
hugblue@hotmail.com
Joined: 13-10-2010 01:09:07
Posts: 100
Location: sweden
to petr.

when i use this command :

<var_oper>(aabb5,"%aabb5%",STR_REPLACE," ","", "0")

then how do i tell the program that it is tab's. that is
needed to be romoved.

thz.
IP Logged
 Subject :Re:replace of tab in text.. 27-01-2012 19:39:29 
petr
Joined: 15-10-2009 11:48:52
Posts: 152
Location
Hello,

you can just insert tab in to the command as shown on the example below. Just put some text with tabs to clipboard and then run this macro.

<cmds>

<varset>("textWithTab=%_vClpText%","")
<var_oper>(textReplaced,"%textWithTab%",STR_REPLACE," ","InsteadOfTAB", "0")
<msg>(-100,-100,"textReplaced","Message",1,0,0,1)
IP Logged
 Subject :Re:replace of tab in text.. 27-01-2012 23:41:31 
hugblue@hotmail.com
Joined: 13-10-2010 01:09:07
Posts: 100
Location: sweden
hi petr.

damn. works totally perfect. impressed.

can see you use :
<varset>("textWithTab=%_vClpText%","")

but why don't you use this one :
<var_oper>(test,"",GET_TEXT_FROM_CLIPBOARD,"2","", "0")

and one last thing. i can see you use :
<cmds>
what is the total meaning and effect of this command. i have not used it,
because i do not totally understand this one. and everuthing works perfect
without it.

but else. thz alot for the help.

ohh.. and :
i can see that you inserted a tab into " old string ". how did you make that
possible ? when i tried that. it jumped to next possible button in window.
EDIT : hmm. copied a tab from a txt document and inserted it that way. thinking that
i am getting too old for this. smiling.
IP Logged
Last Edited On: 29-01-2012 15:16:57 By hugblue@hotmail.com for the Reason
 Subject :Re:replace of tab in text.. 02-02-2012 16:55:55 
petr
Joined: 15-10-2009 11:48:52
Posts: 152
Location
Hello,

the <cmds> command means "from now, execute only commands and ignore text that is not recognized as commands". For example if yo have macro like this:

<cmds>
<wx>(500) This macro waits 500ms.

Then all this macro will do is wait 500ms. However, if you have macro like this:

<wx>(500) This macro waits 500ms.

It will wait 500 ms and it will "type" to currently active window "This macro waits 500ms." because this text is recognized in this case as keystrokes/text that should be sent to active application.

So <cmds> command is good to use if your macro mostly consists from macro commands. It prevents macro from sending "Enters" (new lines).

>>> ... how did you make that possible ?

Well, I just did copy/paste....

Best regards,
Petr
IP Logged
Page # 


Powered by ccBoard


Login and share your experience - send messages to forums and add comments to samples, commands and other resources.



Account is free of charge, easy to setup.