Help perfect my cover for doing questions PDF to cover the answers.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
joyrr5092
Posts: 83
Joined: 28 Dec 2023, 09:54

Help perfect my cover for doing questions PDF to cover the answers.

23 Feb 2024, 03:53

i asked the magic mirror for some code:

Code: Select all

#NoEnv
#Persistent
Gui, +ToolWindow ; Makes the window a tool window, so it doesn't appear in the taskbar.
Gui, +Resize ; Allows the window to be resized.
Gui, Color, 000000 ; Sets the window color to black.
Gui, Show, w200 h200, BlackCover ; Creates the window with the title "BlackCover".
Return

GuiClose:  ; When the GUI window is closed
ExitApp  ; Exit the script
result:
a bright large white bar that kill my eyes in dark.
image.png
image.png (6.91 KiB) Viewed 295 times
magic mirror failed to perfec it.
thanks

ps, not bad, the GUI can be stretched V and H, can be made always on top by win10's powertoy.
joyrr5092
Posts: 83
Joined: 28 Dec 2023, 09:54

Re: Help perfect my cover for doing questions PDF to cover the answers.

23 Feb 2024, 03:57

ps shd remove the ToolWindow so you can select it in taskbar.
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Help perfect my cover for doing questions PDF to cover the answers.

23 Feb 2024, 06:26

You can have no caption/border at all if you don’t need to resize it. You can reposition it by dragging it.

Code: Select all

Gui, -Caption -Border +AlwaysOnTop
Gui, Color, Black
Gui, Show, w200 h200
OnMessage(0x0201, "WM_LBUTTONDOWN")
return

WM_LBUTTONDOWN() {
	PostMessage, 0xA1, 2,,, A
}

Esc::ExitApp

joyrr5092
Posts: 83
Joined: 28 Dec 2023, 09:54

Re: Help perfect my cover for doing questions PDF to cover the answers.

24 Feb 2024, 00:08

boiler wrote:
23 Feb 2024, 06:26
You can have no caption/border at all if you don’t need to resize it. You can reposition it by dragging it.

Code: Select all

Gui, -Caption -Border +AlwaysOnTop
Gui, Color, Black
Gui, Show, w200 h200
OnMessage(0x0201, "WM_LBUTTONDOWN")
return

WM_LBUTTONDOWN() {
	PostMessage, 0xA1, 2,,, A
}

Esc::ExitApp

thanks but not very billirant.
i would like it to be resizable as i got both 19 and 24 inch LCDs.
thanks
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Help perfect my cover for doing questions PDF to cover the answers.

24 Feb 2024, 07:38

With this version, when the cover window is active, use the arrow keys to resize it:

Code: Select all

Width := 200, Height := 200
Gui, -Caption -Border +AlwaysOnTop +HwndGuiHwnd
Gui, Color, Black
Gui, Show, % "w" Width " h " Height
OnMessage(0x0201, "WM_LBUTTONDOWN")
return

WM_LBUTTONDOWN() {
	PostMessage, 0xA1, 2,,, A
}

Esc::ExitApp

#If WinActive("ahk_id " GuiHwnd)
Up::
	Height -= 20
	Gui, Show, % "w" Width " h " Height
return

Down::
	Height += 20
	Gui, Show, % "w" Width " h " Height
return

Left::
	Width -= 20
	Gui, Show, % "w" Width " h " Height
return

Right::
	Width += 20
	Gui, Show, % "w" Width " h " Height
return

joyrr5092
Posts: 83
Joined: 28 Dec 2023, 09:54

Re: Help perfect my cover for doing questions PDF to cover the answers.

24 Feb 2024, 07:45

thx, almost worked.

i'll make it so it will have a minimal on the x and y.

currently it could disappear.

thank you.
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Help perfect my cover for doing questions PDF to cover the answers.

24 Feb 2024, 08:18

“Almost worked” is an odd characterization (as was “not very brilliant”). It does work. You just want it to work differently. You can just make it reappear by growing it again, so it actually is a convenient way of hiding it if you’d like, and if you don’t, just don’t make it so small that it disappears.
joyrr5092
Posts: 83
Joined: 28 Dec 2023, 09:54

Re: Help perfect my cover for doing questions PDF to cover the answers.

25 Feb 2024, 11:50

hi,

the magic mirror modified for me, now it works (i use powertoys'always on top)

thank you, it now have a minium of 200x200

Code: Select all

Width := 200, Height := 200
Gui, -Caption -Border +AlwaysOnTop +HwndGuiHwnd
Gui, Color, Black
Gui, Show, % "w" Width " h " Height
OnMessage(0x0201, "WM_LBUTTONDOWN")
return

WM_LBUTTONDOWN() {
    PostMessage, 0xA1, 2,,, A
}

Esc::ExitApp

#If WinActive("ahk_id " GuiHwnd)
Up::
    NewHeight := Height - 20
    Height := NewHeight >= 200 ? NewHeight : 200
    Gui, Show, % "w" Width " h " Height
return

Down::
    Height += 20
    Gui, Show, % "w" Width " h " Height
return

Left::
    NewWidth := Width - 20
    Width := NewWidth >= 200 ? NewWidth : 200
    Gui, Show, % "w" Width " h " Height
return

Right::
    Width += 20
    Gui, Show, % "w" Width " h " Height
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo, mikeyww, vanove and 144 guests