I have something really weird going on with paths on Mac its Mountain Lion This bit of code reads the row from Magic listbox and fires up Thea Render with arguments based on the content of the cells
[code]Dim sh As New Shell
sh.Mode = 1
Dim saving as String = Savetxt.Text
dim f3 as folderitem = GetFolderItem(ScenePathtxt.Text)
Dim iptPath as string = f3.NativePath
#if TargetWin32 then
Dim thea3 As string =“C:\Program Files\Thea Render\thea.exe”
#elseif TargetMacOS then
Dim thea3 As string = “/Applications/Thea.app/Contents/MacOS/Thea”
#endif
Dim i as Integer
for i = 0 to lb1.ListCount -1
Scripttxt.text=""
lb1.Cell((i),0)=“Rendering”
dim Scene as string= lb1.cell((i),1)
dim Imagename as string= lb1.cell((i),2)
dim imgformat as string= lb1.cell((i),3)
dim ActCam as string= lb1.cell((i),4)
dim maxsamples as string= lb1.cell((i),5)
dim maxtime as string= lb1.cell((i),6)
// args to send
dim thea as string = " -nosplash -load " + Scene _
+ " -message ""./Scenes/Active/Cameras/" + ActCam + "/Make Active""" _
+ " -maxsamples " + maxsamples _
+ " -timelimit " + maxtime _
+ " -render " _
+ " -save " + saving+ "/" + Imagename + imgformat
sh.Execute(thea3,thea)
while sh.IsRunning
app.DoEvents ()
wend
lb1.Cell((i),0)="Done"
next[/code]
The Problem I’m having is for some strange reason even though “Scene” is the right path ie /Users/nige/Documents/shad.pack.thea Thea tries to load the file but the path is changed to /Users/nige/Documents/shad.png inside Thea’s console it seems it can’t handle a 4 digit extension, using the command line it works fine also if the extension is *.scn.thea this also works
this is the commandline which worked
do shell script " open -a '/Applications/Thea.app/Contents/MacOS/Thea' --args -load /Users/nige/Documents/shad.pack.thea"
I’ve tried
dim f3 as folderitem = GetFolderItem(ScenePathtxt.Text)
Dim iptPath as string = f3.NativePath
But no luck, its fine on windows… or was I’m pretty much doing it all on Mac now
Also how do you get it to launch the /Applications/Thea.app/ rather than digging deeper
It works fine with .scn.thea but croaks with pack.thea, I’ve tried with single quotes, I can’t see it being a Thea issue as it works with various Xojo, C# and VB projects under windows
sorry for the dumb questions I’m a Mac virgin