Help with a System Volume Command

Posted on
Sat Nov 02, 2019 4:24 pm
makedrinklas offline
Posts: 75
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: 2436
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: 75
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: 20539
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: 75
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: 75
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: 20539
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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests