View Single Post
Old 09-03-2019, 10:32 AM   #7
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by Thonex View Post
Regarding paths... do you happen to know if relative paths are ok?
Well, the path in my example is already a relative one, so I guess it's OK. Using local path = "Cursors/CustomIcon.cur" seems to work also.
But I only tested it on Windows, so far (and not on macOS or Linux).

EDIT: I just did a quick test on macOS and using the example code from post #5 doesn't seem to work there. So here's an adapted version:
Code:
local function changeToCustomCursor()
  -- get the 'Cursors' subdirectory in the Reaper resource folder
  local resourcePath = reaper.GetResourcePath() .. "/Cursors/"
  local cursorHandle = reaper.JS_Mouse_LoadCursorFromFile(resourcePath .. "CustomIcon.cur")
  reaper.JS_Mouse_SetCursor(cursorHandle)

  reaper.defer(changeToCustomCursor)
end

reaper.defer(changeToCustomCursor)
__________________
ReaLauncher

Last edited by solger; 09-03-2019 at 11:06 AM.
solger is offline   Reply With Quote