Interesting findings #165
valinet
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
Here's various ways you can trigger parts of the Windows shell from your scripts. The code listed is in C (as I mostly write in C), but it is short and concise, so it should be straightforward to port it to AHK language etc.
Toggle stuff via main taskbar
Posting the
WM_HOTKEY
(0x312) message to the main taskbar (window classShell_TrayWnd
) triggers various things based on the application specificwParam
. Prototype:In the above,
ZZZ
can stand for:These numbers are obtained by inspecting the
CTray::_HandleGlobalHotkey
method inexplorer.exe
.Toggle stuff via
WorkerW
window in the thread ofApplicationManager_ImmersiveShellWindow
windowThis one is a bit more complicated: you need to identify the window with class
ApplicationManager_ImmersiveShellWindow
, then enumerate over windows in that thread andPostMessage
only to those windows from thread having a class ofWorkerW
. In C:The toggle immersive callback can be implemented in 2 ways (first one is more efficient, I think, second one is more starightforward):
Again,
ZZZ
in the call above can stand for the following numbers:Send messages and document the effect
For determining whether posting a message has any effect on a window, a quick C program that helps you log things would be:
Extract the Search, Task View, Widgets and Chat icons (or any icon in this format)
These assets are really tucked away in the system. They are contained in compressed Microsoft Package Indexing files in the system folders. Specifically, these icons are located in
C:\Windows\SystemResources\Windows.UI.SettingsAppThreshold\Windows.UI.SettingsAppThreshold.pri
. To dump a human readable XML out of that file, you need themakepri
utility which comes with the Windows SDK.The command used to create a dumped XML in the folder of your choice is:
This will create an XML file. Open that in a capable text editor and you will find all the assets in base64 encoded form. Once you decode them (use a tool like
base64 -d input > output
, you can convert them to multi-sized goregousico
andpng
files using a set of commands like this:Find/replace
Chat_Dark
in the commands above with whatever the name your extracted file has.Beta Was this translation helpful? Give feedback.
All reactions