View Single Post
Old 05-24-2019, 09:26 AM   #482
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
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
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote