AutoIt Forums: ignoring clicks on gui - AutoIt Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ignoring clicks on gui

#1 User is offline   death pax 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 110
  • Joined: 27-September 05

Posted 27 February 2006 - 07:08 PM

Is there anyway i can make it so that when i click on a gui, it doesnt try to become active?

#2 User is offline   cameronsdad 

  • Mass Spammer!
  • PipPipPipPipPipPipPip
  • Group: Full Members
  • Posts: 2,731
  • Joined: 22-June 05
  • Location:Las Vegas

Posted 27 February 2006 - 07:11 PM

View Postdeath pax, on Feb 27 2006, 10:08 AM, said:

Is there anyway i can make it so that when i click on a gui, it doesnt try to become active?

you could disable it... winsetstate($gui,"",@SW_DISABLE) i think...

#3 User is offline   death pax 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 110
  • Joined: 27-September 05

Posted 27 February 2006 - 07:12 PM

i tried that, but then it didnt show up at all
Edit: er it didnt do anything, the gui still is still becoming active

This post has been edited by death pax: 27 February 2006 - 07:13 PM


#4 User is offline   death pax 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 110
  • Joined: 27-September 05

Posted 27 February 2006 - 07:17 PM

ok heres the deal. i have an overlay that is being displayed over a fullscreen game. however when the game looses focus while in fullscreen, opengl crashes. so to avoid that i want to keep my overlay from getting focus

#5 User is offline   cameronsdad 

  • Mass Spammer!
  • PipPipPipPipPipPipPip
  • Group: Full Members
  • Posts: 2,731
  • Joined: 22-June 05
  • Location:Las Vegas

Posted 27 February 2006 - 07:41 PM

View Postdeath pax, on Feb 27 2006, 10:17 AM, said:

ok heres the deal. i have an overlay that is being displayed over a fullscreen game. however when the game looses focus while in fullscreen, opengl crashes. so to avoid that i want to keep my overlay from getting focus

are you able to run the game in windowed mode?

#6 User is offline   SmOke_N 

  • It's not what you know .... It's what you can prove!
  • Icon
  • Group: Moderators(Mod)
  • Posts: 15,183
  • Joined: 21-February 05
  • Gender:Male
  • Location:UNITED STATES

Posted 27 February 2006 - 07:51 PM

Don't you think it would be more beneficial to at least post your gui source?

Edit:
Here's a stab at it, since there is no source, no game mentioned, no example.
[ code='text' ]    ( Popup )
#include <guiconstants.au3> $main = GUICreate('test', 200, 100) $b = GUICtrlCreateButton('testb', 70, 35, 60, 30, $WS_DISABLED) GUISetState() While 1     $msg = GUIGetMsg()     Select         Case $msg = - 3             ExitLoop         Case $msg = $GUI_EVENT_PRIMARYDOWN             GUICtrlSetState($b, $GUI_DISABLE); just to show that you can actually disable other controls with primary button clicked             ContinueLoop         Case $msg = $b             MsgBox(0, 'oops', ''); should never get this     EndSelect     Sleep(10) WEnd

This post has been edited by SmOke_N: 27 February 2006 - 07:57 PM


#7 User is offline   death pax 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 110
  • Joined: 27-September 05

Posted 27 February 2006 - 09:09 PM

[ code='text' ]    ( ExpandCollapse - Popup )
; ---------------------------------------------------------------------------- ; Crosshair Overlay ; AutoIt Version: 3.1.1 ; Author:        Death Pax <death_pax@msn.com ; ; Script Function: ;   Generates a crosshair overlay ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstants.au3> opt("traymenumode",1) $aboutitem = TrayCreateItem("About") $Exititem   = TrayCreateItem("Exit") $gui = GUICreate("Window",50,50,@DesktopWidth/2-17,@DesktopHeight/2-24,$WS_POPUP,BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) GUISetState(@SW_SHOW) UpdateTextWindow($gui,"ยค",50,50,"Lucida Sans Unicode",1,@DesktopWidth/2-17,@DesktopHeight/2-24,0xFF0000) While 1 $msg = TrayGetMsg()     Select         Case $msg = $aboutitem             Msgbox(64,"About:","Crosshair v1 "&@CRLF&"Created by Death Pax")         Case $msg = $exititem             Exit         EndSelect     winsetstate($gui,"",@SW_DISABLE)             GuiSetCursor(16,1,$gui) Wend Func UpdateTextWindow($hwnd,$zText,$width,$height,$font="Lucida Sans Unicode",$weight=1,$x=-1,$y=-1,$color=-1)     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 $font = "" Then $font = "Microsoft Sans Serif"     If $weight = -1 Then $weight = 1000         If $color <> -1 Then         GUISetBkColor($color,$hwnd)     Else         GUISetBkColor(0xFF0000,$hwnd)     EndIf     Local $hDC= DLLCall("user32.dll","int","GetDC","hwnd",$hwnd)     Local $hMyFont = DLLCall("gdi32.dll","hwnd","CreateFont","int",$height, _                     "int",0,"int",0,"int",0,"int",1000,"int",0, _                     "int",0,"int",0,"int",$ANSI_CHARSET, _                     "int",$OUT_CHARACTER_PRECIS,"int",$CLIP_DEFAULT_PRECIS, _                     "int",$PROOF_QUALITY,"int",$FIXED_PITCH,"str",$font )     Local $hOldFont = DLLCall("gdi32.dll","hwnd","SelectObject","int",$hDC[0], _                     "hwnd",$hMyFont[0])     DLLCall("gdi32.dll","int","BeginPath","int",$hDC[0])     DLLCall("gdi32.dll","int","TextOut","int",$hDC[0],"int",0,"int",0, _                     "str",$zText,"int",StringLen($zText))     DLLCall("gdi32.dll","int","EndPath","int",$hDC[0])     Local $hRgn1 = DLLCall("gdi32.dll","hwnd","PathToRegion","int",$hDC[0])     Local $rc = DLLStructCreate("int;int;int;int")     DLLCall("gdi32.dll","int","GetRgnBox","hwnd",$hRgn1[0], _                     "ptr",DllStructGetPtr($rc))     Local $hRgn2 = DLLCall("gdi32.dll","hwnd","CreateRectRgnIndirect", _                     "ptr",DllStructGetPtr($rc))     DLLCall("gdi32.dll","int","CombineRgn","hwnd",$hRgn2[0],"hwnd",$hRgn2[0], _                     "hwnd",$hRgn1[0],"int",$RGN_XOR)     DLLCall("gdi32.dll","int","DeleteObject","hwnd",$hRgn1[0])     DLLCall("user32.dll","int","ReleaseDC","hwnd",$hwnd,"int",$hDC[0])     DLLCall("user32.dll","int","SetWindowRgn","hwnd",$hwnd,"hwnd",$hRgn2[0],"int",1)     DLLCall("gdi32.dll","int","SelectObject","int",$hDC[0],"hwnd",$hOldFont[0]) EndFunc

This post has been edited by death pax: 27 February 2006 - 09:09 PM


#8 User is offline   death pax 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 110
  • Joined: 27-September 05

Posted 28 February 2006 - 02:23 AM

maybe im what i need is to be able to click *through* the window...
any suggestions?

This post has been edited by death pax: 28 February 2006 - 02:23 AM


#9 User is offline   death pax 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 110
  • Joined: 27-September 05

Posted 01 March 2006 - 12:19 AM

darn... still nothing? maybe i should ask larry... since i created it based off of his text window dll calls

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users