Re: Get selected text from non-cocoa application
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