<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
No problem, Robert. <br>
Great that you have found it! <br>
<br>
<br>
<div class="moz-cite-prefix">Am 22.12.2022 um 18:30 schrieb Robert
Patterson:<br>
</div>
<blockquote type="cite"
cite="mid:CAACncetNNKu1dGmY=zPBWYrV57x55YXCj9GaN4fpPS96MdT1BQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Whoops, there's a bug. Sorry. I can fix it for the
next version, but I don't see any way to do what you want right
now.<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Dec 22, 2022 at 11:16
AM Jan Angermüller <<a href="mailto:jan@angermueller.com"
moz-do-not-send="true" class="moz-txt-link-freetext">jan@angermueller.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> Robert,<br>
<br>
your suggestion is exactly the code that I tried before I
wrote the first message in this thread.<br>
I tried:<br>
<i>return tostring(false) </i><br>
<i>return false</i><i><br>
</i><i>return "Cancel"</i><br>
<br>
When I do this<br>
<i>local success, msg = finenv.ExecuteLuaScriptItem(item)</i><i><br>
</i>gets me:<br>
success == true<br>
msg == nil<br>
<br>
I only get <i>success==false </i>with<i> error(...)</i><br>
(tested on Windows/Fin27/RGP Lua 0.65 only)<br>
<br>
Jan<br>
<br>
<div>Am 22.12.2022 um 18:04 schrieb Robert Patterson:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>It looks like the code always shows the error
message. :-/</div>
<div><br>
</div>
<div>For your purposes, I think the best choice might be
simply to return a message. Or just return
tostring(false) and then compare the string returned
to that, if you don't care about the message.<br>
</div>
<div><br>
</div>
<div>Something like:</div>
<div><br>
</div>
<div>local success, msg =
finenv.ExecuteLuaScriptItem(item)</div>
<div>if success and msg then
<do-error-return-code> end</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Dec 22, 2022
at 10:47 AM Jan Angermüller <<a
href="mailto:jan@angermueller.com" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">jan@angermueller.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px
0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div> Hm, I still didn't succeed.<br>
<br>
When I throw an error message in a lua script with:<br>
<i>error("Cancel",2)</i><br>
then this a user dialog always pops up in RGP
Lua/Windows:<br>
<img
src="cid:part1.JwQzMzrn.MpFjXjXM@angermueller.com"
alt="" class=""><br>
<br>
Is there a way to not show this dialog in RGP Lua?<br>
(Tested in Fin27.2/Windows 10/RGP Lua 0.65)<br>
<br>
This happens without<i> finenv.ExecuteLuaScriptItem</i>
, it's just the <i>error(...) </i>that leads to
the popup.<i><br>
</i><br>
The same code in JW Lua doesn't give a dialog that
pops up.<br>
<br>
Or does anyone have an example code of how to end a
lua script so that it passes a "not successful" to <i>finenv.ExecuteLuaScriptItem
</i>without showing any error messages.<br>
<br>
Jan<br>
<br>
<br>
<br>
<div>Am 20.12.2022 um 01:27 schrieb Robert
Patterson:<br>
</div>
<blockquote type="cite">
<div dir="ltr">As far as I can tell,
ExecuteLuaScriptItem is working as <a
href="https://www.finalelua.com/docs/rgp-lua/finenv-properties#executeluascriptitem-function"
target="_blank" moz-do-not-send="true">documented</a>.
It is not the same behavior as a command line
tool. As for the 'error' function, it will close
the Lua state of the called script, but that
would appear to be what you want anyway.
Otherwise you can return a string that will be
returned in the second return value of
ExecuteLuaScriptItem.<br>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
JWLua mailing list
<a href="mailto:JWLua@jwmusic.nu" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">JWLua@jwmusic.nu</a>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a href="http://www.elbsound.studio" target="_blank" moz-do-not-send="true">www.elbsound.studio</a></pre>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">JWLua@jwmusic.nu</a><br>
<a
href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu"
rel="noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
JWLua mailing list
<a href="mailto:JWLua@jwmusic.nu" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">JWLua@jwmusic.nu</a>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a href="http://www.elbsound.studio" target="_blank" moz-do-not-send="true">www.elbsound.studio</a></pre>
</div>
_______________________________________________<br>
JWLua mailing list<br>
<a href="mailto:JWLua@jwmusic.nu" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">JWLua@jwmusic.nu</a><br>
<a href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a><br>
</blockquote>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jan Angermüller
Orchideenstieg 13
22297 Hamburg
Tel. 040 - 28 94 84 82
Mobil 0173 - 99 33 904
<a class="moz-txt-link-abbreviated" href="http://www.elbsound.studio">www.elbsound.studio</a></pre>
</body>
</html>