21 Apr 2012 07:33
Re: Need Help! How to use QS to copy, then paste edited text
Oops, no HTML. Remove the '<pre><code>' parts.
On Saturday, April 21, 2012 2:31:20 PM UTC+9, philostein wrote:
Try saving this code in AppleScript Editor and making a trigger for '[script]⇥Run' Copy the URL from somewhere, switch to the target app and hit the shortcut.<pre><code>tryset _atid to AppleScript's text item delimitersset _text to the clipboard as textset _delimiter to ""if _text contains "http://" then set _delimiter to "http://"if _text contains "https://" then set _delimiter to "https://"set AppleScript's text item delimiters to _delimiterset _text2 to text items of _textset AppleScript's text item delimiters to _atidset _text2 to _text2 as textset the clipboard to _text2delay 0.5tell application "System Events" to keystroke "v" using command downon error a number bset AppleScript's text item delimiters to _atidactivatedisplay dialog aend try</code></pre>
On Saturday, April 21, 2012 12:19:53 PM UTC+9, Aseem Kishore wrote:Any help!?
On Apr 18, 1:09 pm, Aseem Kishore <aseem1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi all,
>
> I'm new to QS and I need some help. I'm trying to figure out a way to
> copy some text, for example a URL likehttp://www.google.com, have QS
> automatically edit it, then paste it into another app with the edited
> version, i.e.www.google.comwithout the "http://".
>
> How can I do this? I'm guessing there has to be some script or code
> somewhere to do the editing, but I have no clue how to do this or how
> to set it up in QS. Any step by step assistance would be greatly
> appreciated.
>
> Basically, I want to copy a string, modify the string by removing some
> characters from the front of the string, and then have that saved
> backed to the clipboard so when I paste, it's already edited.
>
> Thanks for your help!
>
> AK
RSS Feed