View Single Post
Old 01-12-2020, 11:24 AM   #900
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,254
Default

Quote:
Originally Posted by Sexan View Post
The general problem is as I've mentioned above I cannot draw anything even manually entering coordinates. Nothing is drawing on screen.
Is it only the Area51 script that doesn't draw composites, or does the function not work at all? For example, does this barebones script draw anything?

Code:
bm = reaper.JS_LICE_CreateBitmap(true, 1, 1)
reaper.JS_LICE_Clear(bm, 0xFFFF0000)
tv = reaper.JS_Window_FindChildByID(reaper.GetMainHwnd(), 1000)
cOK = reaper.JS_LICE_Composite(tv, 100, 100, 100, 100, bm, 0, 0, 1, 1)
reaper.JS_Window_InvalidateRect(tv, 100, 100, 200, 200, false)

Quote:
Originally Posted by Sexan View Post
Regarding keys you can check my Area_51_input class script and its not returning ANY key not modifiers,nothing.
I tested VKeys_GetState and Mouse_GetState and both seemed to work fine on my OSX High Sierra x64. To my pleasant surprise, VKeys_GetState even returned modifier keys, so perhaps the bug that I mentioned before has been fixed without me noticing (or remembering?) it.

I took a look at the Area51 script, and I can confirm that it doesn't draw anything on my OSX system (when I hold Cmd+Shift+leftdrag), but unfortunately the script is far too long and complex for me to make head or tails of it. Do you perhaps have a minimal example of a script that doesn't get keyboard inputs and doesn't draw anything?

The script did crash a few times while I tested it, and I had to use the "Panic" script to remove the keyboard intercepts before I could type again. I would recommend that you use pcall throughout the script, so that if the script encounters an error, it can gracefully remove all intercepts and terminate, instead of just crashing.
juliansader is offline   Reply With Quote