Applescript – Quit or Launch Application if another is or is not running
A simple use of Applescript to get PID (unix id of processes ) and kill one Application if another is not running.
But heres a better example..
Continue reading “Applescript – Quit or Launch Application if another is or is not running”
Applescript to Close Duplicate Finder windows
Close Duplicate finder windows
Macosxhints Posted a Applescript hint on Macosxhints to close duplicate finder windows.
The idea of the script is sometimes you may find you have multiple finder windows open. Many of them leading to the same target (folder). And want a quick way of closing all the duplicate windows.
But I couldn’t understand why it was so long and complicated. So as an excise for myself wrote one that did a similar job
Complexity
Continue reading “Applescript to Close Duplicate Finder windows”
My very first Automator Action
Get Finder window Path.
I had already wrote some code for an application that could get the path of open Finder windows.
So when I saw a member on Apple Stack Exchange wanted to get the top level finder window’s path.
I thought it would be simple to throw together something using part of the code in writing a new Automator Action.
It was..
The Action Get first Finder Window Path. Will return the Posix path of the front most open Finder window.
It is a beta, But is working ok.
First download the Action
versions
This is for 10.9.x v103- Action is now placed in Files & Folders in the Automator library Download “Get first Finder Window Path_10.9 BETA” Get-first-Finder-Window-Path.action_BETA_10.9_103.zip – Downloaded 10696 times – 8.06 KB |
This is for System : 10.8 Download “Get first Finder Window Path 10.8” GFFWPath_Action_1.0.2b10.8build.zip%22 – Downloaded 893 times – |
This is for System : 10.6 |
Then
1, Open the zip and install it by double clicking on the action.
It will go into the Utilities Actions name ‘Get first Finder Window Path’
2, drag it as normal to the workflow area and add for example the ‘Copy to Clipboard’ action below it
Image gallery:
Hello world!
Hmm.
I guess thats how many may feel when they are looking at the first ever blank page of their first ever blog.
I never thought I would be one of them. You know bloggers..
And in truth I am not. I think..!
Bizarrely I am just looking for a cheap way to get a download or page view counter for any apps, scripts etc. I share on the internet. Just so I can gauge interest.
I know, right! whats this got to do with blogging.
Over the years I have written a lot of Applescript to help me and my colleagues do our daily jobs. But as time has gone on, the scripts have become organic in nature. Growing and becoming more complex. Mainly to cope with changes to workflows, Mac Os or portability to new areas.
So I have been rewriting a lot of them as cocoa application. And leaning (very slowly ) objective -c as I go along.
My quest to learn has a long way to go. I do have a couple of books that I keep meaning to get on with.
But I always seem to need to jump into the fray and write some urgent code that is beyond where I am in the books.
I fear this may be leading me into bad habits with the way I code.
One of the best ways I find I learn is to have an on going task. Rather than read through books.
So although I strive to do the aforementioned above. I also like to look at questions on fora (forums) like AppleStack Exchange ,StackOverflow [Objective -c ] MacosxHints and see if I can solve some of the issues for myself.
I have posted some answers up on them. Not many and probably not that great so don’t get exited.
So part of my quest is to slow down and do the basics of Objective – c and keep my hand in with Applescript.
Lastly, I have been wanting to have a place to put up bits and pieces of code snippets, apps etc. This Blog may be it. We will see.
Wish me luck..
Mark.