Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Control iTunes - extended functions Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
judetf
Senior Member
Senior Member


Joined: January 23 2008
Online Status: Offline
Posts: 234
Posted: July 05 2008 at 09:20 | IP Logged Quote judetf

A la Nadler, I am now controlling iTunes from a KPL. I thought I would share the following, which has made it much easier (and simpler) to do this than I could using just iTunes.

http://www.maximized.com/freeware/ScriptsForiTunes/

The site has a set of iTunes vbs scripts that give (IMHO) a broader, more powerful way of controlling iTunes. With simple single-line 'Launch App' PH macros, I can point to any of the scripts and get great control over iTunes.

If you use iTunes you might want to check them out...

jtf
Back to Top View judetf's Profile Search for other posts by judetf
 
cox181
Newbie
Newbie


Joined: January 26 2012
Location: United States
Online Status: Offline
Posts: 12
Posted: January 29 2012 at 23:14 | IP Logged Quote cox181

I have installed the scripts in the itunes folder, but how
do I execute them using powerhome? For a test run I used a
command called TALK with sytax "test", action type "raw
formula" and action-- ph_runscript_0(1, "C:\Program Files
(x86)\iTunes\Scripts\PlayPause", "PlayPause")

The command executes when I give it the voice command, but
nothing in my itunes happens. Am I even executing the
script file correctly? How do I execute it using a 'Launch
App' PH macros??
Back to Top View cox181's Profile Search for other posts by cox181
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 31 2012 at 22:51 | IP Logged Quote dhoward

Taylor,

First, make sure you've enable the script server. I believe its disabled by default. In the PowerHome Explorer, navigate to PowerHome|Setup|Preferences and make sure that "Load Script Server" is checked. If you make any changes in the "Setup" area of PowerHome, you must restart or reinit for the changes to take effect.

Once the script server is loading, I would first verify your scripts run by opening the PowerHome Multi-Editor (under maintenance menu) and switching to Script mode (shift-F1). Load your script and try executing it from within this window to verify no errors. Once that is successful, switch to PH Formula mode (shift-F6) and try the ph_runscript_0 command to verify that you can launch via PH.

"Launch App" in macros is to launch an executable file from PowerHome and would be the equivalent of the ph_run command. You definitely want the ph_runscript_X functions to run scripts.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
cox181
Newbie
Newbie


Joined: January 26 2012
Location: United States
Online Status: Offline
Posts: 12
Posted: February 01 2012 at 00:43 | IP Logged Quote cox181

@Dave

I have succesfully upgraded to 2.1.4 and have everything
running except when I enable script server and then reinit
I get "An error occurred while creating the script server:
-2"....I have seen this in some other threads, but what are
the steps I should try and take to resolve this error?
Back to Top View cox181's Profile Search for other posts by cox181
 
judetf
Senior Member
Senior Member


Joined: January 23 2008
Online Status: Offline
Posts: 234
Posted: February 02 2012 at 12:25 | IP Logged Quote judetf

That's actually not how I get the scripts to run. My iTunes macros in PH use two different approaches (I confess not to remember why, but I can figure it out if necessary). Here are two examples:

Macro command is Launch App and Formula =
'wscript "C:\Program Files (x86)\iTunes\Scripts\stop.vbs"'

Macro command is Formula and Formula =
ph_run('wscript "C:\Program Files (x86)\iTunes\Scripts\playplaylist.vbs" ": Good Mix"')

Both of these work perfectly well. I have an Insteon keypad that can start iTunes and launch my playlist, pause and restart a song, skip to the next song on a playlist, and cycle through 3 designated playlists.
Back to Top View judetf's Profile Search for other posts by judetf
 
cox181
Newbie
Newbie


Joined: January 26 2012
Location: United States
Online Status: Offline
Posts: 12
Posted: February 02 2012 at 14:47 | IP Logged Quote cox181

@Judetf. Thank you very much. I have it working perfectly
now with the second command you gave. How do you have
your macros setup? Do you just have them under a "Main"
grammar under the voice section in the powerhome setup
voice submenu? And have a formula for each command with a
button attached to each one? Have you ever used voiced
control to execute the itunes commands? Would there be a
way to program it so that I could say play song and then
have the "virtual assistant" ask for a song and then I
would say the song title and it would be played? Or do
the voice recognition and text to speech not have the
ability to ask questions and then store the result as a
variables? Any of your knowledge would be great.
Back to Top View cox181's Profile Search for other posts by cox181
 
judetf
Senior Member
Senior Member


Joined: January 23 2008
Online Status: Offline
Posts: 234
Posted: February 02 2012 at 15:01 | IP Logged Quote judetf

I don't have any voice recognition going on with PH. These are all just normal PH macros which are called via triggers from the designated keypad buttons.

Again, not knowing anything about voice recognition, I can't tell you. You can (I think) use the iTunes scripts to play a specific song though. So, I imagine that if you could use the voice recognition to capture the name of the song as a local variable, you could then pipe that local variable into the macro formula to get what you want.

Hmm, but now that I'm looking at the 'play' script, you have to provide the full path to the track you want to play. So unless all of your MP3s are in a single folder (ie, not subfolders) you may be out of luck, since you have to give the script the _full_ path to the song.
Back to Top View judetf's Profile Search for other posts by judetf
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum