Help with a System Volume Command

Posted on
Sat Nov 02, 2019 4:24 pm
makedrinklas offline
Posts: 124
Joined: Oct 12, 2004

Help with a System Volume Command

Ok, so here is the big problem. Much of our Indigo functionality comes from Applescripts controlling the system audio, from motion alerts to waking up in the Am. Worse yet, the house is under major construction hence the Indigo mac is in the basement on a saw horse! It has the headphone out running to an amp and speakers placed throughout.

Can someone please be kind and tell me how to accomplish this as an embedded python script? Also, will I need to compile and run? I have many variations of this, some actions just change the house volume depending on the time of day. This one has been how we wake up for years...

Code: Select all
# tell application "Finder"
#    set volume 4
# end tell
# tell application "iTunes"
#    set sound volume to 50
#    play user playlist "iTunes WAMU"
# end tell

I am reading that Python is very easy and simple, and searching to see if this has been answered. It looks like someone else asked and did not receive a response. Hoping this is different, I am pressed for time to learn scripting, especially while sitting on a footstool under a bare bulb!

Posted on
Sat Nov 02, 2019 9:58 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Help with a System Volume Command

Ok, so here is the big problem. Much of our Indigo functionality comes from Applescripts controlling the system audio, from motion alerts to waking up in the Am. Worse yet, the house is under major construction hence the Indigo mac is in the basement on a saw horse! It has the headphone out running to an amp and speakers placed throughout.

Is it safe to assume that your desire to migrate off the embedded AppleScripts is based upon the Indigo 7.4 change to drop support for them? If so, you might consider this option if you have a ton of them -- anything that does not reference the Indigo Server (i.e. is not referencing Indigo, such as not reading/setting variables, etc.) can continue to work as an AppleScript called from Indigo -- it just has to be in an external file.

Then you could concentrate on changing those that HAVE to be changed because they reference Indigo. It wouldn't hurt to ultimately get off AppleScript, but this might be an opportunity to spread out your changes/urgency a bit.

Adam

Posted on
Sun Nov 03, 2019 11:19 am
makedrinklas offline
Posts: 124
Joined: Oct 12, 2004

Re: Help with a System Volume Command

Huh. Yeah they are all simple finder commands to adjust volume and activate iTunes at various volumes on a schedule. A rudimentary but reliable alarm clock, gradually increasing volume is nice routine to wake up to.

Great, so I just save the various specific Applescripts into text files and away we go...

Thanks, I’ll give it a try!

Posted on
Sun Nov 03, 2019 11:40 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Help with a System Volume Command

makedrinklas wrote:
Great, so I just save the various specific Applescripts into text files and away we go...

Open Apple's Script Editor app and copy/paste the embedded scripts into new files there, then save those script files out to then be referenced by your Indigo Actions. That is, you want Script Editor (AppleScript) files and not just simple text files.

Image

Posted on
Sun Nov 03, 2019 9:26 pm
makedrinklas offline
Posts: 124
Joined: Oct 12, 2004

Re: Help with a System Volume Command

Okay! I will give that a try when I get a bit of free time next weekend. Its pretty rough out here. Thanks Matt.

Posted on
Sun Jan 05, 2020 5:11 pm
makedrinklas offline
Posts: 124
Joined: Oct 12, 2004

Re: Help with a System Volume Command

Thanks Matt, this is all now working again. Took, me a while to get around to it, but that was a simple solution.

BTW, do you know of any way to search, identify or otherwise highlight action groups that contain remaining embedded applescripts? (In case I've missed any.)

Best,

Mike

Posted on
Sun Jan 05, 2020 6:20 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Help with a System Volume Command

Hi Mike,

In Indigo 7.4 you can choose the Help->Show AppleScript Usage in Event Log menu item to have the locations of embedded AppleScripts written to the Event Log window.

Image

Posted on
Sat Mar 23, 2024 1:10 pm
makedrinklas offline
Posts: 124
Joined: Oct 12, 2004

Re: Help with a System Volume Command

Hey Matt, nothing actionable –  just an FYI update on this, my Indigo Actions that call on outside Applescripts have all somehow become disconnected in the 2023.2 update. Maybe this was expected in the update notes and I missed it.

It did ask me for permission at one point on an iTunes Off action pointing to a script but all of the 10 volume actions were set to "none".

Basically I still l use them to set the home volume (I have wired computer speakers around the house plugged into the Mac via a Sound Blaster Play! 3). At night volume 4 on outside motion alerts will throw you out of bed! (Actually my wife tosses me out.). Also an abrupt way to wake up to the good morning–time announcement in the AM as our alarm. I then reset back to the default 4 during the rest of the day.

I still use iTunes remote and this is a good way to control the same sound volume output.

I am re-selecting the scripts now.
Attachments
System Volume.png
System Volume.png (41.41 KiB) Viewed 374 times

Posted on
Sun Mar 24, 2024 12:19 pm
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Help with a System Volume Command

Were those embedded AppleScripts or were the executing AppleScript files?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Mar 25, 2024 9:40 am
makedrinklas offline
Posts: 124
Joined: Oct 12, 2004

Re: Help with a System Volume Command

They were executing script files. Not sure how all ten happened, they had to be reconnected manually.

All is well now, just an FYI.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests