View Single Post
Old 04-28-2021, 04:30 PM   #605
Dafarkias
Human being with feelings
 
Dafarkias's Avatar
 
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
Default

Close.

Take this

Code:
-- window vars
function getPath(str) return str:match("(.*[/\\])") end
msg("filename: "..filename2) msg("path: "..GetPath(filename2))
local is_new_value,filename2,sectionID,cmdID,mode,resolution,val = reaper.get_action_context() local filename = "C:\Users\[...]\Dfk Custom Toolbar Utility (v1.05).lua" local NAME = "Dfk Custom Toolbar Utility (v1.05)" 

local V_NAME = NAME
local FOLDER, PFOLDER = "Main", "" --if reaper.HasExtState( V_NAME, "FOLDER") then FOLDER = reaper.GetExtState( V_NAME, "FOLDER") end
and delete/change it to this:

Code:
-- window vars
function getPath(str) return str:match("(.*[/\\])") end

local filename = "C:\Users\[...]\Dfk Custom Toolbar Utility (v1.05).lua" local NAME = "Dfk Custom Toolbar Utility (v1.05)" 

local V_NAME = NAME
local FOLDER, PFOLDER = "Main", "" --if reaper.HasExtState( V_NAME, "FOLDER") then FOLDER = reaper.GetExtState( V_NAME, "FOLDER") end
Oh!

And you need to change those back slashes to forward slashes
__________________

Support my feature request!
Dafarkias is offline   Reply With Quote