by blablabubble » Fri May 08, 2015 5:57 am
Is there a way to script a library rescan? I want to automate it through a schedule. I've currently automated it by using a schedule to wake the PC, start MM and get it to rescan at every startup but I want to control the library scan better as I don't want it to scan everytime MM starts.
I've manage to automate the sync to my iPhone using the following vbscript - which runs from a windows schedule:
Code: Select all
Dim SDB : Set SDB = CreateObject("SongsDB.SDBApplication")
SDB.ShutdownAfterDisconnect = False
WScript.Sleep(5000)
Dim list : Set list = SDB.Device.HandledDeviceList
If list.Count = 0 Then
'No connected device
WScript.Quit
End If
Dim txt
Dim i : i = 0
For i = 0 To list.Count-1
txt = SDB.Device.Caption( list.DeviceHandle(i))
If txt = "Simon's iPhone" Then
Call SDB.Device.StartAutoSynch(list.DeviceHandle(i))
End If
Is there a way to script a library rescan? I want to automate it through a schedule. I've currently automated it by using a schedule to wake the PC, start MM and get it to rescan at every startup but I want to control the library scan better as I don't want it to scan everytime MM starts.
I've manage to automate the sync to my iPhone using the following vbscript - which runs from a windows schedule:
[code]Dim SDB : Set SDB = CreateObject("SongsDB.SDBApplication")
SDB.ShutdownAfterDisconnect = False
WScript.Sleep(5000)
Dim list : Set list = SDB.Device.HandledDeviceList
If list.Count = 0 Then
'No connected device
WScript.Quit
End If
Dim txt
Dim i : i = 0
For i = 0 To list.Count-1
txt = SDB.Device.Caption( list.DeviceHandle(i))
If txt = "Simon's iPhone" Then
Call SDB.Device.StartAutoSynch(list.DeviceHandle(i))
End If
[/code]