Win 10 Sticky Notes Always On Top

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
RangerRik1
Posts: 3
Joined: 26 Oct 2018, 20:57

Win 10 Sticky Notes Always On Top

26 Oct 2018, 21:07

Hi All,
This is my first post and I have no/little experience with AHK but it looks awesome. Quick question--I recently found this cool little AHK script on a website that allowed me to set my outlook reminders dialog-window to "always on top". It works great. In fact, so much so, I was wondering if someone here could easily show me how to modify the script to not only check and set outlook reminders to always on top -but- also set my sticky notes window(s) to always on top???

Here is the base outlook reminders script:
---snip---
TrayTip Script, Looking for Reminder window to put on top, , 16
SetTitleMatchMode 2 ; windows contains
loop {
WinWait, Reminder(s),
WinSet, AlwaysOnTop, on, Reminder(s)
WinRestore, Reminder(s)
TrayTip Outlook Reminder, You have an outlook reminder open, , 16
WinWaitClose, Reminder(s), ,30
}
---snip---

I can see where it checks for "Reminder(s)" titlebar text... but I don't see a true titlebar on my sticky notes windows. How can I modify the script to check for and set BOTH my outlook reminders -AND- my Sticky Notes window(s) to always on top?

Any suggestions are much appreciated. Thanks!

--Rick
Noesis
Posts: 301
Joined: 26 Apr 2014, 07:57

Re: Win 10 Sticky Notes Always On Top

27 Oct 2018, 03:40

Use ahk's windowspy (right click ahk icon in tray area and select the entry from the menu or run windowspy.ahk in ahk's folder) and then select a note to get info. It may have an invisible title (which windowspy will show) and will also have a class & exe associated with it (preceded by ahk_class / ahk_exe).

The actual title of the window may turn out to be different depending on the note ? don't know, not sure which sticky notes program you are referring to, but the class and exe will be consistent regardless of the notes differing contents. You then need to change the WinSet lines WinTitle argument so it uses the newly identified WinTitle data as Identified by windowspy.
RangerRik1
Posts: 3
Joined: 26 Oct 2018, 20:57

Re: Win 10 Sticky Notes Always On Top

27 Oct 2018, 10:40

Thanks for the suggestion. I used Window Spy. Under Windows Title, Class, & Process, it's a little tricky, because there is no title, and I guess Sticky Notes runs through Explorer.EXE.

However, Windows Spy consistently reports "Sticky Notes" under Visible Text. Can I use this as a viable option to identify the Sticky Notes windows and set them to always on top? Thanks again for your assistance.
Noesis
Posts: 301
Joined: 26 Apr 2014, 07:57

Re: Win 10 Sticky Notes Always On Top

28 Oct 2018, 07:10

Yeah that should work. The next part is to make all your displayed notes have this set, you need to identify each one separately. Something like:

Code: Select all

WinGet, IdList, List, AHK_class ApplicationFrameWindow AHK_exe Explorer.exe, Sticky Notes
Loop, %IdList%
{
	curID := IdList%A_Index%
	WinSet, AlwaysOnTop, On, AHK_id %curID%
}

;FYI, simply doing this:
;WinSet, AlwaysOnTop, On, AHK_class ApplicationFrameWindow AHK_exe Explorer.exe, Sticky Notes
;Would only set the most recently activated note to always on top.
Finally, any newly created notes would not be automatically on top (unless you had this always running). While you could, include it in the infinite loop shown in you're first post, Personally I wouldn't use an infinite loop for this, or for the notifications script you're using. You'd be better off using a timer instead, as it's less demanding, but I'll leave that for you to investigate.
RangerRik1
Posts: 3
Joined: 26 Oct 2018, 20:57

Re: Win 10 Sticky Notes Always On Top

30 Oct 2018, 19:53

Brilliant! It Works! Although I do need to work on some sort of looping strategy. I'm sure I can research and handle that!

THANKS MUCH -- Truly Appreciated!!!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 400 guests