Steve 2019-04-21 07:41
Hi there, has anyone written a script that will do this. What I would like to do is to resize the in focus window to 75% of the current monitor and then centre it on the screen.
There are some scripts in the database that do some of these things but when I try to combine/adjust I am not quite getting it right. No done any coding/scripting for years so just me I think.
Appreciate if anyone has done this or similar.
Thanks
Steve
|
Christian Studer 2019-04-21 13:38
The following code will do this:
Set sys = CreateObject("UltraMon.System")
Set wnd = CreateObject("UltraMon.Window")
If wnd.GetForegroundWindow() = True Then
Set mon = sys.Monitors(wnd.Monitor - 1)
wnd.Width = mon.Width / 100 * 75
wnd.Height = mon.Height / 100 * 75
wnd.Centered = True
wnd.ShowState = 2 'SHOWSTATE_NORMAL
wnd.ApplyChanges 0
End If
Christian Studer - www.realtimesoft.com
|
Steve 2019-04-30 12:03
Hey Christian, firstly apologies for the delay in responding.
Thank you so much for this, this helps me a lot with my workflow - appreciate it - works like a charm.
Best wishes Steve
Steve
|
anita2309 2025-05-01 07:41
Wordle Unlimited – Fun Word Guessing Game
Wordle Unlimited at wordleunlimited.click is an exciting English word guessing game where you can play as many times as you like. It helps improve your vocabulary, sharpens your mind, and offers endless entertainment—completely free!
|
anita2309 2025-05-01 07:42
Wordle Unlimited – Fun Word Guessing Game
Wordle Unlimited at wordleunlimited.click is an exciting English word guessing game where you can play as many times as you like. It helps improve your vocabulary, sharpens your mind, and offers endless entertainment—completely free!
|