Old 11-12-2018, 09:39 PM   #1
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default Get Project Path for each project tab? [ RESOLVED ]

Say I have two projects loaded, I want to get their paths, I try this,..

Code:
for p = 1, 2 do
  buf = reaper.GetProjectPathEx( p , '' )
  reaper.ShowConsoleMsg(buf .. '\n')
end
, but it only returns the path of the active project.

Last edited by Edgemeal; 11-12-2018 at 10:06 PM.
Edgemeal is offline   Reply With Quote
Old 11-12-2018, 09:41 PM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

GetProjectPathEx takes a ReaProject* (obtainable using EnumProjects), not a number.
cfillion is offline   Reply With Quote
Old 11-12-2018, 10:00 PM   #3
Edgemeal
Human being with feelings
 
Edgemeal's Avatar
 
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
Default

THANKS for the reply! I was using EnumProjects but got all confused, this seems to work now.

Code:
for p = 0, 99 do 
  proj = reaper.EnumProjects(p , '')
  if proj == nil then break end  
  path = reaper.GetProjectPathEx(proj, '')
  reaper.ShowConsoleMsg(path .. '\n') 
end

Last edited by Edgemeal; 11-12-2018 at 10:15 PM. Reason: better variable names
Edgemeal 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:23 AM.


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