Jump to content



Photo

Overlay GUI


  • Please log in to reply
16 replies to this topic

#1 kritya

kritya

    Seeker

  • Active Members
  • 10 posts

Posted 20 April 2012 - 05:30 AM

Hi,

I was trying to make an overlay GUI which could be displayed above all the open windows(including games , etc)

I tried to do something with Koda and made something(code is below) it works for all windows except full screen games.

Is the some style or ex-style I have missed or added an extra one ?
If there is any other way of making an overlay that too would of course work ;)


#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 440, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_TABSTOP,$DS_MODALFRAME), BitOR($WS_EX_OVERLAPPEDWINDOW,$WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_WINDOWEDGE,$WS_EX_LAYERED)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit     EndSwitch WEnd


Thanks





#2 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 20 April 2012 - 02:45 PM

This works for me:

GUISetStyle(BitOr($WS_POPUP + $WS_VISIBLE), 0x08000000)

Edited by rcmaehl, 20 April 2012 - 02:57 PM.

Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#3 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,865 posts

Posted 20 April 2012 - 02:49 PM

This works for me:

GUISetStyle(0x90000000, 0x08000000)

You should be using the style variables in that example so that the OP knows what you're doing with the styles, rather than making everyone look up what those numbers translate to.

How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#4 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 20 April 2012 - 02:52 PM

You should be using the style variables in that example so that the OP knows what you're doing with the styles, rather than making everyone look up what those numbers translate to.


The extended style has no variable. The Regular style is $WS_POPUP + $WS_VISIBLE
Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#5 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,865 posts

Posted 20 April 2012 - 03:09 PM

I see that now, about the extended style, there is a MSDN variable for it (WS_EX_NOACTIVATE), but it's not included in the GUIConstantsEx.au3 or WindowsConstants.au3 files.

How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#6 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 20 April 2012 - 03:18 PM

I see that now, about the extended style, there is a MSDN variable for it (WS_EX_NOACTIVATE), but it's not included in the GUIConstantsEx.au3 or WindowsConstants.au3 files.


I have reported it as a help file issue here
Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#7 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,865 posts

Posted 20 April 2012 - 04:11 PM

Should be put into Trak, because it's not a help file issue, it's a content issue for the xConstants files.

How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#8 kritya

kritya

    Seeker

  • Active Members
  • 10 posts

Posted 20 April 2012 - 05:21 PM

Thanks for the replies

But using

BitOr($WS_POPUP + $WS_VISIBLE), 0x08000000)


Gives me an error.

J:urt connectorte.au3(5,42) : ERROR: BitOR() [built-in] called with wrong number of args.
GUISetStyle(BitOr($WS_POPUP + $WS_VISIBLE)


Edited by kritya, 20 April 2012 - 05:21 PM.


#9 BrewManNH

BrewManNH

    באָבקעס מיט קודוצ׳ה

  • MVPs
  • 6,865 posts

Posted 20 April 2012 - 05:25 PM

GUISetStyle(BitOr($WS_POPUP, $WS_VISIBLE)


How to ask questions the smart way!

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.

Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.

_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.

GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.

Posted Image


#10 kritya

kritya

    Seeker

  • Active Members
  • 10 posts

Posted 21 April 2012 - 05:57 AM

Ok. But it still doesnt works on full screen games.

and I know some softwares like Teamspeak 3 and Mumble who have overlay which do work.

Edited by kritya, 21 April 2012 - 05:58 AM.


#11 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 23 April 2012 - 12:10 PM

Ok. But it still doesnt works on full screen games.

and I know some softwares like Teamspeak 3 and Mumble who have overlay which do work.


As far as I know, those examples display in the Framebuffer or Viewpoint. This means they do not use their own Window but instead display in the game window itself.

Secondly, why do you want to have a window on top of full screen games?
Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#12 kritya

kritya

    Seeker

  • Active Members
  • 10 posts

Posted 25 April 2012 - 07:48 AM

Well things like in-game chat or some kind of notifications , etc

#13 johnmcloud

johnmcloud

    Not an AutoIt MVPs (MVP)

  • Active Members
  • PipPipPipPipPipPip
  • 612 posts

Posted 24 July 2012 - 06:44 AM

Just for curiosity, it's possible or not with Autoit?
Can be useful to have a always-on-top GUI whatever full-screen game/apps/things on the screen, example like a clock

I see software like XFire , TeamViewer or Mumble ( http://mumble.sourceforge.net/ ) can do this, so maybe is possible also with autoit, i dunno :D

Edited by johnmcloud, 24 July 2012 - 07:15 AM.


#14 johnmcloud

johnmcloud

    Not an AutoIt MVPs (MVP)

  • Active Members
  • PipPipPipPipPipPip
  • 612 posts

Posted 25 July 2012 - 08:54 AM

Maybe i have find a solution, from the AutoHotkey forum:

Someone what to try to make this with autoit? I don't understand a word of AutoHotKey :D
Thanks

Edited by johnmcloud, 27 July 2012 - 05:28 AM.


#15 holly

holly

    Seeker

  • New Members
  • 3 posts

Posted 25 July 2012 - 10:15 AM

oh please man do it!
I'm searching for a timer over a games for a loooot of time, but is impossible to find :( and time goes fast when you playing.
So johnmcloud if you can make it you will be mbff :D

#16 johnmcloud

johnmcloud

    Not an AutoIt MVPs (MVP)

  • Active Members
  • PipPipPipPipPipPip
  • 612 posts

Posted 25 July 2012 - 12:29 PM

mbff? What? :D
Anyway i have some problem to make this:

1) I don't understand the AutoHotKey syntax
2) How to parent an autoit GUI ( child ) into an external application ( parent ), i think with DllCall but i don't know where to set
3) The question of +WS_CHILD -WS_POPUP isn't clear for me, you need to put after/before?

If someone help me to make an autoit version, you can do everything you want, a timer, a browser, a chat etc... and i can help you, but without an help i can't do more.
We need only to wait...

Edited by johnmcloud, 25 July 2012 - 01:15 PM.


#17 holly

holly

    Seeker

  • New Members
  • 3 posts

Posted 25 July 2012 - 01:54 PM

Ok, maybe is better open a new thread, hope someone help me :D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users