0

What iam trying to figure out is how to have a vbs script cycle through different .ico files while still on the desktop. almost like a slide show of the different .ico files. is it possible?

here is what i have so far but it does not cycle the .ico files

     set WshShell = WScript.CreateObject("WScript.Shell")
     strDesktop = WshShell.SpecialFolders("Desktop")
     set oShellLink = WshShell.CreateShortcut(strDesktop & "\Movies Folder.lnk")
     oShellLink.TargetPath = "J:\Movies"
     oShellLink.IconLocation = "C:\MoviesShortcut\Movies.Ico"
     wscript.sleep 500
     oShellLink.IconLocation = "C:\MoviesShortcut\tv1.Ico"
     oShellLink.Description = "movies"
     oShellLink.WorkingDirectory = strDesktop
4

1 回答 1

1

如果示例代码有效并且确实在 5 秒后执行了一次图标更改,那么我认为您需要添加一个“Open Do Loop”和一个“For”来运行文件夹中的所有文件,例如:

oShellLink.TargetPath = "J:\Movies"

Do
    For Each File in OShellLink.TargetPath
        oShellLink.IconLocation = File.Path
        wscript.sleep 500
    Next
Loop

我的 vbs 有点生锈,但希望这会为您指明正确的方向。

于 2012-02-16T10:22:57.117 回答