Jump to content

guiltyking

Active Members
  • Posts

    29
  • Joined

  • Last visited

Profile Information

  • Location
    ISTANBUL
  • Interests
    DEVELOPING

Recent Profile Visitors

392 profile views

guiltyking's Achievements

Seeker

Seeker (1/7)

2

Reputation

  1. Obviously, But! it helps seekers who search net at task base as i found that post like this way. my solution is task related. lets see how many likes it.
  2. ehm, noob to noob since no reply. #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <GUIConstants.au3> #include <WinAPIGdi.au3> ;#include <Array.au3> ;AutoItSetOption("GUIOnEventMode", 1) Opt("GUIOnEventMode", 1) Global $iFontSize = 76 ,$iW = $iFontSize-4, $nBorder=Mod($iFontSize, 14), $iH = $iFontSize+($nBorder*3) ; Global $_afontData =StringSplit('QWERTYUIOPASDFGHJKL/ZXCVBNM.,`', "") Global $nKeys=ubound($_afontData) Global $_aGDIdraw[$nKeys][3] ;_ArrayDisplay($_afontData, '_WinAPI_EnumFontFamilies') ;_ArrayDisplay($_aGDIdraw, '_WinAPI_EnumFontFamilies') ;msgbox(0,0,$nKeys) Global $sTTFont="Bauhaus 93" ;$sTTFont="Swiss921 BT" ;$sTTFont="Futura XBlkCnIt BT" ;$sTTFont="Balloon" ;$sTTFont="Stencil" ;$sTTFont="Showcard Gothic" ;$sTTFont="Ravie" ;$sTTFont="Cooper Black" ;$sTTFont="Bauhaus 93" ;$sTTFont="Algerian" ;$sTTFont="Mistral" ;$sTTFont="Haettenschweiler" ; Main() Func Main() Example() My_AP_MouseOnMove() While Sleep(10) WEnd EndFunc ;==> Func Example() ; Global $hGUI = GUICreate("GDI+", $iW*10, $iH*4,200,150, _ $WS_POPUP, BitOR($WS_EX_LAYERED,$WS_EX_NOACTIVATE,$WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "My_AP_MouseOnMove") GUISetCursor(0) Global $hButton_ok = GUICtrlCreateButton("select",0,0,60) Global $hButton_Exit = GUICtrlCreateButton("_Exit",100,0,60) Global $_cfont = GUICtrlCreateLabel("carry that", 200, 0, 90, 20,-1, $GUI_WS_EX_PARENTDRAG) GUISetState(@SW_SHOW) GUISetBkColor(0xFFFFFF, $hGUI) _WinAPI_SetLayeredWindowAttributes($hGUI, 0xFFFFFF, 95) GUICtrlSetOnEvent($hButton_ok, "_select") GUICtrlSetOnEvent($hButton_Exit, "_Exit") ; Initialize GDI+ library _GDIPlus_Startup() Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global $hBmp_Buffer = _GDIPlus_BitmapCreateFromGraphics($iW*10, $iH*3, $hGraphics) Global $hGfx_Bufffer = _GDIPlus_ImageGetGraphicsContext($hBmp_Buffer) _GDIPlus_GraphicsSetSmoothingMode($hGfx_Bufffer, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ; Global $hBrush_NA = _GDIPlus_BrushCreateSolid(0xFF000066) Global $hBrush_A = _GDIPlus_BrushCreateSolid(0xFF00FF00) Global $hPen_NA = _GDIPlus_PenCreate(0xFF666600, 1) Global $hPen_A = _GDIPlus_PenCreate(0xFF00FF00, $nBorder) Global $hFormat = _GDIPlus_StringFormatCreate() _GDIPlus_StringFormatSetAlign($hFormat, 1);left Global $hFamily = _GDIPlus_FontFamilyCreate($sTTFont) ; local $row=0,$col=.3 for $i=1 to $nKeys-1 $_aGDIdraw[$i][1]= _GDIPlus_PathCreate() $_aGDIdraw[$i][2]= _GDIPlus_RectFCreate($iW*$row, $iH*$col, $iW, $iH);sleep(10) _GDIPlus_PathAddString($_aGDIdraw[$i][1], $_afontData[$i], $_aGDIdraw[$i][2], $hFamily, 0, $iFontSize, $hFormat) $row+=.9 If Not Mod($i, 10) Then $row=0 $col+=.7 Endif next EndFunc ;==> Func My_AP_MouseOnMove() Local $sInfo = "" Global $aMouse = GUIGetCursorInfo() _GDIPlus_GraphicsClear($hGfx_Bufffer, 0x00003000) for $i=1 to $nKeys-1 _GDIPlus_GraphicsFillPath($hGfx_Bufffer, $_aGDIdraw[$i][1], $hBrush_NA) GUICtrlSetCursor(-1, 7) _GDIPlus_GraphicsDrawPath($hGfx_Bufffer, $_aGDIdraw[$i][1], $hPen_NA) GUICtrlSetCursor(-1, 4) If _GDIPlus_PathIsOutlineVisiblePoint($_aGDIdraw[$i][1], $aMouse[0], $aMouse[1], $hPen_A, $hGfx_Bufffer) then _GDIPlus_GraphicsDrawPath($hGfx_Bufffer, $_aGDIdraw[$i][1], $hPen_A) $sInfo = "Cap; "&$_afontData[$i] Endif If _GDIPlus_PathIsVisiblePoint($_aGDIdraw[$i][1], $aMouse[0], $aMouse[1], $hGraphics) then _GDIPlus_GraphicsFillPath($hGfx_Bufffer, $_aGDIdraw[$i][1], $hBrush_A) $sInfo = StringLower($_afontData[$i]) Endif next ToolTip($sInfo) _GDIPlus_GraphicsDrawImage($hGraphics, $hBmp_Buffer, 0, 0) EndFunc ;==>My_AP_MouseOnMove Func _select() _Dispose() sleep(200) $sTTFont="Bauhaus 93" $iFontSize = 46 $nBorder=Mod($iFontSize, 14) $iW = $iFontSize-4 $iH = $iFontSize+($nBorder*3) tooltip($nBorder&" - "&$iH) Example() EndFunc ;==> Func _Dispose() _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) for $i=1 to $nKeys-1 _GDIPlus_PathDispose($_aGDIdraw[$i][1]) next _GDIPlus_BrushDispose($hBrush_NA) _GDIPlus_BrushDispose($hBrush_A) _GDIPlus_PenDispose($hPen_NA) _GDIPlus_PenDispose($hPen_A) _GDIPlus_GraphicsDispose($hGfx_Bufffer) _GDIPlus_BitmapDispose($hBmp_Buffer) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() GUIDelete($hGUI) EndFunc ;==> Func _Exit() _Dispose() Exit EndFunc ;==>_Exit
  3. i have conclude All those GUI EVENTS needs activation. Goal is Activate GUI when mouse hovers. i guess obligated to use mouse coordinate messages. GUI events wont help. I use that only determine new position of GUI.
  4. I Have misTell that when trying to reply on my post. Sry that was not able to erase it. no direct relation to this, i know. how could i?
  5. I have a long script to determine mouse on borderless exlayered GUI, when it loses focus on window. any way to do this with $GUI_EVENT? #include <GuiConstantsEx.au3> #include <GUIConstants.au3> ;- Opt("GUIOnEventMode", 1) ; Global $_cGUI_Visible, $_nTimer,$nMX,$nMY,$_cDrag,$_cGUI_Collapsed=false Global $nGuiXLeft=400,$nGuiYTop=100,$nGui_Width=400,$nGui_Height=200,$RET=false Global $ParentWin_mn=20,$_nBkColor_Shield=0x000001, $_nBkColor_RayBan=0xfff000 ; #REGION hGUI_OSKMenu Global $hGUI_OSKMenu = GUICreate("",$nGui_Width,$nGui_Height,$nGuiXLeft,$nGuiYTop, _ $WS_POPUP,BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST));<===== since EX_LAYERED GUISetBkColor($_nBkColor_RayBan, $hGUI_OSKMenu) ;==>Set GUI Colour ;GUICtrlSetOnEvent($GUI_EVENT_CLOSE, "_EXIT") does not work here Global $_LGUI_OSK_logo= GUICtrlCreateLabel("AUTOIT ROCKS", 10, 0, 180, 20, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetOnEvent($_LGUI_OSK_logo, "_HGUI_POSITION") Global $_LGUI_OSK_Drag= GUICtrlCreateLabel("This is text on" & @CRLF & _ "a transparent Layered", 10, 0, 180, 40, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetOnEvent($_LGUI_OSK_Drag, "_HGUI_POSITION") Global $idButton = GUICtrlCreateButton("Click Me!", 150, 135, 100, 30) GUICtrlSetOnEvent($idButton, "_BUTTON") GUISetState() #ENDREGION #REGION MAIN ;GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "OnEvents_Gui_OSKMenu") ;<<<<<<< nope IT BELONGS GUI drag. GUISetOnEvent($GUI_EVENT_CLOSE, "_exit") ; Call a common GUI close function ;==> AdlibRegister ( '_CheckMouseOver' ) ;==> _ShowStuff() ;==> While 1 WEnd ; Func _exit() Exit EndFunc ; Func _BUTTON() MsgBox(64, "Button", "You clicked the button!", 3) EndFunc ; #ENDREGION #REGION _CheckMouseOver Func _HGUI_POSITION() ;==>guipos if moved Local $aGuiPos = WinGetPos($hGUI_OSKMenu) $nGuiXLeft=$aGuiPos[0] $nGuiYTop=$aGuiPos[1] $nGui_Width=$aGuiPos[2] $nGui_Height=$aGuiPos[3] EndFunc ; Func _CheckMouseOver() ;==>_CheckMouseOver=active??=mouse<>gui IF RETURN Local $aMousePos = MouseGetPos() $nMX=$aMousePos[0] $nMY=$aMousePos[1] If ($nMX > $nGuiXLeft) And ($nMX < ($nGuiXLeft + $nGui_Width)) And _ ($nMY > $nGuiYTop) And ($nMY < ($nGuiYTop + $nGui_Height)) Then ;mouse over If $RET Then Return $RET ;stop recurse IF $_cGUI_Collapsed And ($nMY > ($nGuiYTop + $ParentWin_mn)) Then RETURN msgbox(0,0,"MOUSE in <"&$nMX-$nGuiXLeft&"_"&$nMY-$nGuiYTop&">IN<"&$nGuiXLeft&"_"&$nGuiYTop&")("&$nGui_Width&"_"&$nGui_Height,1) WinActivate($hGUI_OSKMenu) sleep(100) _ShowStuff() $RET = True Else If Not $RET Then Return $RET ;stop recurse msgbox(0,0,"MOUSE out<",.5) _HideStuff() $RET = False EndIf Return $RET EndFunc ; Func _ShowStuff() ;==>_ShowStuff $_cGUI_Visible = True $_nTimer = 0 GUICtrlSetState($idButton, $GUI_SHOW) GUICtrlSetState($idButton, $GUI_ENABLE) GUICtrlSetState($_LGUI_OSK_Drag, $GUI_SHOW) GUICtrlSetState($_LGUI_OSK_Drag, $GUI_ENABLE) WinSetTrans($hGUI_OSKMenu, "", 255) GUISetBkColor($_nBkColor_RayBan, $hGUI_OSKMenu) ;==>Set GUI Colour _Expand() EndFunc Func _Expand() Local $win_pos = WinGetPos($hGUI_OSKMenu) If $win_pos[3] = $ParentWin_mn Then For $i = $ParentWin_mn To $nGui_Height Step 5 WinMove($hGUI_OSKMenu, "", $win_pos[0], $win_pos[1], $win_pos[2], $i) Next EndIf $_cGUI_Collapsed=true EndFunc ; Func _HideStuff() ;==>_HideStuff IF NOT $RET THEN RETURN $_cGUI_Visible = False $_nTimer = 0 GUICtrlSetState($idButton, $GUI_DISABLE) GUICtrlSetState($idButton, $GUI_HIDE) WinSetTrans($hGUI_OSKMenu, "", 150) My_Collapse() GUICtrlSetState($_LGUI_OSK_Drag, $GUI_DISABLE) GUICtrlSetState($_LGUI_OSK_Drag, $GUI_HIDE) ; GUICtrlSetState($_LGUI_OSK_logo, $GUI_SHOW) GUICtrlSetState($_LGUI_OSK_logo, $GUI_ENABLE) ;ControlMove($hGUI_OSKMenu, "", $_LGUI_OSK_logo, 0, 0) EndFunc Func My_Collapse() Local $win_pos = WinGetPos($hGUI_OSKMenu) If $win_pos[3] > $ParentWin_mn Then For $i = $nGui_Height To $ParentWin_mn Step - 5 WinMove($hGUI_OSKMenu, "", $win_pos[0], $win_pos[1], $win_pos[2], $i) ;WinMove ( "title", "text", x, y [, width [, height[, speed]]] ) Next EndIF $_cGUI_Collapsed=true EndFunc ; #ENDREGION
  6. it does not work at ex_transparency
  7. tks, needs develop. i know. still learning. it has more functions seekers can expect. all aimed. try to move mouse at defined locations.
  8. DeskTop Utilities part 1 - R@yBAN Screen SHELTER ver.16.05.12 click intro for help. RayBAN_noPass.au3 Screen SHELTER on mouse hook with no password. care for eyes. "To change the COLORS and PassWord select 'SetUp' from the Tray menu "To Reload saved COLORS and PassWord select 'ReLoad INI' from the Tray menu "Mouse on LEFT SIDE above Switches to immediate screen protection outher eyes" "Mouse on MID TOP SIDE Switches to RAY filter to protect your eyes as you work hard on monitor" "at start pasword is asked twice later process normal- default "9" ver.16.05.07 RayBAN.au3
  9. you have help great. it is my understanding ex layer versus ex transparency, i thought it was only ex layer creating transparency, tks alot, i am trying to code an instant screen blocker and a RayBAN filter supresses colors behind while you can keep your access normally under that rayban filter now,
  10. Master, It is already $WS_EX_TRANSPARENT exstyle, can you give an example that style uses transparent colors. pls/ My code does colorful ex_transparency, i dont know how it does. sry, found it $WS_EX_TOPMOST+$WS_EX_LAYERED+$WS_EX_TRANSPARENT does.. #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #region GUI Local $hGui = GUICreate("trans", 300, 100, -1, -1, -1, $WS_EX_TOPMOST+$WS_EX_LAYERED+$WS_EX_TRANSPARENT) GUICtrlCreateLabel("This is text on a transparent Layered GUI", 10, 10, 200, 20, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetTip(-1, "Click label to drag layered window") Local $idLayButt = GUICtrlCreateButton("Button", 10, 40, 40) GUISetBkColor(0xABCDEF) _WinAPI_SetLayeredWindowAttributes($hGui, 0x010101) GUISetState(@SW_SHOW) Local $hGuicontrol = GUICreate("ControlGUI", 300, 100, 100, 100, -1, $WS_EX_TOPMOST) Local $idCheckTrans = GUICtrlCreateCheckbox("Transparent color 0xABCDEF (Checked) Or 0x010101", 10, 10) Local $idCheckBorder = GUICtrlCreateCheckbox("POPUP-Style", 10, 30) GUICtrlCreateLabel("Transparency for Layered GUI", 10, 50) Local $idSlTrans = GUICtrlCreateSlider(10, 70, 200, 30) GUICtrlSetLimit($idSlTrans, 255, 0) GUICtrlSetData(-1, 255) GUISetState(@SW_SHOW) #endregion While 1 Local $aExtMsg = GUIGetMsg(1) Local $iMsg = $aExtMsg[0] Switch $aExtMsg[1] Case $hGuicontrol Select Case $iMsg = $GUI_EVENT_CLOSE Exit Case $iMsg = $idCheckTrans Or $iMsg = $idSlTrans; Change Attributes of Trans-Color and Window Transparency If BitAND(GUICtrlRead($idCheckTrans), $GUI_CHECKED) = $GUI_CHECKED Then _WinAPI_SetLayeredWindowAttributes($hGui, 0xABCDEF, GUICtrlRead($idSlTrans)) Else _WinAPI_SetLayeredWindowAttributes($hGui, 0x010101, GUICtrlRead($idSlTrans)) EndIf Case $iMsg = $idCheckBorder If BitAND(GUICtrlRead($idCheckBorder), $GUI_CHECKED) = $GUI_CHECKED Then GUISetStyle($WS_POPUP, -1, $hGui) Else GUISetStyle($GUI_SS_DEFAULT_GUI, -1, $hGui) EndIf EndSelect Case $hGui Select Case $iMsg = $idLayButt Local $iTransColor, $iAlpha Local $iInfo = _WinAPI_GetLayeredWindowAttributes($hGui, $iTransColor, $iAlpha) MsgBox($MB_SYSTEMMODAL, 'Layered GUI', "Button on layered Window Clicked" & @CRLF & "Information about this window: " & @CRLF & _ "Transparent Color: " & $iTransColor & @CRLF & _ "Alpha Value: " & $iAlpha & @CRLF & _ "LWA_COLORKEY: " & (BitAND($iInfo, $LWA_COLORKEY) = $LWA_COLORKEY) & @CRLF & _ "LWA_ALPHA: " & (BitAND($iInfo, $LWA_ALPHA) = $LWA_ALPHA)) Case $iMsg = $GUI_EVENT_CLOSE Exit MsgBox($MB_SYSTEMMODAL, '', "Close from Layered GUI") EndSelect EndSwitch WEnd
  11. ok. i will add here.>>>> it is my project i work on it. as it seen blue cursor works under green filter and can be processed.
  12. I have a long code which makes a transparent child_gui background have foggy color ,after a bunch of key strokes, such as a screen filter so that you can process window below as colored. I don't see how code does it. Is there a straight way to do this?
  13. not really, small button failed wm_ message and me.. it is so weird that when i add If @GUI_CtrlId=$idButton wm_ doesnot fail anymore.. Enjoy RayBAN Screen filter #include <WindowsConstants.au3> #include <winapiex.au3>;_WinAPI_TrackMouseEvent ; Opt("GUIOnEventMode", 1) ; HotKeySet("{ESC}", "_Custom_Exit") ; Global $ParentWin_Width = @DesktopWidth,$ParentWin_Height = @DesktopHeight Global $Top = 0, $ParentWin_Rght = 0, $ParentWin_Left = -1 Global $ParentWin_mn = 0,$nSteps = 20, $nBAR=5 Global $MOUSELEAVE = 0, $nBCKGRNDCLR=0x000000 $form1 = GUICreate('Form1', $ParentWin_Width, $ParentWin_Height, $ParentWin_Left, 0, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) $idButton=GUICtrlCreateButton("RayBAN", 140, 110,60,60) GUICtrlSetOnEvent($idButton, "Button") GUISetState() GUISetBkColor($nBCKGRNDCLR,$form1 ) GUIRegisterMsg(0x0200, '_WM_MOUSEMOVE') GUIRegisterMsg(0x02A3, '_WM_MOUSELEAVE') ; Func _Custom_Exit() Exit EndFunc ; While GUIGetMsg() <> -3 WEnd Func Button() If @GUI_CtrlId=$idButton Then If $nBCKGRNDCLR=0x000000 Then $nBCKGRNDCLR=0xFFF000 WinSetTrans($form1, "", 100) else $nBCKGRNDCLR=0x000000 WinSetTrans($form1, "", 255) EndIf GUISetBkColor($nBCKGRNDCLR,$form1 ) EndIf EndFunc Func _WM_MOUSEMOVE($hWndGUI, $MsgID, $wParam, $lParam) ;==>_WM_MOUSEMOVE ;WinSetTrans($form1, "", 245) If $MOUSELEAVE Then Return Local $win_pos = WinGetPos("Form1") For $i = $win_pos[1] To $win_pos[3] Step $nSteps If $i >= $nBAR Then ExitLoop WinMove("Form1", "", $win_pos[0], $i, $win_pos[2], $win_pos[3]) Sleep(10) Next _WinAPI_TrackMouseEvent($form1, $TME_LEAVE) $MOUSELEAVE = 1 EndFunc Func _WM_MOUSELEAVE($hWndGUI, $MsgID, $wParam, $lParam) ;collapse $MOUSELEAVE = 0 $a = GUIGetCursorInfo($hWndGUI) If @error Or $a[4] > 0 Then Return Local $win_pos = WinGetPos("Form1") If $win_pos[1] >= 0 Then For $i = $win_pos[1] To $win_pos[3] - $nBAR Step $nSteps WinMove("Form1", "", $win_pos[0], -$i, $win_pos[2], $win_pos[3]) Sleep(10) Next EndIf EndFunc
×
×
  • Create New...