<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 25, 2016 at 3:52 AM, Plamen Georgiev <span dir="ltr"><<a href="mailto:fagroup@abv.bg" target="_blank">fagroup@abv.bg</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Currently we have hardware blocking between operating positions A and B on the same band at LZ9W M/M station.<br>Is there a possibility to add a software blocking between positions A and B in WINTEST ?<br>If it is possible, how exactly we can do it.<br></div></blockquote><div><br></div><div>If you have hardware lockout working, why do you need software lockout?</div><div><br></div><div>The short answer is that no, software lockout is not supported.</div><div><br></div><div>Some things are not possible only with software.  For example, there's no way that software can prevent the operator of station B from using an internal memory or the TUNE button while station A is transmitting.</div><div><br></div><div>However, starting with WT 4.21, you can send text commands to other computers to, for example, interrupt sending on remote computers.</div><div><br></div><div>First you install a LUA script on the remote computer and assign it to the text command PRESSESC:</div><div><br></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">-- Halt sending by simulating a press of the Esc key</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">wtApp:SendFKey("Esc", WT_KEY_NONE)</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">-- No further keystroke processing</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">return -1</font></div></div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Next on the local computer, you assign a script to the Escape key that halts sending on both computers, like this:</div><div><br></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">-- Do normal local keystroke processing of Escape key,</font></div><div><font face="monospace, monospace">-- first time through.</font></div><div><font face="monospace, monospace">-- Request callback, then after that completes, Press Escape</font></div><div><font face="monospace, monospace">-- on the Stn2 computer by sending a text command</font></div><div><font face="monospace, monospace">local rc = 1</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">if wtApp:IsPostKeyProcess() then</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">   -- Press Esc on the Stn2 radio to halt any sending there</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">   wtApp:TextCommand("PRESSESC", wtArg, WT_REMOTE_NOTIFY_ALWAYS)</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">   rc = -1</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">end</font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace"><br></font></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><div><font face="monospace, monospace">return rc</font></div></div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Where <b>wtArg</b> is the station name of the remote computer, passed as an argument to the second script (you enter "STN2", for example, with the quotes, in the Argument box when assigning it to the escape key in Scripts Manager).</div><div><br></div><div>But this will only interrupt a Win-Test message, not paddles or other methods of sending, and it will not prevent STN2 from pressing F1 to restart his CQ, for example.</div><div><br></div><div>To block all function keys from STN2 while locked out, and restore all function when it's not locked out, would require a global variable to be set and reset at the beginning and end of every CW message, and a script assigned to every message key to check for that global variable's value. Script calls at the beginning and end of every message, with special handling for Alt-K (keyboard CW), would also be required.</div><div><br></div><div>In sum, providing software lockout using LUA scripts alone would be much more work than you might think and it would not be foolproof.</div><div><br></div><div>73,</div><div>Bob, N6TV</div></div></div></div>