View Single Post
Old 05-24-2019, 09:26 AM   #482
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,555
Default

Quote:
Originally Posted by DaveKeehl View Post
Hi, I just started coding some scripts in lua for reaper and I don't understand what HWND means (for example in reaper.GetMainHwnd). Can someone explain it to me?
It's an object, that reflects a window or a gui-element in a window.

For instance GetMainHwnd returns the object of Reaper's main window(the one with the arrangeview in it) and you can manipulate it using appropriate functions.
If you use the most recent version of SWS and/or the js-extension, there are functions, who allow you to do that, like getting/changing position, title, scrollstate of the window, etc.

When I say, gui-element: not all Gui-elements in Reaper have a hwnd, only the ones that are system-dialogs/elements. For instance, all elements in the Render to File-dialog have hwnds, the solo button of a track has not(afaik)


Edit: try experimenting with JS_Window_SetTitle to get an idea.
https://mespotin.uber.space/Ultrasch...indow_SetTitle

Needs the js-extension-plugin, which you can get here: https://forum.cockos.com/showthread.php?t=212174
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote