View Single Post
Old 01-12-2020, 12:21 PM   #902
Human being with feelings
Sexan's Avatar
Join Date: Jun 2009
Location: Croatia
Posts: 2,819

That barebone script draws nothing (you entered some API wrong btw). I done this exact thing in my script the code is above (but it would draw it when area is made) and nothing

bm = reaper.JS_LICE_CreateBitmap(true, 1, 1)
reaper.JS_LICE_Clear(bm, 0xFFFF0000)
tv = reaper.JS_Window_FindChildByID(reaper.GetMainHwnd(), 0x3E8)
cOK = reaper.JS_Composite(tv, 100, 100, 100, 100, bm, 0, 0, 1, 1)
reaper.JS_Window_InvalidateRect(tv, 100, 100, 200, 200, false)
Atleast JS_LICE_COMPOSE does not exist on my end or anywhere in API

OSX High Siera

In the Main() loop there is check_keys() function that calls the Input script, if you press any key it should appear in de IDE as a table.

For drawing the function is in the class script() - Element:draw()

Thats the only call for compositing, anywhing you put there it will draw (if you actually draw first area). but there I set coordinates manually so it should draw things no matter what are Area coordinates. But since this above does not work do not know whats the issue.

Regarding keys - when you call track_keys() which is in the check_keys() function it should return a key you pressed as a table (which you can see in IDE since its global)

I will make a minimal script that does keys and drawing

Last edited by Sexan; 01-12-2020 at 12:34 PM.
Sexan is offline   Reply With Quote