DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: DONE: launch notepad and make it "always on top" in one click  (Read 23,167 times)

honwahp

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 10
Is there a way to open notepad and make the notepad window "always on top" in one click?

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: DONE: launch notepad and make it "always on top" in one click
« Reply #1 on: April 01, 2012, 01:35 AM »
if you're familiar with Autohotkey, then the following would be able to do what you want.

Code: (autohotkey)
Run, notepad.exe
WinWaitActive, Untitled - Notepad
  If (ErrorLevel <> 0)
    	WinSet, AlwaysOnTop, On 	; set to always-on-top.

honwahp

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 10
Re: DONE: launch notepad and make it "always on top" in one click
« Reply #2 on: April 01, 2012, 01:44 AM »
Thanks for the quick response and I do have autohotkey installed.  However, when I ran the script, the notepad window appeared but it didn't stay on top :(  Of course I may have done something wrong.. (By the way, I am running Chinese Windows XP)
« Last Edit: April 01, 2012, 01:53 AM by honwahp »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
Re: DONE: launch notepad and make it "always on top" in one click
« Reply #3 on: April 01, 2012, 02:27 AM »
It's not "one click" but you can toggle the Topmost attribute of most application windows using Topmost Toggle. Run it. It sits in the task tray. Control Right Click on the Notepad caption bar when it has the focus. (If it's not the active window just left click on it to make it active first.)

You can download here:
http://www.favessoft.com/hotkeys.html

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • Coding Snacks
    • Volunteers/Staff
    • Gathering Badge
    • Participated in NANY Challenge Once
    • Linux User
Re: DONE: launch notepad and make it "always on top" in one click
« Reply #4 on: April 01, 2012, 03:40 AM »
Thanks for the quick response and I do have autohotkey installed.  However, when I ran the script, the notepad window appeared but it didn't stay on top :(  Of course I may have done something wrong.. (By the way, I am running Chinese Windows XP)

i'm not sure what is the title of notepad in chinese winxp but try this.

Code: (autohotkey)
Run, notepad.exe
WinWaitActive, ahk_class Notepad
  If (ErrorLevel != ERROR)
    	WinSet, AlwaysOnTop, On 	; set to always-on-top.

honwahp

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 10
Re: DONE: launch notepad and make it "always on top" in one click
« Reply #5 on: April 01, 2012, 04:51 AM »
lanux128 : Excellent!  It works now.   Many thanks to you.

MilesAhead: Thank you also for your reply.  Your method also works.

Original address: https://www.donationcoder.com/forum/index.php?topic=30489.0