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

Well some progress,its not drawing but its getting all the information under it, and now keys do not work??

I'm not getting ANY respond from keys I press (from script)

Code:
-- FOR WINDOWS
for i = 1, 255 do
   local func
   local name = string.char(i)
   if type(tonumber(name)) == "number" then
      func = select_as
   end
   if i == 16 then
      name = "Shift"
   elseif i == 17 then
      name = "Ctrl"
   elseif i == 18 then
      name = "Alt"
   elseif i == 13 then
      name = "Return"
   elseif i == 8 then
      name = "Backspace"
   elseif i == 32 then
      name = "Space"
   elseif i == 20 then
      name = "Caps-Lock"
   elseif i == 27 then
      name = "ESC"
      func = remove
   elseif i == 9 then
      name = "TAB"
   elseif i == 192 then
      name = "~"
   elseif i == 91 then
      name = "Win"
   elseif i == 45 then
      name = "Insert"
   elseif i == 46 then
      name = "Del"
      func = del
   elseif i == 36 then
      name = "Home"
   elseif i == 35 then
      name = "End"
   elseif i == 33 then
      name = "PG-Up"
   elseif i == 34 then
      name = "PG-Down"
   end
   Key_TB[#Key_TB + 1] = Key:new({i}, name, func)
end
This is how I fill the table with all the keys, it should at least return letters and numbers but keyboard is not responding at all (script)

https://github.com/GoranKovac/ReaScr...a_51_input.lua

UPDATE 2:
It seems something is wrong with drawing also, cannot seem to get anything on the screen even manually entering coordinates:

Code:
track_window = reaper.JS_Window_FindChildByID(reaper.GetMainHwnd(), 0x3E8) -- all platforms
function Element:draw()
  reaper.JS_Composite(track_window, 400, 400, 400, 400, self.bm, 0, 0, 1, 1)
  refresh_reaper()
end
This should draw fixed rectangle when I make first area but its not drawing anything.

The current status is that that script gets all the data, it draws "invisible" areas and all the info is there, all the tables are filled but:
1. Cannot draw anything on screen
2. Keys do not work

Last edited by Sexan; 01-08-2020 at 11:28 PM.
Sexan is offline   Reply With Quote