Sign in to follow this  
Followers 0
Toady

In game notification

8 posts in this topic

#1 ·  Posted (edited)

As of now I am using a sound notification when a user toggles my program on and off while playing a game in full screen. The question is, should I use a pop up window in game or use a sound? I still can not figure out how to get a window to overlay a game that is in full screen mode. XFire has this capability, someone I know says to use WinSetTop() to do it but it wont work because the game is already set to TOPMOST. How is XFIRE doing this then??? Is there something Im missing here?

I just need a message to get displayed while playing a game in full screen, like "Toggled Off" to get displayed somewhere.

If this is not possible then what other alternatives do I have besides playing a sound?

Edited by Toady

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites



I think you could use a tool tip.


Share this post


Link to post
Share on other sites

I think you could use a tool tip.

Ive used a tooltip before, you can see it popup but instantly go away. So I made the tooltip get created 75 times a second (game refresh rate) and it worked... One problem with that, its jerry rigged! The tooltip flickers and Im not sure it will work with every game.


www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I dont remember whoes code this was, but I do know it came from the help section, It searches for a color and then sets the color of the gui to either green if it found it or red if it didnt, Im sure you can modify it so it is red when off and green when on.

#include <GUIConstants.au3>

HotKeySet("{ESC}","_Exit")

Dim $i = PixelSearch(700, 700, 700, 700, 0x000080, 10) ;checks that pixel to make sure it is within 10 shades of a dark blue

$GUI = GUICreate("", 5,5,0,0,$WS_POPUP,$WS_EX_TOOLWINDOW)
GUISetBkColor(0x00FF00)

GUISetState()
;right here have it call the game window up then sleep so it can get fully loaded then it will flash every few seconds in the top corner---------------------------------
;winactivate()
;sleep(time it takes game window to fully load)
WinSetOnTop($GUI,"",1)


AdlibEnable("SwitchColor",800)

While 1
    If GUIGetMsg() = -3 Then
        ExitLoop
    EndIf
WEnd

Func SwitchColor()
    If IsArray($i) Then  ;if the pixel is found within 10 shades of blue, change the gui to green, else change to red
        GUISetBkColor(0x00FF00)
    Else
        GUISetBkColor(0xFF0000)
    EndIf
EndFunc

Func _Exit()
    Exit
EndFunc
Edited by Assault

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thank you, I will give it a try when I get the chance. It appears that I have to redraw the popup window at the same refreshrate as the game because when the game updates its frame it will draw over the popup window. Im wondering if something like this will work with the code you supplied.

While 1
    If GUIGetMsg() = -3 Then
        ExitLoop
    EndIf
    _API_RedrawWindow($GUI) ;Repaint to make visible in game..
    Sleep(1000/@DesktopRefresh) ;Redisplay at game framerate
WEnd

... am I right? Or is this bogus?

Edited by Toady

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

@ Toady, did you get this to work?


Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites

I also would like to post something in overlay, all I need to do is regular text.

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