<div class="gmail_quote">On Sun, Oct 31, 2010 at 10:40 PM, Rick Tavan <span dir="ltr"><<a href="mailto:rick@tavan.com">rick@tavan.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Win-Test has a very rich vocabulary for defining function key behavior. But it appears only to allow 7 such keys to be defined for each of Run and S&P, F1 through F7, and some of them are tied to specific functions. (It also allows Insert and Plus to be defined but also ties them to specific functions.) Most keyboards have 12 keys, plus additional sets when combined with SHIFT, CTRL and ALT. So there could conceivably be up to 48 programmable functions. I could really use a few more than 7. Is there any chance of getting the ability to program F8-F12? Or something like Shift-F1 through Shift-F7? Does this exist somewhere that I haven't found?<br>

</blockquote><div><br></div><div>Yes, you can program an unlimited number or CW or RTTY messages very easily using the Lua scripting facility, Win-Test's "plug-in" or "extension" feature.  Step-by-step instructions follow.</div>

<div><br></div><div>I assume you were referring to CW or RTTY.</div><div><br></div><div>For phone, you can program up to seven voice messages <i>per operator</i> when using the internal Win-Test DVK, and you can use the <b>Login</b> command to switch operators.</div>

<div><br></div><div>Back to CW, say you want to assign F8 to be a "Long CQ" message.</div><div><br></div><div>Using WT 4.6:</div><div><ol><li>Select <a href="http://docs.win-test.com/wiki/Menu:Options#Script_Editor_Configuration">Options | Script editor configuration</a> and define your favorite text editor as shown</li>

<li>In the logging Window, type SCRIPTS [Enter] (this is the text command shortcut for <a href="http://docs.win-test.com/wiki/Menu:Tools#Scripts_Manager">Tools | Scripts manager</a>)</li><li>Click [New]</li><li>Give the new script a meaningful name like <b>LongCQ</b> and press [Enter]</li>

<li>This will launch your text editor, editing LongCQ.wts (.wts = Win-Test script)</li><li>Add one line:<br><font class="Apple-style-span" face="'courier new', monospace">wtKeyer:Play("CQ CQ $MYCALL $MYCALL")</font><br>

and save the file.</li><li>Back in the Scripts manager, highlight <b>LongCQ</b> by clicking on it with the mouse, then click on the [Properties] button</li><li>Click the [Define...] button</li><li>When prompted for a key assignment, press [F8]</li>

<li>Click [OK]</li><li>Click  [OK] again to close the scripts manager</li><li>Press [F8] and your long CQ will be sent</li><li>Repeat steps 3 to 11 for any message you would like to program to any key combination you like, including Shift-F1 to Shift-F12 and Alt-F1 to Alt-F12.  Script key assignments <i>override</i> the default Win-Test key assignment as well as anything you have remapped using Tools | Redefine keyboard keys.<br>

</li></ol><div>Note:  It's best not to use keys that are already used by Win-Test for other functions, unless you are sure you won't need them in a particular contest.  The best way to find out how a key is used by Win-Test is to search for it in the <a href="http://download.win-test.com/docs/en/manual.pdf">PDF manual</a>.</div>

</div><div><br></div><div>Just about anything you can do with several keypresses in Win-Test can be automated via a Lua script.  The APIs are partially documented <a href="http://docs.win-test.com/wiki/API">in the Wiki</a> and more fully documented <a href="http://download.win-test.com/v4/lua/LuaApiDoc.txt">here</a>.</div>

<div><br></div><div>If you would prefer to code all of your CW messages in a <i>dialog</i> that you can easily change in the middle of a contest, rather than "hard coding" them in a script file, program up to 12 in the <a href="http://docs.win-test.com/wiki/Menu:Options#Modify_additional_messages...">Alt-C "additional" messages dialog</a>.  To invoke them with a single keystroke, create a one-line script for each message:</div>

<br>AltC_F1.wts:</div><div class="gmail_quote"><font class="Apple-style-span" face="'courier new', monospace">wtKeyer:PlayAdditionalMsg(1)</font><br><br></div><div class="gmail_quote">AltC_F2.wts:</div><div class="gmail_quote">

<span class="Apple-style-span" style="font-family: 'courier new', monospace; ">wtKeyer:PlayAdditionalMsg(2)</span></div><div class="gmail_quote">...</div><div class="gmail_quote">AltC_F3.wts:</div><div class="gmail_quote">

<span class="Apple-style-span" style="font-family: 'courier new', monospace; ">wtKeyer:PlayAdditionalMsg(2)</span></div><div class="gmail_quote"><br></div><div class="gmail_quote">And assign each script to Alt-F1 to Alt-F12 or whatever key you prefer.</div>

<div class="gmail_quote"><br></div><div class="gmail_quote">73,</div><div class="gmail_quote">Bob, N6TV</div>