<div dir="ltr">Excellent, thank you so much! :D<div><br></div><div>Gabor</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-11 23:01 GMT+02:00 Jari Williamsson <span dir="ltr"><<a href="mailto:jari.williamsson@mailbox.swipnet.se" target="_blank">jari.williamsson@mailbox.swipnet.se</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've now added a code example about Measurement Units to the quick script page in the Wiki, since this topic seems like a very general-purpose thing.<br>
<br>
<a href="http://jwmusic.nu/jwplugins/wiki/doku.php?id=jwlua:quickscripts" target="_blank">http://jwmusic.nu/jwplugins/<u></u>wiki/doku.php?id=jwlua:<u></u>quickscripts</a><br>
<br>
<br>
Best regards,<br>
<br>
Jari Williamsson<div class=""><br>
<br>
<br>
On 2014-08-11 20:39, Gábor Orth wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Jari,<br>
<br><div class="">
My first name is the Gabor! :D<br>
Thank you for your fast answer, it is great help for me.<br>
That you write down is clear for me, thank you again.<br>
<br>
yours sincerely<br>
Gabor<br>
<br>
<br>
<br>
<br>
2014-08-11 20:28 GMT+02:00 Jari Williamsson<br>
<<a href="mailto:jari.williamsson@mailbox.swipnet.se" target="_blank">jari.williamsson@mailbox.<u></u>swipnet.se</a><br></div>
<mailto:<a href="mailto:jari.williamsson@mailbox.swipnet.se" target="_blank">jari.williamsson@<u></u>mailbox.swipnet.se</a>>>:<div class=""><br>
<br>
Orth,<br>
<br>
(Btw, are you using the Hungarian name order, so Orth is your first<br>
name?)<br>
<br>
Since Finale only uses EVPUs internally, all other units need to be<br>
converted to EVPUs. The FCString:GetMeasurement() function can turn<br>
a measurement string into EVPUs, so a solution could be a wrapper<br>
function, like in the example below.<br>
The string conversion supports the same measurement suffixes that<br>
Finale supports (e for EVPUs, c for centimeters, i for inches, etc).<br>
Please note that it currently only supports '.' as a decimal point.<br>
<br>
So if you just write the measurement as a Lua string inside a<br>
ToEvpus() call you would be able to use it. (The example will print<br>
1134, which would be the EVPU equivalent of 10 centimeters.) If the<br>
string has no suffix, the current default measurement will be assumed.<br>
<br>
---<br>
function ToEvpus(text)<br>
local str = finale.FCString()<br>
str.LuaString = text<br></div>
return str:GetMeasurement(finale.__<u></u>MEASUREMENTUNIT_DEFAULT)<div class=""><br>
end<br>
<br>
print ( ToEvpus("10c") )<br>
---<br>
<br>
Best regards,<br>
<br>
Jari Williamsson<br>
<br>
<br>
<br>
On 2014-08-11 19:30, Gábor Orth wrote:<br>
<br>
<br>
Hi Jari,<br>
<br>
Firstly, thank you for your hard work on the Lua language<br>
<br>
I able to write a simple, short script, by which I setting the<br>
positions<br>
of the margins on a new score.<br>
I have just one question.<br>
Can I set the measurement units (EVPUs, Inches, etc) in the Lua<br>
code?<br>
Or is it will a features of the future?<br>
<br>
Sorry for my english! I hope, You understand me!<br>
<br>
<br>
Yours sincerely<br>
<br>
<br>
--<br>
<a href="http://www.kottagrafika.hu" target="_blank">www.kottagrafika.hu</a> <<a href="http://www.kottagrafika.hu" target="_blank">http://www.kottagrafika.hu</a>><br>
<<a href="http://www.kottagrafika.hu" target="_blank">http://www.kottagrafika.hu</a>><br>
<br>
Számítógépes kottagrafika, kotta archiválás, transzponálás<br>
<br>
<br></div>
______________________________<u></u>___________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a> <mailto:<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a>><br>
<a href="http://jwmusic.nu/mailman/__listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/__<u></u>listinfo/jwlua_jwmusic.nu</a><br>
<<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/<u></u>listinfo/jwlua_jwmusic.nu</a>><br>
<br>
<br>
<br>
<br>
______________________________<u></u>___________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a> <mailto:<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a>><br>
<a href="http://jwmusic.nu/mailman/__listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/__<u></u>listinfo/jwlua_jwmusic.nu</a><br>
<<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/<u></u>listinfo/jwlua_jwmusic.nu</a>><div class=""><br>
<br>
<br>
<br>
<br>
--<br>
<a href="http://www.kottagrafika.hu" target="_blank">www.kottagrafika.hu</a> <<a href="http://www.kottagrafika.hu" target="_blank">http://www.kottagrafika.hu</a>><br>
Számítógépes kottagrafika, kotta archiválás, transzponálás<br>
<br>
<br>
______________________________<u></u>_________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/<u></u>listinfo/jwlua_jwmusic.nu</a><br>
<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
<br>
______________________________<u></u>_________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank">http://jwmusic.nu/mailman/<u></u>listinfo/jwlua_jwmusic.nu</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><a href="http://www.kottagrafika.hu">www.kottagrafika.hu</a><br>Számítógépes kottagrafika, kotta archiválás, transzponálás
</div>