Page 1 of 1

Taskbar

Posted: 24 Nov 2018, 05:00
by kestak
Greetings,

I am not a programmer. I look at a few code examples and honestly, I do not even understand where to begin to modify them.
I need to do a simple scrip that will change the current windows taskbar settings:
Lock the taskbar = On
Auto-hide the taskbar = Off
taskbar on screen = Bottom
Apply the current settings.

!z::
...Change the taskbar setups here
Return

Is there anyone who knows how to do that in a very simple way?

Thank you

Re: Taskbar

Posted: 30 Nov 2018, 12:47
by SL5
i dont know.

maybe such a window is not in taskbar :

Gui, ListBoxGui: -DPIScale -Caption +AlwaysOnTop +ToolWindow

probably becouse of
-Caption

Re: Taskbar

Posted: 03 Dec 2018, 22:41
by jeeswg
I have some code here re. lock and auto-hide. Cheers.
Get taskbar autohide state? Solved - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 81#p179081

For moving the taskbar perhaps MouseClickDrag.

When you change the taskbar position manually, this registry value is updated. However, I don't know if there's a way, after writing to the registry, to trigger Windows to update the taskbar position.

Code: Select all

q:: ;get taskbar position (hex data)
RegRead, vValue, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2, Settings
;RegWrite, REG_BINARY, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2, Settings, % vValue
Clipboard := vValue
MsgBox, % vValue
return
Here's a not-too-bad way to move the taskbar to an edge.

Code: Select all

q:: ;set taskbar position (tested on Windows 7)
vPos := "Bottom"
;vPos := "Left"
;vPos := "Right"
;vPos := "Top"
Run, % "rundll32 shell32.dll,Options_RunDLL 1" ;Taskbar and Start Menu Properties, Taskbar tab
WinWait, Taskbar and Start Menu Properties
hWnd := WinExist()
WinActivate, % "ahk_id " hWnd
Control, ChooseString, % vPos, ComboBox1, % "ahk_id " hWnd
ControlClick, Button9, % "ahk_id " hWnd ;OK
return