From 606957717216a37cc9a6e8ec6e0aae5107fab9c3 Mon Sep 17 00:00:00 2001 From: Oliver Stingl Date: Mon, 22 Jan 2024 10:53:31 +0100 Subject: [PATCH] v0.1 --- season-names.vbs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 season-names.vbs diff --git a/season-names.vbs b/season-names.vbs new file mode 100644 index 0000000..b3114f1 --- /dev/null +++ b/season-names.vbs @@ -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"