Author |
|
jpcurcio Senior Member
Joined: April 01 2007 Location: United States
Online Status: Offline Posts: 119
|
Posted: April 26 2007 at 03:13 | IP Logged
|
|
|
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 |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: April 26 2007 at 07:05 | IP Logged
|
|
|
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 |
|
|
jpcurcio Senior Member
Joined: April 01 2007 Location: United States
Online Status: Offline Posts: 119
|
Posted: April 26 2007 at 22:44 | IP Logged
|
|
|
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 |
|
|
nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: April 27 2007 at 17:40 | IP Logged
|
|
|
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 |
|
|