krisddd,
Welcome to the Autoit forum.
From what I can see from the thread, GhostIt does not pass clicks. So drawing a GDI grid might be a better bet as this does allow clicks to pass.
Perhaps something like this:
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
HotKeySet("{ESC}", "On_Exit")
Global $hGUI, $aRadio[5], $hButton, $iStep
$hGUI = GUICreate("Grid", 150, 190)
GUICtrlCreateLabel("Choose a grid step value", 10, 10, 150, 20)
GUIStartGroup()
For $i = 0 To 4
$aRadio[$i] = GUICtrlCreateRadio(100 + ($i * 100), 55, 30 + ($i * 20), 100, 20)
Next
GUICtrlSetState($aRadio[0], $GUI_CHECKED)
$hButton = GUICtrlCreateButton("Show Grid", 35, 150, 80, 30)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $hButton
GUISetState(@SW_HIDE, $hGUI)
For $i = 0 To 4
If GUICtrlRead($aRadio[$i]) = 1 Then
$iStep = GUICtrlRead($aRadio[$i], 1)
ExitLoop
EndIf
Next
Grid()
EndSwitch
WEnd
; -------------
Func Grid()
Local $iVerticals = Floor(@DesktopWidth / $iStep)
Local $iHorizontals = Floor(@DesktopHeight / $iStep)
Local $hRectangle_GUI = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
GUISetBkColor(0x000000)
Local $hMaster_Mask = _WinAPI_CreateRectRgn(0, 0, 0, 0)
For $i = 0 To $iVerticals
$hMask = _WinAPI_CreateRectRgn($i * $iStep, 0, ($i * $iStep) + 1, @DesktopHeight)
_WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2)
_WinAPI_DeleteObject($hMask)
Next
For $i = 0 To $iHorizontals
$hMask = _WinAPI_CreateRectRgn(0, $i * $iStep, @DesktopWidth, ($i * $iStep) + 1)
_WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2)
_WinAPI_DeleteObject($hMask)
Next
; Set overall region
_WinAPI_SetWindowRgn($hRectangle_GUI, $hMaster_Mask)
GUISetState()
While 1
Sleep(10)
WEnd
EndFunc ;==>Grid
Func On_Exit()
Exit
EndFunc
I hope that helps.
M23