<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Jari et al,<br>
<br>
a client found out a difficult JW Lua issue if Finale/Windows is not
started "regularly", but by double-clicking on a Finale document
that is hosted on an IP address (i.e. 192.168.178.36\FinaleDoc.musx
or \\NetworkPC\FinaleDoc.musx) and not on a hard drive (or mapped
to a hard drive).<br>
In this case JW Lua (or Finale?) doesn't set a current working
directory which leads to io.popen/os.execute not working ... which
means my plug-in scripts won't work.<br>
<br>
This is how it looks:<br>
<a class="moz-txt-link-freetext" href="https://www.youtube.com/watch?v=9qMIrV5HZQE">https://www.youtube.com/watch?v=9qMIrV5HZQE</a><br>
<br>
Here is the test script which only works if Finale is started
regularly:<br>
local file=io.popen("cd c: & echo / Working Directory %cd%")
--only works if working directory is set<br>
if file~=nil then file=<a class="moz-txt-link-freetext" href="file:read(">file:read(</a>"*".."all") end<br>
print(file)<br>
os.execute("echo test > d:\test.txt") --only works if working
directory is set<br>
<br>
Note: %cd% is not the folder after "cd c:", but the folder before as
%cd% is readonly.<br>
The cd c: was just a useless try to get cmd.exe working.<br>
<br>
Any ideas to get this working?<br>
<br>
Workaround: <br>
- don't start Finale this way <br>
or<br>
- Map the network to a drive<br>
<br>
Best,<br>
Jan<br>
</body>
</html>