ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Removed Areas > AutoHotkey

Always on top

(1/2) > >>

oblivion:
Just a quick question -- I hope!

I want to make a GUI button that I can float over another application, but I can't work out if I can create a GUI with an always-on-top type of attribute.

If I can't, can anyone suggest something I could bolt on that would have a similar effect?

skwire:
Just add the following to your AHK code (assuming it's the first GUI):


--- Code: Autohotkey ---Gui, +AlwaysOnTop

Ath:
Or grab a copy of WinButtons, that even has a nice configuration editor WinButtonEdit, and can easily be configured to be Always On Top :D

oblivion:
Just add the following to your AHK code (assuming it's the first GUI):


--- Code: Autohotkey ---Gui, +AlwaysOnTop-skwire (October 04, 2011, 01:59 PM)
--- End quote ---

Thanks! (I was sure I'd checked all the possibilities for Gui in the help -- I must be getting old.)  :-[

oblivion:
Or grab a copy of WinButtons, that even has a nice configuration editor WinButtonEdit, and can easily be configured to be Always On Top :D
-Ath (October 04, 2011, 02:13 PM)
--- End quote ---
I looked quite hard at it. I think if I was starting from the point of wanting a button-based launcher-type thing, I'd have used it. But as it was, I was trying to add functionality to something I'd already written, and after making my own head spin for a while, decided against.

For what it's worth, I'd set up a couple of context-sensitive hotkeys but wanted to replicate the functionality of one of them with something a bit more visible. I created a timer loop that checks to see if two specific applications are running and, if the one of them relevant to the hotkey has focus, puts a small (64x64) button onscreen, with alwaysontop set and the notaskbar attribute too so it's not too obtrusive, and if either of the applications closes, the button's destroyed again.

It works well except for the slight timelag caused by the fact that I've put a 2 second delay on it so as not to take too much cpu when there's little happening. That bit I haven't really experimented with much, to be honest, but as long as it doesn't do anything nasty like leak memory, I'm quite happy with the way it works.

Thanks for both your help, anyway: gave me the focus on the thinking I needed to get what I wanted to happen!  :Thmbsup:

Navigation

[0] Message Index

[#] Next page

Go to full version