Jump to content

mousecandle 1.1 *updated*


corgano
 Share

Recommended Posts

i made this out of the guihole example on this form. it could be used in a game or something....

it defies explanation, but i would like feedback

*EDIT*

thank you ProgAndy for the help. changing 3 words made it work....lol

here is the new script

mouse_candel.au3

it works

Edited by corgano

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Link to comment
Share on other sites

It's a nice concept and it worked for about 5 seconds and then it just made my screen bug out with funky colors.

lol

send me a screenshot and i will see what i can do. i used the newest beta, btw.

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Link to comment
Share on other sites

Pretty nice. I like it.

EDIT: After reading post above, I tried to move to my second monitor. It doesn't bug out, but the black shade does not extend to that monitor, so it does nothing.

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

I can confirm what Christos said.

When the focus gets lost on window then the hole disappears and the CPU usage is going crazy. No chance to get the hole back.

You need to kill the process.

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Pretty nice. I like it.

EDIT: After reading post above, I tried to move to my second monitor. It doesn't bug out, but the black shade does not extend to that monitor, so it does nothing.

I knew that wouldnt work. to get that to work, i would have to find the second moniters hight and width, and i dont have 2 moniters so i dont think i will be doing that.

i also got the bug that many of you comented on (glichy screen). i know it is caused by the hole makeing script, but how i fix it i do not know.

maby its because its drawing mutiple holes over each other?

still working on it

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Link to comment
Share on other sites

lol

send me a screenshot and i will see what i can do. i used the newest beta, btw.

I can't. When it bugs out it causes an insufficient memory error when trying to take a screenshot.

[size="1"]Please stop confusing "how to" with "how do"[/size]

Link to comment
Share on other sites

Dind't work for me, too. Changed the _GUIHole to this and it works:

Func _GuiHole($h_win, $i_x, $i_y, $i_size)
   Dim $pos, $outer_rgn, $inner_rgn, $wh, $combined_rgn, $ret
   $pos = WinGetPos($h_win)
   
   $outer_rgn = DllCall("gdi32.dll", "hwnd", "CreateRectRgn", "long", 0, "long", 0, "long", $pos[2], "long", $pos[3])
    If IsArray($outer_rgn) Then
        $inner_rgn = DllCall("gdi32.dll", "hwnd", "CreateEllipticRgn", "long", $i_x, "long", $i_y, "long", $i_x + $i_size, "long", $i_y + $i_size)
        If IsArray($inner_rgn) Then

                DllCall("gdi32.dll", "long", "CombineRgn", "hwnd", $outer_rgn[0], "hwnd", $outer_rgn[0], "hwnd", $inner_rgn[0], "int", 4)
                $ret = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "hwnd", $outer_rgn[0], "int", 1)
;~              DllCall("gdi32.dll", "long", "DeleteObject", "hwnd", $inner_rgn[0])
                If $ret[0] Then
                    Return 1
                Else
                    Return 0
                EndIf

        Else
            Return 0
        EndIf
    Else
        Return 0
    EndIf
   
EndFunc ;==>_GuiHole

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

This one worked for me:

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>

$VirtualDesktopWidth = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", 78);sm_virtualwidth
$VirtualDesktopWidth = $VirtualDesktopWidth[0]
$VirtualDesktopHeight = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", 79);sm_virtualheight
$VirtualDesktopHeight = $VirtualDesktopHeight[0]
$VirtualDesktopX = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", 76);sm_xvirtualscreen
$VirtualDesktopX = $VirtualDesktopX[0]
$VirtualDesktopY = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", 77);sm_yvirtualscreen
$VirtualDesktopY = $VirtualDesktopY[0]
Global $hGUI = GUICreate("Test", $VirtualDesktopWidth, $VirtualDesktopHeight, $VirtualDesktopX, $VirtualDesktopY, $WS_POPUP, BitOr($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
HotKeySet("{ESC}", "Quit")
GUISetBkColor (0x000000)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    $pos = MouseGetPos()
    _GuiHole($hGUI , $pos[0]-90, $pos[1]-70, 200)
    Sleep(1)
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func Quit() ; exit program
    Exit
EndFunc

Func _GuiHole($h_win, $i_x, $i_y, $i_size) ;modified code by ProgAndy
   Dim $pos, $outer_rgn, $inner_rgn, $wh, $combined_rgn, $ret
   $pos = WinGetPos($h_win)
    $outer_rgn = DllCall("gdi32.dll", "hwnd", "CreateRectRgn", "long", 0, "long", 0, "long", $pos[2], "long", $pos[3])
    If IsArray($outer_rgn) Then
        $inner_rgn = DllCall("gdi32.dll", "hwnd", "CreateEllipticRgn", "long", $i_x, "long", $i_y, "long", $i_x + $i_size, "long", $i_y + $i_size)
        If IsArray($inner_rgn) Then
                DllCall("gdi32.dll", "long", "CombineRgn", "hwnd", $outer_rgn[0], "hwnd", $outer_rgn[0], "hwnd", $inner_rgn[0], "int", 4)
                $ret = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "hwnd", $outer_rgn[0], "int", 1)
;~                 DllCall("gdi32.dll", "long", "DeleteObject", "hwnd", $inner_rgn[0])
                If $ret[0] Then
                    Return 1
                Else
                    Return 0
                EndIf
        Else
            Return 0
        EndIf
    Else
        Return 0
    EndIf
EndFunc ;==>_GuiHole

Please test!

I will test it with dual monitor tomorrow in the office .

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...