Hi, I tried typing my first script after looking at a few other ones, but it doesn't seem to be working... help would be appreciated.
Here's the script:
The error I get is this:
But I've found that this error is often spat out at incorrect times (according to a google search for it.)
What I'm doing is I'm taking a selection of shapes from an iWork app and copying it. Ultimately, I'd like it if they were copied as bitmaps with alpha values, but if I try to open them directly in Preview, Preview will add a white background to them all and interpret them as a PDF, not a bitmap.
Thus I go through ClipEdit, which automatically interprets the shapes as bitmaps with alpha values. I open a new document from the clipboard in it, it automatically interprets it, I hit copy, and then I open it in Preview, which then shows what I want. I then apply a crop, rotate, and export as a png. (Too many variables in there, so I see no point in scripting that portion.)
It's a workflow I'm familiar with and have done for over a year, don't question it, I'm just trying to speed it up a little by using a script.
Thanks
Edit: I anticipate the possibilty of being asked about ClipEdit, so here's a link to the dev's page. He offers it as a free download. Someday here I aught to donate to him given how much I use ClipEdit...
http://www.everydaysoftware.net/clipedit/
Edit 2X: Whoops... turns out it really was an assistive device issue.
Here's the script:
Code:
tell application "System Events"
tell application process "ClipEdit"
tell menu bar 1
tell menu bar item "File"
tell menu "File"
tell menu item "New"
tell menu "New"
click menu item "Clipping from Clipboard"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
delay 0.5
tell application "System Events"
tell application process "ClipEdit"
tell menu bar 1
tell menu bar item "Edit"
tell menu "Edit"
click menu item "Copy"
end tell
end tell
end tell
end tell
end tell
delay 0.5
tell application "System Events"
tell application process "Preview"
tell menu bar 1
tell menu bar item "File"
tell menu "File"
click menu item "New from Clipboard"
end tell
end tell
end tell
end tell
end tell
The error I get is this:
error "System Events got an error: Access for assistive devices is disabled." number -1719 from menu bar 1 of application process "ClipEdit"
But I've found that this error is often spat out at incorrect times (according to a google search for it.)
What I'm doing is I'm taking a selection of shapes from an iWork app and copying it. Ultimately, I'd like it if they were copied as bitmaps with alpha values, but if I try to open them directly in Preview, Preview will add a white background to them all and interpret them as a PDF, not a bitmap.
Thus I go through ClipEdit, which automatically interprets the shapes as bitmaps with alpha values. I open a new document from the clipboard in it, it automatically interprets it, I hit copy, and then I open it in Preview, which then shows what I want. I then apply a crop, rotate, and export as a png. (Too many variables in there, so I see no point in scripting that portion.)
It's a workflow I'm familiar with and have done for over a year, don't question it, I'm just trying to speed it up a little by using a script.
Thanks
Edit: I anticipate the possibilty of being asked about ClipEdit, so here's a link to the dev's page. He offers it as a free download. Someday here I aught to donate to him given how much I use ClipEdit...
http://www.everydaysoftware.net/clipedit/
Edit 2X: Whoops... turns out it really was an assistive device issue.
Last edited: