App context-Services not supported

Hi,
often, i use Services in combination with shortcuts (Apple>System preferences>Keyboard>Services), its an easy and comfortable system-some Apps however, seem to ignore services. Example: Adobe Digital Editions.
Also System events UI commands fail to work in some Apps-so now i`m searching an alternative way to copy text in a selection (when services do not work)
Maybe Java? Python? a secret shell command i don’t know? :rolleyes:

Hi Joy,

I have never seen Command + C not work on a selection. I can’t think why that would not work.

Later,
kel

Hi
sorry but i wrote:

Example: if i select a text in Adobe Digital Editions, and try to copy the selected text using UI commands, i get a system beep (error).
Looking in the Applications first bar, you can see that no services are enabled. This feature was omitted intentionally.

i tried with:

do shell script "pbpaste" 

but it copies nothing. Seems that pbpaste needs an input to get something 'on the board.
I need to get a selected text into the clipboard, to process this further inside my workflow.

You mean with your app in front and you run something like this:

tell application "System Events"
	keystroke "c" using command down
end tell

nothing happens?

Hi kel,
exactly. Copying via System Events seems not to work with “Adobe Digital Editions 2.0”; i tried the following:

tell application "System Events"
	set fr_app to name of front process whose visible is true and frontmost is true
	if fr_app is "Adobe Digital Editions 2.0" then
		tell process "Adobe Digital Editions 2.0" to keystroke "c" using command down
	else
		tell process fr_app to keystroke "c" using command down
	end if
	delay 0.2
end tell


Usually, this should work fine, but in my case i get a system beep in return, which means an error. Error of what? So i tried to use some alternatives to copy text selections too. Another reason is, that UI scripting is simply ugly, and the last method i use, when everything other has failed.