Browse Source

v0.1

master
Oliver Stingl 1 year ago
commit
6069577172
  1. 25
      season-names.vbs

25
season-names.vbs

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
Function LPad(s, l, c)
Dim n : n = 0
If l > Len(s) Then n = l - Len(s)
LPad = String(n, c) & s
End Function
Dim ShowName, EpisodeCount, Season
ShowName = InputBox("Serienname")
EpisodeCount = CInt(InputBox("Wie viele Folgen benennen?"))
Season = InputBox("Staffel?")
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 500
For CurrentEpisode = 1 to EpisodeCount
WScript.Sleep 100
WshShell.SendKeys "{F2}"
CurrentSeason = LPad(Season, 2, "0")
CurrentEpisodePadded = LPad(CStr(CurrentEpisode), 2, "0")
WshShell.SendKeys ShowName & " S" & CurrentSeason & "E" & CurrentEpisodePadded
WshShell.SendKeys "{DOWN}"
Next
WScript.Sleep 1000
MsgBox "DONE"
Loading…
Cancel
Save