Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Aacini
- Expert
- Posts: 1914
- Joined: 06 Dec 2011 22:15
- Location: México City, México
-
Contact:
#46
Post
by Aacini » 05 Apr 2016 12:08
foxidrive wrote:Is there a method to set the font and size for one screen only, the one that is running the clock?
@foxidrive: Yes, that is the purpose of
carlos' PIXELFNT.EXE program. Just download it and execute "PIXELFNT 1" in the clock.bat program before show any output to the screen.
Antonio
-
einstein1969
- Expert
- Posts: 961
- Joined: 15 Jun 2012 13:16
- Location: Italy, Rome
#47
Post
by einstein1969 » 06 Apr 2016 04:35
foxidrive wrote:The pic looks neat Antonio.
Is there a method to set the font and size for one screen only, the one that is running the clock?
Can the settings be changed to open the window, and then changed back so other windows open as usual?
Yes, the
title of the windows is the key.
Windows track the size , font, etc. based on windows title. If there isn't windows title that default to standard title (I don't remeber but you may found on windows registry)
Look at method used by user Neorobin.
http://www.dostips.com/forum/viewtopic.php?f=3&t=2745&p=15988#p15990
-
einstein1969
- Expert
- Posts: 961
- Joined: 15 Jun 2012 13:16
- Location: Italy, Rome
#48
Post
by einstein1969 » 06 Apr 2016 07:18
I have try previous code and there is an error at
Code: Select all
rem Insert day of week
if not defined %lang%[0] (
error on echo on
Code: Select all
C:\Users\ACER\Desktop>rem Insert day of week
Sintassi del comando errata.
[0] (ers\ACER\Desktop> if not defined IT"}
C:\Users\ACER\Desktop>
output of wmic:
Code: Select all
C:\Users\ACER\Desktop>wmic OS Get LocalDateTime,MUILanguages
LocalDateTime MUILanguages
20160406152131.386000+120 {"it-IT"}
einstein1969
-
pieh-ejdsch
- Posts: 240
- Joined: 04 Mar 2014 11:14
- Location: germany
#49
Post
by pieh-ejdsch » 06 Apr 2016 07:53
Einstein you put this
Code: Select all
rem delim + = " TAB
rem Tausche Escape Zeichen der Anweisung mit Zollzeichen der Optionen
for /F tokens^=1^,4delims^=^.^-^{^"^ %%a in ('"wmic OS Get LocalDateTime,MUILanguages |find " " "') do if "%%~b" neq "" set "daTi=%%a" & set "lang=%%~b"
from wmic is TAB and <CR> <CR> in Output at last
-
Aacini
- Expert
- Posts: 1914
- Joined: 06 Dec 2011 22:15
- Location: México City, México
-
Contact:
#50
Post
by Aacini » 06 Apr 2016 10:06
einstein1969 wrote:output of wmic:
Code: Select all
C:\Users\ACER\Desktop>wmic OS Get LocalDateTime,MUILanguages
LocalDateTime MUILanguages
20160406152131.386000+120 {"it-IT"}
einstein1969
Ops! A
real bug!
This is the output of "wmic OS Get LocalDateTime,MUILanguages" in my computer:
Code: Select all
LocalDateTime MUILanguages
20160406104801.760000-300 {"es-ES"}
This means that the fields must be delimited by "-"
OR "+"! Just insert a "+" in the delims part in this line:
Code: Select all
for /F "tokens=1,4 delims=.-+{" %%a in ('wmic OS Get LocalDateTime^,MUILanguages') do if "%%~b" neq "" set "daTi=%%a" & set "lang=%%~b"
I already did this in the posted code... Thanks for reporting!
PS - May anybody confirm if a "+" is used when the time zone adjustment is zero? For example:
Code: Select all
20160406152131.386000+000 {"xx-XX"}
Antonio
-
aGerman
- Expert
- Posts: 4678
- Joined: 22 Jan 2010 18:01
- Location: Germany
#51
Post
by aGerman » 06 Apr 2016 11:28
PS - May anybody confirm if a "+" is used when the time zone adjustment is zero?
Confirmed (Win7 x86). If I change the settings to an appropriate timezone it displays +000.
Regards
aGerman
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#52
Post
by foxidrive » 06 Apr 2016 18:08
Aacini wrote:foxidrive wrote:Is there a method to set the font and size for one screen only, the one that is running the clock?
@foxidrive: Yes, that is the purpose of
carlos' PIXELFNT.EXE program. Just download it and execute "PIXELFNT 1" in the clock.bat program before show any output to the screen.
Antonio
Thank you Antonio. :thumbsup: