Jump to content

Click on notification


Recommended Posts

Hi guys, 

 

I just set up a new workflow that will allow me to make calls directly from Alfred.

I've set it up so that a script ends the workflow by click on the "call" button on the notification that pops up when trying do to do a call. 

Last night I got everything to work perfectly with the following in the ending: 

on alfred_script(q)

delay 0.5
tell application "System Events" to tell process "Notification Centre"
click button 1 of group 1 of UI element 1 of scroll area 1 of window 1
end tell

end alfred_script

 

However today it's not working?! 

 

I've checked if the code is good trough automator and does what it is supposed to. 

What can might have happened? Do you guys think it might be any type of access/privacy problem for Alfred? 

Has anyone stumbled on this before? 

 

// PRS 

Edited by Laluna
clarity
Link to comment

Welcome @Laluna,

 

Start by *not* using Run NSAppleScript. Instead use a `Run Script` with `/usr/bin/osascript (AS)`. The latter is more reliable.

 

After that, if it’s not fixed, upload it somewhere as we can’t properly help you without access to it. Debugging can already be hard with access to the code, and you’re asking us to guess yours from a description. There are multiple places where your code or Workflow setup may be going wrong. Without looking at it we’re shooting in the dark.


See the Reporting Problems with Workflows topic for a nice overview on how to build an effective report.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...