butji Posted December 21, 2007 Share Posted December 21, 2007 Hi. im having a little trouble i want to display something inside a fullscreen game how do i do that. if you need me to specify please tell. -butji Link to comment Share on other sites More sharing options...
MrCreatoR Posted December 21, 2007 Share Posted December 21, 2007 if you need me to specify please tell.You always should specify, otherwise you will not get help quickly (because we start to ask questions).Question: What you mean by "i want to display something inside a fullscreen game"? Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
butji Posted December 21, 2007 Author Share Posted December 21, 2007 i just didnt know if i was making myself clear, and if i werent then i would specify what i mean is i have a fullscreen game, lets say counterstrike, and in the upper left corner i want to show the time with a program. Link to comment Share on other sites More sharing options...
butji Posted December 22, 2007 Author Share Posted December 22, 2007 anyone? Link to comment Share on other sites More sharing options...
John117 Posted December 22, 2007 Share Posted December 22, 2007 as I doubt you really want to show the time I am not going to waste my time writing it. Demo below of just the GUI. -use esc to toggle #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) HotKeySet("{ESC}", "_Toggle") ;GUICreate ( "title" [, width [, height [, left [, top [, style [, exStyle [, parent]]]]]]] ) $GUI = GUICreate("", 50, 50, @DesktopWidth-50, 0, $WS_POPUPWINDOW, $WS_EX_TOPMOST) $Show = True ; ============================================================================ ; Main Loop ; ============================================================================ While 1 Sleep(10) WEnd ; ============================================================================ ; Functions ; ============================================================================ Func _Toggle() If $Show = True Then Global $Show = False GUISetState(@SW_SHOW, $GUI) Else Global $Show = True GUISetState(@SW_Hide, $GUI) EndIf EndFunc ;==>_Toggle Link to comment Share on other sites More sharing options...
butji Posted December 22, 2007 Author Share Posted December 22, 2007 nope that didnt work :/ but thanks anyways Link to comment Share on other sites More sharing options...
John117 Posted December 22, 2007 Share Posted December 22, 2007 (edited) sorry to hear that, it tops everything for me. Does your game use esc for anything? try this as a test #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) sleep(120000) $GUI = GUICreate("", 50, 50, @DesktopWidth-50, 0, $WS_POPUPWINDOW, $WS_EX_TOPMOST) GUISetState(@SW_SHOW, $GUI) ; ============================================================================ ; Main Loop ; ============================================================================ While 1 Sleep(10) WEnd run the script and then launch your game and have it fully loaded before two minutes of script launch . . .this is just a test to see if it tops it. Edited December 22, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
butji Posted December 22, 2007 Author Share Posted December 22, 2007 it doesnt top it :/ Link to comment Share on other sites More sharing options...
i542 Posted December 22, 2007 Share Posted December 22, 2007 Maximize? I can do signature me. Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 22, 2007 Share Posted December 22, 2007 Hi, what game do you mean. It is not always possible to show up things while playing the game course the game has got the resources. You can try this: expandcollapse popupOpt("OnExitFunc", "endscript") #include <GUIConstants.au3> $hwnd = GUICreate("Text Region", @DesktopWidth, @DesktopHeight, @DesktopWidth / 2 - 250, @DesktopHeight / 2 - 150, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) GUISetBkColor(0x00FF00) Send("#m") GUISetState() ControlHide("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]") While 1 $rgn = CreateTextRgn($hwnd, 3000, 250, "Arial", 1000) SetWindowRgn($hwnd, $rgn) Sleep(500) WEnd Func endscript() ControlShow("Program Manager", "", "[CLASSNN:SHELLDLL_DefView1]") EndFunc ;==>endscript Func SetWindowRgn($h_win, $rgn) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $rgn, "int", 1) EndFunc ;==>SetWindowRgn Func CreateTextRgn(ByRef $CTR_hwnd, $CTR_Text, $CTR_height, $CTR_font = "Microsoft Sans Serif", $CTR_weight = 1000) Local Const $ANSI_CHARSET = 0 Local Const $OUT_CHARACTER_PRECIS = 2 Local Const $CLIP_DEFAULT_PRECIS = 0 Local Const $PROOF_QUALITY = 2 Local Const $FIXED_PITCH = 1 Local Const $RGN_XOR = 3 If $CTR_font = "" Then $CTR_font = "Microsoft Sans Serif" If $CTR_weight = -1 Then $CTR_weight = 1000 Local $gdi_dll = DllOpen("gdi32.dll") Local $CTR_hDC = DllCall("user32.dll", "int", "GetDC", "hwnd", $CTR_hwnd) Local $CTR_hMyFont = DllCall($gdi_dll, "hwnd", "CreateFont", "int", $CTR_height, "int", 0, "int", 0, "int", 0, _ "int", $CTR_weight, "int", 0, "int", 0, "int", 0, "int", $ANSI_CHARSET, "int", $OUT_CHARACTER_PRECIS, _ "int", $CLIP_DEFAULT_PRECIS, "int", $PROOF_QUALITY, "int", $FIXED_PITCH, "str", $CTR_font) Local $CTR_hOldFont = DllCall($gdi_dll, "hwnd", "SelectObject", "int", $CTR_hDC[0], "hwnd", $CTR_hMyFont[0]) DllCall($gdi_dll, "int", "BeginPath", "int", $CTR_hDC[0]) DllCall($gdi_dll, "int", "TextOut", "int", $CTR_hDC[0], "int", 0, "int", 0, "str", $CTR_Text, "int", StringLen($CTR_Text)) DllCall($gdi_dll, "int", "EndPath", "int", $CTR_hDC[0]) Local $CTR_hRgn1 = DllCall($gdi_dll, "hwnd", "PathToRegion", "int", $CTR_hDC[0]) Local $CTR_rc = DllStructCreate("int;int;int;int") DllCall($gdi_dll, "int", "GetRgnBox", "hwnd", $CTR_hRgn1[0], "ptr", DllStructGetPtr($CTR_rc)) Local $CTR_hRgn2 = DllCall($gdi_dll, "hwnd", "CreateRectRgnIndirect", "ptr", DllStructGetPtr($CTR_rc)) DllCall($gdi_dll, "int", "CombineRgn", "hwnd", $CTR_hRgn2[0], "hwnd", $CTR_hRgn2[0], "hwnd", $CTR_hRgn1[0], "int", $RGN_XOR) DllCall($gdi_dll, "int", "DeleteObject", "hwnd", $CTR_hRgn1[0]) DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $CTR_hwnd, "int", $CTR_hDC[0]) DllCall($gdi_dll, "int", "SelectObject", "int", $CTR_hDC[0], "hwnd", $CTR_hOldFont[0]) DllClose($gdi_dll) Return $CTR_hRgn2[0] EndFunc ;==>CreateTextRgn So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
au3scr Posted December 22, 2007 Share Posted December 22, 2007 on me it minimizes game window and then creates its window Link to comment Share on other sites More sharing options...
butji Posted December 23, 2007 Author Share Posted December 23, 2007 it just doesnt show in game :/ 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