Sign in to follow this  
Followers 0
Sardith

WinSetOnTop

11 posts in this topic

Other then WinSetOnTop, which is not working in my case. Is there any other method to make something "Ontop"?

$Main = GUICreate("", 105, 30, 100, 15)
$Game = "Day of Defeat"
$handle = WinGetHandle($Game, "")


WinSetOnTop($handle, '', 0)
WinSetOnTop($Main, '', 1)

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites



Have you tried WinMove? Maybe that will help you.

Other then WinSetOnTop, which is not working in my case. Is there any other method to make something "Ontop"?

$Main = GUICreate("", 105, 30, 100, 15)
$Game = "Day of Defeat"
$handle = WinGetHandle($Game, "")
WinSetOnTop($handle, '', 0)
WinSetOnTop($Main, '', 1)

Share this post


Link to post
Share on other sites

Have you tried WinMove? Maybe that will help you.

change the form code to:

$Main = GUICreate("", 105, 30, 100, 15,-1,$WS_EX_TOPMOST)


If you repeat it <script> it

Share this post


Link to post
Share on other sites

WinSetOnTop doesn't work with window handles, but with the title, text, or both.

WinSetOnTop ( "title", "text", flag )

Read the help file.

-mu

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

WinSetOnTop doesn't work with window handles, but with the title, text, or both.

WinSetOnTop ( "title", "text", flag )

Read the help file.

-mu

Care to point out where that's listed in the help file? It' doesn't say that in the help file, that handles can't be used.

Quote:
WinSetOnTop 
Change a window's "Always On Top" attribute.
WinSetOnTop ( "title", "text", flag )

Parameters

title The title of the window to affect. 
text The text of the window to affect. 
flag Determines whether the window should have the "TOPMOST" flag set.
1=set on top flag, 0 = remove on top flag 

Return Value

None.

Remarks

Third-party programs which add an "Always On Top" context menu entry might not update their menu entry to reflect the AutoIt-induced change in TOPMOST status.

$WS_EX_TOPMOST didn't help the problem, thanks though.

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

If anyone has any other suggestions that would be great, I've searched but really haven't come up with anything to note.

You can run Counter-Strike Source Windowed, which then the clock displays correctly, but id rather not go that route. Is there a possible way to inject the clock into the game memory?


[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

Is it possible to use overlays in autoit, if so would that be a fix?


[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

Where does it state that handles CAN be used?

Where would you even get such an idea?

The manual clearly states that you must supply title or text, so just use either title or text and it will work, as per my example, above, which also works, and I will repeat here...

GUICreate("foo the bar", 200, 200)
WinSetOnTop ("foo", "", 1)
GuiSetState()

TADA!

End of pissing about!

If you need help with that, say the word, but enough with the handles, or saying that the function doesn't work; it does, and superbly.

-mu

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Where does it state that handles CAN be used?

Where would you even get such an idea?

The manual clearly states that you must supply title or text, so just use either title or text and it will work, as per my example, above, which also works, and I will repeat here...

GUICreate("foo the bar", 200, 200)
WinSetOnTop ("foo", "", 1)
GuiSetState()

TADA!

End of pissing about!

If you need help with that, say the word, but enough with the handles, or saying that the function doesn't work; it does, and superbly.

-mu

And where does it state that it can't? It dosen't, you don't have a vaild point. I understand you can't use handles, that was changed after your first post. Point is, it still doesn't work. I need a Alternative method to WinSetOnTop. Counter-Strike Source only allows things to be in a "ontop" state while it's in a Windowed mode. Secondly when you set the state of Counter-Strike Source to "0" WinSetOnTop($Game, 0) the game act's flaky, it doesn't allow you to click menu items, let alone the Clock still doesn't display. I've also tryed transparent%, that also causes the Counter-Strike Source Client to run Flaky, not being able to use menu items.. Etc.

So if some has a -Vaild- idea on how possibly to get the clock "Ontop" or on the same layer.. (Which I think it's a Direct3D thing) Please let me know.

Edited by Sardith

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

Dude! The convention with manuals, indeed the whole English language is that what it says, is. It's not poetry, it's a technical manual, so you take it at face value, you don't read into it.

Some commands state that you use a handle, some don't. It's not up to us to assume that we can or can't use a handle, simply follow the manual, which is perfectly clear on the point; title or text.

As to your partuicular situation, it's very difficult to say what the trouble might be, without seeing the actual code. I have no experience of working with DirectX layers, but if you post your code, more experienced AutoIt coders might have a solution.

-mu

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