jason404 Posted March 17, 2011 Share Posted March 17, 2011 Is there an Autoit script that can make any window always on top? I particularly want browser windows to sometimes stay on top, for video windows. Thanks. Link to comment Share on other sites More sharing options...
bogQ Posted March 17, 2011 Share Posted March 17, 2011 WinSetOnTop >_> TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
jason404 Posted March 17, 2011 Author Share Posted March 17, 2011 Okay, with your helpful reply I found this page, which has something that is similar to what I want. I changed a couple of things and came up with this:#Include <Constants.au3> #NoTrayIcon Global $Enabled = 0 Opt("TrayMenuMode",1) $radio1 = TrayCreateItem("Enable - Always on Top", -1, -1, 1) TrayCreateItem("") $radio2 = TrayCreateItem("Disable - Always on Top", -1, -1, 1) TrayCreateItem("") $exititem = TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = $radio1 TrayItemSetState($radio2, $TRAY_UNCHECKED) WinSetOnTop("BBC iPlayer - The Killing Episode 15", "", 1) $Enabled = 1 Case $msg = $radio2 TrayItemSetState($radio1, $TRAY_UNCHECKED) WinSetOnTop("BBC iPlayer - The Killing Episode 15", "", 0) $Enabled = 0 Case $msg = $exititem Exit EndSelect WEndI have some way to go before I understand this script, but it works fine.Now, instead of having the window's name (BBC iPlayer - The Killing Episode 15) hardcoded, how could I use wildcards instead?Even better, to make this truly multipurpose, is there a way of getting the window name inserted by clicking on the window after starting the script? Link to comment Share on other sites More sharing options...
bogQ Posted March 17, 2011 Share Posted March 17, 2011 (edited) Opt("WinTitleMatchMode", 1) ;1=start *default, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase To change how will script adress to titles Or WinGetHandle to use it if it change title after original title is displayed handle can b used instead of name WinGetTitle("[active]") to get name of active win Edited March 17, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted March 17, 2011 Share Posted March 17, 2011 This is a slightly modified copy of code that I am using in another script. May I suggest you read up on: _IsPressed() and WinGetTitle().Func GetTitle() Local $dll = DllOpen("user32.dll") While 1 ToolTip("Click on the App now") Sleep(10) If _IsPressed("01", $dll) Then ExitLoop WEnd DllClose($dll) ToolTip("") MsgBox(4096, """, WinGetTitle("[active]")) EndFunc ;==>GetTitle - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
bogQ Posted March 17, 2011 Share Posted March 17, 2011 (edited) @somdcomputerguy """ Edited March 17, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted March 17, 2011 Share Posted March 17, 2011 Take out the extra double quote in the MsgBox line (""", should be "",). - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted March 17, 2011 Share Posted March 17, 2011 (edited) @BogQ: I know, I saw that, (late edit: thanks geshi god!) but didn't want to edit my first post.. Edited March 18, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now