Sign in to follow this  
Followers 0
randall

Always on top on/off

16 posts in this topic

#1 ·  Posted (edited)

I just wanted to say how useful i found it to write two one liners

;ontop.exe
WinSetOnTop("", "", 1)oÝ÷ Ù©Ýjëh×6;offtop.exe
WinSetOnTop("", "", 0)

The first "script" sets the active window always on top

the second resets the flag to not always on top

This is very useful if you make a windows keyboard shortcut to each, then when you are trying to have a window staying on top of the other while doing stuff with the other you can just press the shortcut and it stays on top. This can make lots of things less fiddly (e.g. read the forum and try to code), and really i don't know why it's not already built into the windows shell

Enjoy

:D

Edit: Some trolling folows, but before reading bear in mind that:

1. WinSetOnTop("", "", 1) is not in the help file, WinSetOnTop($title, "", 1) is in the help file and is not as flexible, and figuring it out is not much easier than figuring out how to _Shutdown

2.Doing the same thing in ten lines that you can do in two without improving performance and/or readability is called worse programming

3.Having a program running all the time in you computer to do something that you can do just as easily without having it running all the time is called wastefulness

4.This functionality is something you can use every day and is not something that gets boring like a game because it is useful.

Edited by randall

Share this post


Link to post
Share on other sites



um thanks for reading the help file?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

:-D !!! *omgrofllollmao*

why even bothering to make two seperate programs? lol...

why not just:

HotKeySet("#t","_ontop")
HotKeySet("#o","_offtop")

while 1
sleep(50)
wend

func _ontop()
WinSetOnTop("", "", 1)
endfunc

func _offtop()
WinSetOnTop("", "", 0)
endfunc

... and please never spam the forum with helpfile-stuff again... :D

Edited by rakudave

Share this post


Link to post
Share on other sites

that was pretty fucking rude.

Share this post


Link to post
Share on other sites

that was pretty fucking rude.

no it was the truth

Share this post


Link to post
Share on other sites
:D no it was your guys opinion.

Share this post


Link to post
Share on other sites

There is no opinion in the statement, "Thanks for reading the helpfile. Please dont post helpfile scripts/scraps."


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

There is no opinion in the statement, "Thanks for reading the helpfile. Please dont post helpfile scripts/scraps."

I was refering to the other posters..

Share this post


Link to post
Share on other sites

I was refering to the other posters..

Here are the posts before yours:

thatsgreat234: um thanks for reading the help file?

AutoItKing: We found a newbie that actually reads the help file! Congrats!

rakudave: :-D !!! *omgrofllollmao* why even bothering to make two seperate programs? lol...

thatsgreat234: no it was the truth

Which other posters are you referring to?


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

HotKeySet("!{F3}", "_ToggleOnTop")
Global $i
while 1
    Sleep(100)
WEnd
Func _ToggleOnTop()
    $title = WinGetTitle("")
    $i += 1
    Sleep(1000)
    Select
        Case $i = 1
            WinSetOnTop($title,"",1)
        Case $i = 2
            WinSetOnTop($title,"",0)
    EndSelect
    $i = 0
EndFunc

This was something I made after someone posted a topic about using a hotkey for two functions.

Press Alt+F3 once to set on top, Alt+F3 quickly 2 times to unset on top.

#)

Share this post


Link to post
Share on other sites

This was something I made after someone posted a topic about using a hotkey for two functions.

Press Alt+F3 once to set on top, Alt+F3 quickly 2 times to unset on top.

#)

nfwu,

I have been setting flags in order to use the same hotkey to toggle a function.

Thanks for posting that snippet of code. I like it.

That makes me think: Is there a repository for 'AutoIt Code Snippets', similar to the help file? I did a quick search but nothing really jumped out at me, so I thought I would ask while I was posting this.

It would be cool to have a bunch of very short programs that demonstrated a particular feature or technique. Something that you could just run like it is to see if that's what you could use. If it were, then you could dig a little deeper into its use.

If this is off-topic, it is just my attempt to turn a negative thread into something positive. :D

taurus905


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Share this post


Link to post
Share on other sites

nfwu,

As always, you are very helpful. Autoit Wrappers look like a good place to start building my own snippet library in the Snippet Holder included in SciTE.

Do you know if there is a place to get any snippet libraries that have been put together by other users.

Thanks,

taurus905


"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Share this post


Link to post
Share on other sites

I do know that AutoItKing is attempting to build an AutoIt Scripts database.

http://www.autoitscript.com/forum/index.php?showtopic=28104

Though they may not really be snippets...

#)

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

The fact that I am a newbie to a forum doesn't necessarily mean that I am younger, more stupid or a worse programmer than you.

Edited by randall

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0