Paste function not working within macro?

I am trying to set a macro up to do quick searches in Google Translate. The issue is that, once the box opens to enter the search, I command the macro to paste using "command v" but the macro does not paste. Is this some sort of recursive no-no to have paste into a box created by the macro itself?

The Search the Web action does not complete until the search if executed, so the Command-V wont happen until after that.

Why not just use %CurrentClipboard% in the default section of the action?

Hey Peter,

Yes, that approach is more to the point. Thanks... However...

Interestingly... when I highlight text, and type Command-T, I see that multiple words in English and Chinese get brought into the clipboard well enough. However, I am getting the following results.

  1. Highlight a single English word ==> Command T ==> Works as expected. The word is thrown into the translation field and the URL is executed.

  2. Highlight a single Chinese Character ==> Command T ==> Clipboard copied, but URL command does not execute.

  3. Highlight multiple English words ==> Command T ==> Clipboard copied, but URL command does not execute.

I am not sure if there is an issue with the spaces (%20), or double byte characters, or what. I would think you could throw anything into the Google Translate text box and it would try and translate it (at least come back with something) but it does not seem that the macro even gets that far as I am not seeing any no URL call within the browser.

The problem is that you go through a URL to get to the Google Translate Box. So you probably need to endore the URL.

I ran the Decode URI on the clipboard prior to using in the URL string.

English phrase in clipboard:
... simply the words with %20.

However, the URL string for 你好 should look like this.你好
but the result is actually:你好
... a string that results in the following:

Just an FYI - I hacked together the following that works, but to be able to execute the full URL string I would think would be faster.

The macro (in Yellow) simply repositions the window.