Check if app is running, drive mounted

Posted on
Thu Aug 01, 2019 9:59 pm
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

Check if app is running, drive mounted

I use an AppleScript in Indigo that checks if an app is running, if not, it checks if a drive is mounted and if so starts the app. If the drive is not mounted it attempts to mount the drive, checks if it is mounted and starts the app. If I understand correctly this will stop working on the next version of indigo. Is there a python equivalent.


Background:

I have two apps that each require a specific external drive to be mounted to work. It is very rare that either drive does not mount automatically at startup however it has happened. So I created the AppleScript to check for me. It also starts the apps for me after the indigo server starts and checks periodically.

The first app is iTunes and it’s drive is iTunes

The second app is SecuritySpy and it’s drive is Cameras.

It's not rocket science...

Posted on
Fri Aug 02, 2019 5:54 am
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: Check if app is running, drive mounted

the Mac apps / Mac disks plugins can do this btw.

Posted on
Fri Aug 02, 2019 8:00 am
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

Re: Check if app is running, drive mounted

AWSOME!!! Thanks for that.

I got it all working except being able to mount my NAS . I can see the status and unmount the NAS through the plugin but cannot mount. I tried both the mount (get an error) and the open (no error, just does not mount) commands.

It's not rocket science...

Posted on
Fri Aug 02, 2019 9:27 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Check if app is running, drive mounted

FYI, as we've described elsewhere, AppleScripts that don't target Indigo will still work (as external scripts only).

How do you mount your NAS from AppleScript?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Aug 02, 2019 10:07 am
Radjin offline
User avatar
Posts: 146
Joined: May 13, 2015

Re: Check if app is running, drive mounted

Right now calling a bash script mounting the smb:/. I know this will continue to work, just wondering why the plugin fails to mount the share.

It's not rocket science...

Posted on
Fri Aug 02, 2019 11:23 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Check if app is running, drive mounted

Don't know about the plugin.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest