View Single Post
Old 01-05-2020, 01:27 PM   #2
Human being with feelings
Edgemeal's Avatar
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 1,803

If script not the focused window then just don't do anything , but guess you don't want that restriction? Not sure this helps, but the Win32 WindowFromPoint function tells you the handle of a window at specific point, like under the mouse pointer, so maybe check if handle under mouse = your script window? pseudo-code,..
-- save handle to the script window
this_script_hwnd = reaper.JS_Window_FindTop('My Script Titlebar Text', true)
-- in mouse move func check if handle under mouse = your script window
if reaper.JS_Window_FromPoint(reaper.GetMousePosition()) == this_script_hwnd then
  -- do script stuff as normal             

Last edited by Edgemeal; 01-06-2020 at 12:38 PM.
Edgemeal is offline   Reply With Quote