Jump to content

olliebaum

Member
  • Posts

    4
  • Joined

  • Last visited

olliebaum's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. That's fine. I didn't mean for you to have to spend time on it. I just thought there might be an AX UI element similar to what you used to access the currently selected text. I want to create a workflow for OSX's "Look up..." which only appears in the contextual menu. I think the simple answer is probably that it's not possible. Apple clearly doesn't go out of its way to make this any easier.
  2. Would there be a way to adapt this to perform a right click on the current text selection? Or is that simply not possible.
  3. Well, I have tried it both as a Run NSAppleScript action and a Run Script "osascript" action and neither have worked. Someone's reply in a similar thread mentioned compiling the applescript as an application/ automator workflow and then creating another script telling the app or workflow to activate, which sounds a little clumsy to me - I would prefer to know why Alfred isn't running the applescript correctly. But I'll try this solution anyway. And I suppose if I put the automator workflow into my Alfred workflow folder it won't be overly clumsy. I'll post an update to let you know if it works.
  4. I've used "ignoring application responses" in an applescript to continue the script without waiting for an answer to the dialog box. It runs perfectly in Applescript Editor but when I use it in Alfred, it ignores them and waits for the dialog. For reference, here is my applescript: on alfred_script(q) set PopClipInput to (display dialog "Type some text for PopClip to use:" with title "PopClip Input" default answer q) set PopClipText to the text returned of PopClipInput ignoring application responses (display dialog "Press option-P to activate PopClip again." default answer PopClipText buttons {"I'm Done"} default button 1) end ignoring do shell script "/usr/local/bin/cliclick m:460,248" delay 0.1 tell application "PopClip" to appear end alfred_script Why is Alfred doing this and what can I do to make my Applescript work?
×
×
  • Create New...