Old Yesterday, 08:56 AM   #721
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,414
Default

Still did not find the solution, same issue even with reaper.JS_WindowMessage_Intercept.

It responds only after second mouse click, just like modifiers

Code:
local reaper_cursors =  {
                          {187,"MOVE"},  -- MOVE
                          {185,"DRAW"},  -- DRAW
                          {417,"EDGE L"},  -- LEFT EDGE
                          {418,"EDGE R"},  -- RIGHT EDGE
                          {184,"FADE L"},  -- FADE RIGHT
                          {105,"FADE R"},   -- FADE LEFT
                        }

function project_mouse_info()
    local cur_cursor = reaper.JS_Mouse_GetCursor()
    for i = 1, #reaper_cursors do
        local cursor = reaper.JS_Mouse_LoadCursor( reaper_cursors[i][1] )
        if cur_cursor == cursor then
          return reaper_cursors[i][2]
        end
    end
end

local detail = project_mouse_info()
if detail == "EDGE L" or detail == "EDGE R" then
              reaper.JS_WindowMessage_Intercept(track_window, "WM_LBUTTONDOWN", false)
            elseif not mouse.detail then
              reaper.JS_WindowMessage_PassThrough(track_window, "WM_LBUTTONDOWN", false)
            end
Anyone has some ideas?Am I doing something wrong?
Sexan is offline   Reply With Quote
Old Yesterday, 09:02 AM   #722
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 5,952
Default

Quote:
Originally Posted by jangoux View Post
I still havent been able to run this script. Getting this now:

Area_51_class.lua:7: unexpected symbol near '<'
That error usually means you downloaded it as HTML (a web page) rather than a Lua script - if memory serves, Safari is particularly frustrating for doing this.
Lokasenna is online now   Reply With Quote
Old Yesterday, 10:04 AM   #723
doppelganger
Human being with feelings
 
Join Date: Feb 2017
Posts: 341
Default

Quote:
Originally Posted by Lokasenna View Post
That error usually means you downloaded it as HTML (a web page) rather than a Lua script - if memory serves, Safari is particularly frustrating for doing this.
mozilla firefox is guilty too, when downloading from github through context menu -> save Link As..

Saves script file with .lua extension, but inside HTML.
doppelganger is offline   Reply With Quote
Old Yesterday, 12:42 PM   #724
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,373
Default

Yeah, very annoying. But to be honest, it is Github that is failing miserably here. They should just provide a simple file download. Instead, I always have to download the whole archive as zip. Huge misconception in design...
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old Yesterday, 12:52 PM   #725
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 5,952
Default

Quote:
Originally Posted by _Stevie_ View Post
Yeah, very annoying. But to be honest, it is Github that is failing miserably here. They should just provide a simple file download. Instead, I always have to download the whole archive as zip. Huge misconception in design...
They are providing a file download - right-click, Save Link As...

It's the browser that's screwing up by just deciding that any link must be an HTML file.
Lokasenna is online now   Reply With Quote
Old Yesterday, 12:59 PM   #726
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,373
Default

Really? Ah, well, then pretty much every browser I’m using is screwing up.
Safari, Firefox, Opera.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old Yesterday, 01:07 PM   #727
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 5,952
Default

Quote:
Originally Posted by _Stevie_ View Post
Really? Ah, well, then pretty much every browser I’m using is screwing up.
Safari, Firefox, Opera.
For Safari, at least, it's been a known bug for years and years that they don't seem to care about fixing.

I don't have a Mac to try with, but on Windows and Linux most browsers' "Save As..." boxes will let you choose the format to save in. If there's an All Files or Plain Text option, picking that and making sure the file is saved with a .lua extension will usually work.
Lokasenna is online now   Reply With Quote
Old Yesterday, 01:11 PM   #728
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 5,952
Default

Also, don't try to download using the links you see when browsing through a repo on Github - those link to Github's file viewer. If that's where you're having trouble, open the file and then use the Raw button at the top-right for a link to the actual file:

Lokasenna is online now   Reply With Quote
Old Yesterday, 01:16 PM   #729
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 2,414
Default

Managed to solve my issue with the help of nappies.

Long story short intercept must be in constant loop (which I did not do ). I thought I can just trigger it with mouse click and that's it, but no
Sexan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.