[JW Lua] Massive problems with JW Lua if Finale is started by double-clicking on a network hosted file

Jan Angermüller jan at angermueller.com
Thu Sep 10 08:45:08 CEST 2020


Hi Jari et al,

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).
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.

This is how it looks:
https://www.youtube.com/watch?v=9qMIrV5HZQE

Here is the test script which only works if Finale is started regularly:
local file=io.popen("cd c: & echo  / Working Directory %cd%") --only 
works if working directory is set
if file~=nil then file=file:read("*".."all") end
print(file)
os.execute("echo test > d:\test.txt") --only works if working directory 
is set

Note: %cd% is not the folder after "cd c:", but the folder before as 
%cd% is readonly.
The cd c: was just a useless try to get cmd.exe working.

Any ideas to get this working?

Workaround:
- don't start Finale this way
or
- Map the network to a drive

Best,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20200910/f4368a93/attachment.html>


More information about the JWLua mailing list