Hello All
I have an idea that i would like to create a gui that pops up when the middle mouse click & alt is pressed. When pressed a second time it disappears. I would like it to use the MouseGetPos() value to place the gui at the cursor psosition.
I am lost and not sure what to do. When I place $aPos = MouseGetPos() inside the loop to refresh the variable , i get error variable is not declared and wont run. When I place the $aPos = MouseGetPos() outside the loop it doesn't refresh the current mouse position and uses the mouse position coordinates at the start of the program and doesn't refresh. Does anyone have any hints?
#Region ;************ Includes ************
#Include <GUIConstantsEx.au3>
#include <misc.au3>
#EndRegion ;************ Includes ************
Example1()
Func Example1()
Local $msg
Local $aPos = MouseGetPos()
$GUI2 = GUICreate("CHILD", 110, 10, $aPos[0], $aPos[1]) ; will create a dialog box that when displayed is centered
; Run the GUI until the dialog is closed
While 1
Sleep(100)
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
If _IsPressed(04) AND _IsPressed(12) Then
If BitAND(WinGetState($GUI2), 2) Then
GUISetState(@SW_HIDE, $GUI2)
Else
GUISetState(@SW_SHOW, $GUI2)
EndIf
EndIf
WEnd
GUIDelete()
EndFunc ;==>Example1
Thank you for your time