Loading ...
Sorry, an error occurred while loading the content.
 

How to keyboard macro only within a selection

Expand Messages
  • Bob R.
    I wrote this macro to compress tabs (that s the name but actually it does a little more) ... my problem is I can control replace to only the selected text (if
    Message 1 of 3 , Feb 26, 2009
      I wrote this macro to compress tabs (that's the name but actually it
      does a little more) ... my problem is I can control replace to only
      the selected text (if any) but I can't see how to control the keyboard
      commands.
      Any ideas how to make keyboard operate only within the selected text
      OR substiture REPLACE statements that will do exactly what the
      keyboard commands are doing. (I just thought of that idea so haven't
      really pursued it yet).

      CompressTabs

      ^!Keyboard ALT+M S B
      ^!Keyboard ALT+M S S
      ^!Keyboard SHIFT+CTRL+Y
      ^!Keyboard ALT+M L T
      ^!Replace "^P^P^P" >> "^P^P" TIAHS
      ^!Replace "===>" >> " " TIAHS
      ^!Replace "^P " >> "^P" TIAHS
      ^!InsertText ^p
      ^!Replace "^P " >> "" TIAHS
    • Don - HtmlFixIt.com
      Hi Bob, without trying your keyboard commands I don t know what they do a keyboard necessarily unselects the text to my knowledge, so in reality you cannot
      Message 2 of 3 , Feb 26, 2009
        Hi Bob,

        without trying your keyboard commands I don't know what they do

        a keyboard necessarily unselects the text to my knowledge, so in reality
        you cannot then operate on the selected text

        you can either use non-keyboard functions if they exist, or work in a
        scratch document and then reinsert or work on a variable perhaps that is
        set to the selected text

        Can you tell me what each line does as I am not immediately familiar
        with your commands. Or is there a list of commands somewhere? My drop
        downs under alt+m (modify) then s (space) but what is b? It seemed to
        highlight the entire document I was testing in ... what is is supposed
        to do?

        Don

        Bob R. wrote:
        > I wrote this macro to compress tabs (that's the name but actually it
        > does a little more) ... my problem is I can control replace to only
        > the selected text (if any) but I can't see how to control the keyboard
        > commands.
        > Any ideas how to make keyboard operate only within the selected text
        > OR substiture REPLACE statements that will do exactly what the
        > keyboard commands are doing. (I just thought of that idea so haven't
        > really pursued it yet).
        >
        > CompressTabs
        >
        > ^!Keyboard ALT+M S B
        > ^!Keyboard ALT+M S S
        > ^!Keyboard SHIFT+CTRL+Y
        > ^!Keyboard ALT+M L T
        > ^!Replace "^P^P^P" >> "^P^P" TIAHS
        > ^!Replace "===>" >> " " TIAHS
        > ^!Replace "^P " >> "^P" TIAHS
        > ^!InsertText ^p
        > ^!Replace "^P " >> "" TIAHS
        >
        >
      • Alec Burgess
        Don - HtmlFixIt.com (don@htmlfixit.com) wrote (in part) (on 2009-02-26 ... Or describe in words with before and after examples what results you want after
        Message 3 of 3 , Feb 26, 2009
          Don - HtmlFixIt.com (don@...) wrote (in part) (on 2009-02-26
          at 10:38):
          > you can either use non-keyboard functions if they exist, or work in a
          > scratch document and then reinsert or work on a variable perhaps that
          > is
          > set to the selected text
          >
          > Can you tell me what each line does as I am not immediately familiar
          > with your commands. Or is there a list of commands somewhere? My drop
          > downs under alt+m (modify) then s (space) but what is b? It seemed to
          > highlight the entire document I was testing in ... what is is supposed
          > to do?

          Or describe in words with before and after examples what results you
          want after applying the clip?

          >> Any ideas how to make keyboard operate only within the selected text

          Most times I'm tempted to use ^!keyboard commands it is instead possible
          to use ^!Menu commands instead, which at least have the advantage of
          being human readable :-)
          >> OR substitute REPLACE statements that will do exactly what the
          >> keyboard commands are doing. (I just thought of that idea so haven't
          >> really pursued it yet).

          This is almost certainly possible but see above re before/after example.

          --
          Regards ... Alec (buralex@gmail & WinLiveMess - alec.m.burgess@skype)




          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.