Jump to content

Running External Scripts


Recommended Posts

Hi all,

 

I use Clear for my todo list manager on macOS http://www.theverge.com/2012/11/7/3613664/clear-for-mac-review.

 

I wrote a helpful script show me how many todo items I have for the given day, script here: https://ghostbin.com/paste/zuc94

 

When I run the script as a local alfred script, it works perfectly. However, if I copy the same code to a file on disk and attempt to run it as an external script, I never get a notification. My setup is below, am I missing something obvious?

 

Thanks in advance

 

Screen%20Shot%202016-08-15%20at%2011.36.

Link to comment

I've moved the thread to the "Workflow Help & Questions" forum.

 

If that's what your workflow looks like, then it's because you haven't connected the External Script to a trigger. It isn't being run.
 
If that's not the case, please export and upload the complete, non-working workflow somewhere. Can't tell if you're doing something wrong if we can't actually see what you're doing.
 
Regarding your script:

The line 

os.chdir("/Users/Admin/Library/Containers/com.realmacsoftware.clear.mac/Data/Library/Application Support/com.realmacsoftware.clear.mac/")

Would be better written as: 

os.chdir(os.path.expanduser("~/Library/Containers/com.realmacsoftware.clear.mac/Data/Library/Application Support/com.realmacsoftware.clear.mac/"))

 
That will work for any configuration, rather than being tied to user Admin and /Users as the "home" directory. No big deal, but it's a good habit to get into.

Edited by deanishe
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...