Log inRegister
You are here: Boossy » VrtNuWin

Het journaal 13u

Roep het journaal van gisteren op als het voor 14u is, anders dat van vandaag.

1) VrtNuHetJournaal13u.bat

@echo off
set day=-1
echo >"%temp%\%~n0.vbs" s=DateAdd("d",%day%,now) : d=weekday(s)
echo>>"%temp%\%~n0.vbs" WScript.Echo year(s)^& right(100+month(s),2)^& right(100+day(s),2)
for /f %%a in ('cscript /nologo "%temp%\%~n0.vbs"') do set "result=%%a"
del "%temp%\%~n0.vbs"
set "YYYY=%result:~0,4%"
set "MM=%result:~4,2%"
set "DD=%result:~6,2%"
set "TYesterday=%yyyy%%mm%%dd%"

Set TToday=%date:~6,4%%date:~3,2%%date:~0,2%
set THour=%time:~0,2%

IF %time:~0,2% lss 14 (
 set URL=https://www.vrt.be/vrtnu/a-z/het-journaal/2020/het-journaal-het-journaal-13u-%TYesterday%/
) ELSE (
 set URL=https://www.vrt.be/vrtnu/a-z/het-journaal/2020/het-journaal-het-journaal-13u-%TToday%/
start %URL%

2) VrtNuHetJournaal13u.vbs

Hide the DOS box by using a .vbs script alongside the .bat file with the same name:
Dim scriptName : scriptName = WScript.ScriptFullName
scriptName = Left(scriptName, Len(scriptName) - 4) & ".bat"
Set WshShell = CreateObject("WScript.Shell" ) 
 WshShell.Run chr(34) & scriptName & Chr(34), 0 
 Set WshShell = Nothing

3) Pin to start

Source: https://social.technet.microsoft.com/Forums/en-US/dd2b13ef-2968-4f23-b531-57d1e9d634e3/if-you-guys-have-been-trying-hard-to-pin-vbs-files-to-your-start-menu-in-windows-10-look-no?forum=ITCG&prof=required

If you rightclick the .vbs file, you'll notice there's no 'Pin to Start' option.

There's a simple trick to solve this:
  • modify the .vbs extension into .exe
  • rightclick the .exe and choose Pin to Start
  • rename the .exe back to .vbs
  • now go to %AppData%\Microsoft\Windows\Start Menu\Programs
  • rightclick the shortcut you've just created and change .exe into .vbs in the Target field

4) Add the right icon

  • open the VRT NU site in the Edge browser
  • choose … (Settings and more) > Apps > Install this site as an app
  • in the dialog that appears, choose the Install button
  • click Start, then rightclick the recently added app
  • choose More > Open file location
  • rightclick > Properties
  • click the Change Icon… button and copy what's in the field
  • now open the Properties > Change Icon… of the .vbs shortcut (from 3)), in the same location
  • paste the copied value here and confirm
Now your .vbs shortcut has the right icon. You can safely delete the site app.
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback