Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: paging: Nadler Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jpcurcio
Senior Member
Senior Member
Avatar

Joined: April 01 2007
Location: United States
Online Status: Offline
Posts: 119
Posted: April 26 2007 at 03:13 | IP Logged Quote jpcurcio

Nadler:

I have some questions regarding the VBscripting you've done for iTunes. I'm trying to write a couple scripts myself, but some don't seem to work, while others are just fine. Can you perhaps give me some guidance?

Thanks...

-JPC
Back to Top View jpcurcio's Profile Search for other posts by jpcurcio
 
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: April 26 2007 at 07:05 | IP Logged Quote nadler

Unfortunately, I kinda just copied what Dave had done and modified it a little using trial and error. I really don't know VBscripting. If you search the threads and ask Dave some questions, he should be able to help.
Back to Top View nadler's Profile Search for other posts by nadler
 
jpcurcio
Senior Member
Senior Member
Avatar

Joined: April 01 2007
Location: United States
Online Status: Offline
Posts: 119
Posted: April 26 2007 at 22:44 | IP Logged Quote jpcurcio

nadler wrote:
Unfortunately, I kinda just copied what Dave had done and modified it a little using trial and error. I really don't know VBscripting. If you search the threads and ask Dave some questions, he should be able to help.


Actually, my main questions were regarding the various commands available. I downloaded the iTunes SDK, and can figure out some of the commands (I use this mostly for documentation), but I find that they don't necessarily work for me.

One of the things I'd like to do is toggle the shuffle and repeat modes. I find the commands, but they don't seem to work. I also had some issues with your script to select the playlists, so I'm not sure if it's me or not.

-JPC
Back to Top View jpcurcio's Profile Search for other posts by jpcurcio
 
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: April 27 2007 at 17:40 | IP Logged Quote nadler

This following works for me to mute itunes. Hope this helps.

Here is the PH formula I use to call the script:
ph_runscript_1("C:\Program Files\iTunes\Scripts\Mute.vbs","vbscript",0,0,"main","")

Here is the vbscript I use which toggles muting in itunes.
sub main(arg)
     Dim iTunes
     Dim ArgStr
     Dim Msg
     
     ' Create app object
     Set iTunes = CreateObject("iTunes.Application")
     
     ' Get the argument
     argstr = lcase(trim(arg))
     
     ' Now interpret the argument and act accordingly
     Select Case ArgStr
            Case "on"
               iTunes.Mute = True
     
            Case "off"
               iTunes.Mute = False
     
            Case ""
               ' Toggle
               iTunes.Mute = Not (iTunes.Mute)
     
            Case Else
               Msg = "Please specify 'Mute on' or 'Mute off' to set the mute state, or 'Mute'"
               Msg = Msg + " (without an argument) to toggle the mute state."
               Echo Msg
     
     End Select
     
     ' Done; release object
     set iTunes = nothing
     ' msgbox "done"
     rem End of script.
end sub
Back to Top View nadler's Profile Search for other posts by nadler
 

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