Jump to content

Recommended Posts

Posted

hello i would like help, im trying to have the screen marker controll by the gui input box

 

well this is my attempt

the problem is that the marker isnt popping up when i have the gui screen active but when i disable the gui part of the script it works

#include <Misc.au3>
#Include <WinAPI.au3>
#Include <WindowsConstants.au3>
 #include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
#Include <Date.au3>
#include <EditConstants.au3>
#include <WinAPI.au3>
#include <Crypt.au3>
HotKeySet("{ESC}", "_Exit")
HotKeySet("{`}", "move")
HotKeySet("{F1}", "draw")
        
Global Const $hFullScreen = WinGetHandle("Program Manager")
Global Const $aFullScreen = WinGetPos($hFullScreen)
Global Const $hGUI = GUICreate("Desktop Marker by UEZ 2011", $aFullScreen[2], $aFullScreen[3], $aFullScreen[0], $aFullScreen[1], $WS_POPUP, BitOR($WS_EX_LAYERED,$WS_EX_TRANSPARENT))
global $loc1,$loc2,$loc1b,$loc2b
;Global $iMemo,$BTNEXIT,$Paused,$success,$error,$ie
;Global $mouse,$ratio,$total,$mouse2,$data,$msg1
global $Inputspot, $Inputspotread,$Inputspota, $Inputspotreada
test()

;#cs

GuiSetBkColor(0xABCDEF)
_WinAPI_SetLayeredWindowAttributes($hGUI, 0xABCDEF, 0xA0)
WinSetOnTop($hGUI, "", 1)
GuiSetState()
 
Global Const $hDC = _WinAPI_GetWindowDC($hGUI)
Global Const $hPen = _WinAPI_CreatePen($PS_SOLID, 5, 0xFF)
Global Const $obj_orig = _WinAPI_SelectObject($hDC, $hPen)
 
Global Const $user32_dll = DllOpen("user32.dll")
Global $mx, $mxo, $my, $myo

$loc1 =1472
$loc1b = 188
$loc2 =1437
$loc2b = 236
;func draw()
;
While Sleep(50)

$Inputspot1read=GUICtrlRead($Inputspot)
$Inputspot1reada=GUICtrlRead($Inputspota)

_WinAPI_DrawLine($hDC, $Inputspotread,$Inputspotreada,$Inputspotread,$Inputspotreada)
_WinAPI_DrawLine($hDC, $loc2,$loc2b,$loc2,$loc2b)

WEnd
;EndFunc
 
Func _Exit()
DllClose($user32_dll)
_WinAPI_SelectObject($hDC, $obj_orig)
_WinAPI_DeleteObject($hPen)
_WinAPI_ReleaseDC($hGUI, $hDC)
Exit
EndFunc

func move() 
   
$Inputspotread=GUICtrlRead($Inputspot)
$Inputspotreada=GUICtrlRead($Inputspota)
   mousemove($Inputspotread,$Inputspotreada)
EndFunc




;#ce
;#cs
Func test()
    Local $msg,$button

    GUICreate("test",300,80,100,-3)
;WinSetOnTop("test", "", 1)

    $Inputspot = GUICtrlCreateInput("55" , 10,05,40,20)
$Inputspota = GUICtrlCreateInput("55" , 50,05,40,20)
    EndFunc
    
        while 1
               sleep(100)
               WEnd
             ; #ce
any help is appreciated <3
Posted

Can you explain me what do you want to do?

Thx.

Br,

UEZ

yea, id like to have the marker be at the location where i put into the gui input

3BUX7.png

like the marker will show up at 55,55 on the screen and stay there

my problem is that when i have the gui on the marker doesnt show up at all

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
×
×
  • Create New...