• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get selected text from non-cocoa application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get selected text from non-cocoa application


  • Subject: Re: Get selected text from non-cocoa application
  • From: Rounak Jain <email@hidden>
  • Date: Tue, 22 Sep 2009 06:53:54 +0530

Hi,
Thanks for the reply. But this is not what I meant. I want to know if there is something like ThisService which can work on non-cocoa apps too, not cusomized applescripts for every non-cocoa app.


Here is an applet script that I use with Firefox. HTH

Joe

tell application "Firefox"
activate
end tell
tell application "System Events" to keystroke "c" using {command down}
tell me to activate
set selecTxt to the clipboard as text
tell application "Firefox" to activate
set dat to (current date) as text
set clipFil to (path to desktop folder as text) & "Firefox Clips.txt"
try
close access file clipFil
end try
set filRef to open for access file clipFil with write permission
write (dat & return & selecTxt & return & "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" & return & return) to filRef starting at eof
close access filRef

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Get selected text from non-cocoa application (From: Rounak Jain <email@hidden>)
 >Re: Get selected text from non-cocoa application (From: Joe <email@hidden>)

  • Prev by Date: Help with Xtags and Quark 8, please.
  • Next by Date: Re: Speakable Item and SpeechRecognitionServer
  • Previous by thread: Re: Get selected text from non-cocoa application
  • Next by thread: Re: Get selected text from non-cocoa application
  • Index(es):
    • Date
    • Thread