Difference between revisions of "Menu:Tools"

From Win-Test Wiki
Jump to navigation Jump to search
 
(38 intermediate revisions by 3 users not shown)
Line 14: Line 14:
  
 
You may want to use the text commands '''<tt>NORPT</tt>''' or '''<tt>RPT</tt>''' to deactivate and later reactivate that function.
 
You may want to use the text commands '''<tt>NORPT</tt>''' or '''<tt>RPT</tt>''' to deactivate and later reactivate that function.
 +
Optionally, you may chose that only the Escape key deactivates the repeat function by clicking the appropriate option in the context menu
 +
or by '''<tt>RPTESCONLY</tt>''' and '''<tt>NORPTESCONLY</tt>''' text commands.
  
 
==Intelligent Quick QSL...==
 
==Intelligent Quick QSL...==
Use the [[Text commands|text command]] '''<tt>QUICKQSL</tt>''' to get to this menu quickly.
+
Use the [[Text commands|text command]] '''<tt>QUICKQSL</tt>''' to get to this menu quickly. Use '''<tt>QQSLON</tt>''' / '''<tt>QQSLOFF</tt>''' or '''<tt>QQSL</tt>''' / '''<tt>NOQQSL</tt>''' text commands to enable (or disable) the Quick QSL feature.
  
 
This option controls the content of the two message variables '''<tt>$QQSLT</tt>''' and '''<tt>$QQSLC</tt>'''. When used, these variables change their content after so and so many seconds or when a number of QSOs have been logged. That way you can send a short QSL message to confirm the QSO in a pileup, but make sure your full callsign gets transmitted automatically every 2 minutes or every 5 QSOs only. So while most QSOs would be completed with '''<tt>TU</tt>''' or '''<tt>EE</tt>''' sometimes we would send a message like '''<tt>TU F5MZN</tt>'''.
 
This option controls the content of the two message variables '''<tt>$QQSLT</tt>''' and '''<tt>$QQSLC</tt>'''. When used, these variables change their content after so and so many seconds or when a number of QSOs have been logged. That way you can send a short QSL message to confirm the QSO in a pileup, but make sure your full callsign gets transmitted automatically every 2 minutes or every 5 QSOs only. So while most QSOs would be completed with '''<tt>TU</tt>''' or '''<tt>EE</tt>''' sometimes we would send a message like '''<tt>TU F5MZN</tt>'''.
Line 59: Line 61:
  
 
{{wbox|NOTE|Remapped keys are ignored in [[Menu:Commands#Keyboard_mode|keyboard mode]] unless you enable the CW Option [[Menu:Options#Remap_keys_in_keyboard_mode|Remap keys in keyboard mode]].  It is generally a good idea to enable this option so that all message keys work the same, whether you are in keyboard mode or not.}}
 
{{wbox|NOTE|Remapped keys are ignored in [[Menu:Commands#Keyboard_mode|keyboard mode]] unless you enable the CW Option [[Menu:Options#Remap_keys_in_keyboard_mode|Remap keys in keyboard mode]].  It is generally a good idea to enable this option so that all message keys work the same, whether you are in keyboard mode or not.}}
 +
 +
====Remapping [*] and [+] when using Notebook or Mini keyboard====
 +
By default, the asterisk key '''<tt>[*]</tt>''' is used to switch active radios, and the plus key '''<tt>[+]</tt>''' is used to send "TU" and log a QSO.  These keys are located on the numeric keypad of a full-sized keyboard.  Win-Test does ''not'' treat these keys the same as '''<tt>Shift-[*]</tt>''' and '''<tt>Shift-[+]</tt>''', which is what you would normally press when typing text.
 +
 +
If you are using a Notebook, Laptop or "mini" keyboard without a separate numeric keypad on the right side, equivalent keys with special colored symbols become active only when you press the '''<tt>[NumLock]</tt>''' key.  One of these keys should be labeled with an asterisk in a different color, and another should be the plus.  For example, on a U.S. ThinkPad keyboard, the colored asterisk may be located on the '''<tt>[P]</tt>''' key, and the colored plus may be shared with the '''<tt>[/]</tt>''' key.  Those are the keys to use when remapping, after activating Num Lock mode.
 +
 +
For example, to make Ctrl-S act as the "Switch Active Radio" key when using a keyboard without a numeric keypad:
 +
 +
# Press the '''<tt>[Add]</tt>''' button
 +
# Press '''<tt>[Ctrl-S]</tt>'''
 +
# Press '''<tt>Shift-[NumLock]</tt>''' to enter Num Lock mode
 +
# Press the key that does the function of the asterisk when in Num Lock mode, perhaps the letter P?
 +
# Press '''<tt>Shift-[NumLock]</tt>''' again to exit Num Lock mode
 +
 +
If a single asterisk '''<tt>*</tt>''' appears in the New Keys column as shown below, the key has been correctly defined.  If it says '''<tt>Shift *</tt>''' or something else, it has not.
 +
 +
[[Image:ToolsRedefineKeyboard2.png|center|frame|Redefine Keyboard Keys, with function of ASTERISK and PLUS keys properly re-assigned to other keys.]]
 +
 +
====QWERTY and AZERTY Keyboards====
 +
French (and some Begian) users: Button added in the keys redefinitions dialog to load AZERTY redefinitions that allow the AZERTY keyboards users to access the numbers located on the top row without using the Shift or Shift Lock keys. They allow direct access to the ?, . and / keys of the bottom row as well. This button is displayed only when the language is set to French.
  
 
==Data entry==
 
==Data entry==
Line 76: Line 98:
 
Please refer also to [[Database_Files#Setting_up_Exchange_Guessing_in_Win-Test| Setting up Exchange Guessing in Win-Test]] to know how to activate this feature for a specific contest.
 
Please refer also to [[Database_Files#Setting_up_Exchange_Guessing_in_Win-Test| Setting up Exchange Guessing in Win-Test]] to know how to activate this feature for a specific contest.
  
'''Note:''' CQ zones in the USA and Russia will be guessed correctly (well, 99%) only when you have loaded F5IN's '''<tt>CTY_WT_MOD.DAT</tt>''' file. Otherwise Win-Test will always come up with the default zone of that country (5 for USA, 17 for UA9 and UA0). Please see [[Menu:Options#Data_files|Data files]] for more details on how to select the right '''<tt>CTY</tt>''' file.
+
{{wbox|Note|CQ zones in the USA and Russia will be guessed correctly (well, 99%) only when you have loaded F5IN's '''<tt>CTY_WT_MOD.DAT</tt>''' file. Otherwise Win-Test will always come up with the default zone of that country (5 for USA, 17 for UA9 and UA0). Please see [[Menu:Options#Data_files|Data files]] for more details on how to select the right '''<tt>CTY</tt>''' file.}}
  
 
===Callsign check===
 
===Callsign check===
On the fly callsign pattern check based on the K1TTT callsign.pat file, described [http://www.k1ttt.net/software/bust.html here] (over 400 rules applied today).  
+
On the fly callsign pattern check based on the K1TTT callsign.pat file, described [http://www.k1ttt.net/software/bust.html here] (over 400 rules applied today).  The latest version of callsign.pat may be downloaded [http://download.win-test.com/files/extra/callsign.pat here].
  
 
Yellow text denotes a warning, red text denotes an invalid callsign.
 
Yellow text denotes a warning, red text denotes an invalid callsign.
Line 93: Line 115:
  
 
* Windows XP: '''<tt>C:\Documents and Settings\All Users\Application Data\Win-Test\extras\callsign.pat</tt>'''
 
* Windows XP: '''<tt>C:\Documents and Settings\All Users\Application Data\Win-Test\extras\callsign.pat</tt>'''
* Windows Vista: '''<tt>C:\ProgramData\Win-Test\extras\callsign.pat</tt>'''
+
* Windows Vista or Windows 7: '''<tt>C:\ProgramData\Win-Test\extras\callsign.pat</tt>'''
  
Updates may be downloaded from [http://download.win-test.com/files/extra/ http://download.win-test.com/files/extra/].
+
Updates may be downloaded from [http://download.win-test.com/files/extras/ http://download.win-test.com/files/extras/].
  
 
You are encouraged to report to the author ([http://www.qrz.com/db/k1ttt K1TTT]) any mistakes or updates needed in this file.
 
You are encouraged to report to the author ([http://www.qrz.com/db/k1ttt K1TTT]) any mistakes or updates needed in this file.
 +
 +
Callsigns which don't follow the usual rules, like RAEM, 5VDE, 7QAA, etc.) are grouped in the <b>exceptions.dat</b> file for easy updating.
  
 
===Priority===
 
===Priority===
Line 111: Line 135:
  
 
===Enable ESM===
 
===Enable ESM===
Win Test v4 comes with an Enter Sends Message (ESM) feature, well-known by users of TR (N6TR). The functionality can be turned on or off via this menue item or using the [[Text commands|text commands]] '''<tt>ESM/NOESM</tt>'''.
+
Win Test v4 comes with an Enter Sends Message (ESM) feature, well-known by users of TR LOG by N6TR. The functionality can be turned on or off via this menue item or using the [[Text commands|text commands]] '''<tt>ESM/NOESM</tt>'''.
  
 
ESM relies on the following messages assignation:
 
ESM relies on the following messages assignation:
Line 135: Line 159:
  
 
Once ESM is enabled, the ['''<tt>Enter</tt>'''] key '''can no longer''' be used to silently log a QSO. The key combination ['''<tt>Ctrl+Plus</tt>'''] has been introduced and added for this purpose.
 
Once ESM is enabled, the ['''<tt>Enter</tt>'''] key '''can no longer''' be used to silently log a QSO. The key combination ['''<tt>Ctrl+Plus</tt>'''] has been introduced and added for this purpose.
 +
 +
When using the SO2R advanced technique, the scenarios messages are used instead of the standard.
 +
 +
===Disable CW cut numbers translation===
 +
Allows to completely disable Win-Test's intelligent translation of cut numbers like '''TTA''' to '''001'''.
 +
Note that this translation is performed on a contest and worked station contextual basis. The equivalent [[Text_commands|text commands]] are '''<tt>CUTON</tt>''' and '''<tt>CUTOFF</tt>'''. Do not mix up with '''<tt>CUT/NOCUT</tt>''' that are reserved for CW cut numbers generation !
  
 
===Remap Slash to /P===
 
===Remap Slash to /P===
Line 151: Line 181:
 
* It is possible to configure WT to automatically populate the Band Map and wipe the data entry area whenever the operator changes the radio's frequency, if Search & Pounce mode is activated on that radio. This can be configured from the [[Menu:Windows#Band_Map_properties|Band Map Properties dialog]] (right click in the Band Map window).  
 
* It is possible to configure WT to automatically populate the Band Map and wipe the data entry area whenever the operator changes the radio's frequency, if Search & Pounce mode is activated on that radio. This can be configured from the [[Menu:Windows#Band_Map_properties|Band Map Properties dialog]] (right click in the Band Map window).  
  
'''Note:''' Search & Pounce is not activated by default.  To automatically populate the Band Map, you must switch to S&P mode.
+
{{wbox|Note|Search & Pounce is not activated by default.  To automatically populate the Band Map, you must switch to S&P mode.}}
  
'''Note:''' When switching from Run to S&P mode, Auto CQ and Auto CW Sending are automatically disabled.
+
{{wbox|Note|When switching from Run to S&P mode, Auto CQ and Auto CW Sending are automatically disabled.}}
  
 
===Switch keyboard...===
 
===Switch keyboard...===
Line 160: Line 190:
 
Keyboard switching for international teams with different keyboards. It is enabled only if several keyboards
 
Keyboard switching for international teams with different keyboards. It is enabled only if several keyboards
 
are installed on your system. You can also access this dialog by entering the text commands '''<tt>KEYBOARD</tt>''' or '''<tt>KEYB</tt>''' for short.
 
are installed on your system. You can also access this dialog by entering the text commands '''<tt>KEYBOARD</tt>''' or '''<tt>KEYB</tt>''' for short.
 +
 +
==Countdown timer...==
 +
The countdown timer indicates exactly when the single operator can start operating again after a break. It's based on the time of the last QSO entered in the log, truncated to the minute.
 +
 +
[[Image:ToolsCountdownTimer1.PNG|center|frame|Countdown timer to plan breaks.]]
 +
 +
[[Image:ToolsCountdownTimer2.PNG|center|frame|When running, it displays minutes when operation can commence.]]
 +
 +
You can also use the text command '''<tt>TIMER/nnHmmM</tt>'''' or '''<tt>TIMER/nnHmm</tt>''' (meaning nn hours and mm minutes), or '''<tt>TIMER/xxH</tt>''' (nn hours) or '''<tt>TIMER/nnM</tt>''' (nn minutes) to set and start the timer automatically.
  
 
==Scripts Manager==
 
==Scripts Manager==
Allows to edit, create, delete or rename scripts. It's also used to assign a key and/or an argument to a script. Scripts are to be created and maintained by the user using the Lua programming language. For a reference of the Lua programming language, see http://www.lua.org/manual/5.1/.
+
Allows to edit, create, delete or rename scripts. It's also used to assign a key and/or an argument to a script. Scripts are to be created and maintained by the user using the Lua programming language. See the [[API|Win-test Lua API]].  For a reference of the Lua programming language, see [http://www.lua.org/manual/5.1/ http://www.lua.org/manual/5.1/].  Sample Lua scripts demonstrating how to control the RIT and internal DVR (voice keyer) of the Elecraft K3 and other radios may be downloaded from [http://bit.ly/wtscripts http://bit.ly/wtscripts].
  
 
[[Image:ToolsScriptManager.PNG|center|frame|The Win-Test Scripts Manager to edit, create, delete or rename WTS scripts]]
 
[[Image:ToolsScriptManager.PNG|center|frame|The Win-Test Scripts Manager to edit, create, delete or rename WTS scripts]]
  
The scripting language gives the user the unique possibility to achieve dynamic tasks in WT. And it also offers the possibility to share your work with other WT users who don't have time or skill to build it.
+
You may also use the [[Text commands|text command]] '''<tt>SCRIPTS</tt>''' to open the scripts manager.
 +
 
 +
By double-clicking an existing script, the default Editor is opened. Ctrl + Double click brings up the properties dialog.
  
ESM is the first area in Win-Test where the scripting language Lua is used. The ESM function itself is a Lua script, embedded in Win-Test (not modifiable). But, it has been designed to be totally overriden by a user-written script if wanted. That means you can write and use you own script to replace some ESM actions, or even to totally override the
+
Before you can modify scripts, you must configure an [[Menu:Options#Script_Editor_Configuration|appropriate script editor]]. Per Default, Win-Test uses the SciTE Editor, which can be optionally installed. It does context sensitive highlighting, syntax checking etc. If you are only writing a simple script, Windows notepad.exe is probably sufficient.
embedded script.
 
  
How to do this? The minimum requirement is to know some basics of programming. The Lua syntax is '''very''' easy, almost simplistic for easy tasks. If you're comfortable with '''any''' programming language, you will learn Lua in minutes, at least for basic scripting involved in Win-Test. Several WT API/functions are provided to allow actions.  
+
===Introduction===
 +
The Win-Test scripting language gives the user the unique ability to achieve dynamic tasks in Win-Test. It also provides a way to share your work with other Win-Test users who don't have time or skill to write their own scripts.
  
===List of Win-Test API/Functions and Constants===
+
ESM (Enter Sends Message) was the first Win-Test application where the scripting language '''Lua''' was used. The ESM function itself is a Lua script, embedded in Win-Test (not modifiable). But, it has been designed to be totally overridden by a user-written script if desired, i.e., you can write and use you own modified version of the ESM script to change the default ESM actions.  See [[API#ESM_Script_.28embedded_into_Win-Test.29|ESM Script (embedded into Win-Test)]] for the LUA source code.
Compiled from a message on the WT reflector by F6FVY on October 7, 2009.
 
  
====Class wtApp====
+
To do this, the minimum requirement is to know some basics of a programming language. The Lua syntax is '''very''' simple for doing easy tasks. If you're comfortable with '''any''' programming language, you will learn Lua in minutes, at least for basic scripting involved in Win-Test. Many Win-Test API (Application Programming Interface) functions are provided to control various Win-Test features.
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show;"
 
|-
 
| '''<tt>wtApp:AlertBox(Text)</tt>'''
 
| Opens a standard Windows alert box with text.
 
|-
 
| '''<tt>wtApp:CallScript(strScript)</tt>'''
 
| Call a wts script (no extension required in strScript). Can return a number only (or nothing)
 
|-
 
| '''<tt>wtApp:GetKeyState</tt>'''
 
| Returns the modifers keys status when the function is called.
 
|-
 
| '''<tt>wtApp:InputInteger(Prompt, Title, Default)</tt>'''
 
| If Title or Prompt is empty, a default text is used
 
|-
 
| '''<tt>wtApp:InputNumber(Prompt, Title, Default)</tt>'''
 
| If Title or Prompt is empty, a default text is used
 
|-
 
| '''<tt>wtApp:InputText(Prompt, Title, Default)</tt>'''
 
| If Title or Prompt is empty, a default text is used
 
|-
 
| '''<tt>wtApp:IsPostKeyProcess()</tt>'''
 
| Return true if the current script is executed after the assigned key has been processed by WT, and false otherwise
 
|-
 
| '''<tt>wtApp:MessageBox(Text, Type, Title)</tt>'''
 
| Create a Message box. Return the button pressed to exit the message (can be ignored).
 
|-
 
| '''<tt>wtApp:SendAltKey(Key)</tt>'''
 
| Key is a letter, a number, or a function key ("F1".."F12" + "Insert" + "Plus" + "Esc")
 
|-
 
| '''<tt>wtApp:SendCtrlKey(Key)</tt>'''
 
| Key is a letter, a number, or a function key ("F1".."F12" + "Insert" + "Plus" + "Esc")
 
|-
 
| '''<tt>wtApp:SendFKey(Key)</tt>'''
 
| Send Functions keys (and Insert and Plus). Key is one of "F1".."F12" + "Insert" + "Plus" + "Esc". Modifier Keys (optional) indicates the modifier keys (Ctrl = 4, Alt = 2, Shift = 1, None = 0 - Can be combined). If this argument is missing or -1, the current modifiers keys are used.
 
|-
 
| '''<tt>wtApp:SendKeyCode(Code [, Modifier Keys])</tt>'''
 
| Send a key by its ASCII code. Keycode is an ASCII code. Modifier Keys (optional) indicates the modifier keys (Ctrl = 4, Alt = 2, Shift = 1, None = 0 - Can be combined). If this argument is missing or -1, the current modifiers keys are used
 
|-
 
| '''<tt>wtApp:SetWindowColor(ChildWndId, nRed, nGreen, nBlue, nColorIndex)</tt>'''
 
| Set the nColorIndex color of the child window designated by its windowID (see the wtConstants list). If ChildWndId is < 0, it applies to the main window. If nColorIndex is omitted (or set to 0), it applies to the background color All colors must be <= 255.
 
|-
 
| '''<tt>wtApp:ShowWindow(ChildWndId)</tt>'''
 
| Show the child window designated by its windowID (see the wtConstants list)
 
|-
 
| '''<tt>wtApp:Sleep(Time)</tt>'''
 
| Time expressed in milliseconds.
 
|-
 
| '''<tt>wtApp:TextCommand(Text)</tt>'''
 
| Send WT text command to application
 
|-
 
| '''<tt>wtApp:ToggleWindow(ChildWndId)</tt>'''
 
| Toggle the child window designated by its windowID (see the wtConstants list)
 
|-
 
| '''<tt>wtApp:WizzWindow(ChildWndId)</tt>'''
 
| Wizz the child window designated by its windowID (see the wtConstants list)
 
|-
 
|}
 
  
 +
For a list of Win-Test API Functions and Constants, see [[API]].
  
====Class wtContest====
+
===# Notation===
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show;"
+
Scripts can either by called by pressing a key or from within a CW or RTTY message. For this, you must use the '''<tt>#SCRIPTNAME(ARGUMENT)</tt>''' notation. The argument (and parenthesis) are optional. The script will be called synchronously, but is executed in the main thread, meaning that it is not blocking the CW/RTTY stream.
|-
 
| '''<tt>wtContest:IsExchangeRequired()</tt>'''
 
| Return a boolean. True if the current contest requires an exchange (associated with RST)
 
|-
 
| '''<tt>wtContest:GetContestId()</tt>'''
 
| Return the current contestID
 
|-
 
|}
 
  
====Class wtKeyer====
+
For example :
  
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show;"
+
  TU N6TV #CLEARRIT 
|-
 
| '''<tt>wtKeyer:GetCwSpeed()</tt>'''
 
| Return the CW speed in wpm (return 0 in case of error).
 
|-
 
| '''<tt>wtKeyer:Play(Message)</tt>'''
 
| Message is a plain string to be played, a saved message ('''<tt>$F1</tt>''' etc.) or a variable ('''<tt>$xxx</tt>''')
 
|-
 
| '''<tt>wtKeyer:SetCwSpeed(Speed)</tt>'''
 
| Set CW speed in wpm.
 
|-
 
| '''<tt>wtKeyer:Stop()</tt>'''
 
| Stop the current message
 
|-
 
|}
 
  
====Class wtOp====
+
assuming your script is called '''<tt>CLEARRIT.wts</tt>''' - or
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show;"
 
|-
 
| '''<tt>wtOp:GetCallsign()</tt>'''
 
| Return the current op callsign
 
|-
 
| '''<tt>wtOp:GetNick()</tt>'''
 
| Return the current op nick
 
|-
 
|}
 
  
====Class wtQso====
+
  TU #QSYUP(200)
  
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show;"
+
assuming you created a script named '''<tt>QSYUP.wts</tt>''' to QSY up '''<tt>wtArgument</tt>''' Hz after a QSO.
|-
 
| '''<tt>wtQso:IsCallsignEmpty()</tt>'''
 
| Return a boolean : True if the callsign field of the active QSO is empty
 
|-
 
| '''<tt>wtQso:IsCallsignIncomplete()</tt>'''
 
| Return a boolean : True if the callsign field of the active QSO contains a "?"
 
|-
 
| '''<tt>wtQso:IsExchangeEmpty()</tt>'''
 
| Return a boolean : True if the exchange field of the active QSO is empty
 
|-
 
| '''<tt>wtQso:IsExchangeSent()</tt>'''
 
| Return a boolean : True if the exchangeSent flag of the active QSO is set
 
|-
 
| '''<tt>wtQso:SetExchangeSent()</tt>'''
 
| Set the exchangeSent flag of the active QSO (see '''<tt>wtQso::IsExchangeSent()</tt>''') - Similar to the use of '''<tt>$SETEXCHSENT</tt>'''
 
|-
 
| '''<tt>wtQso:ResetExchangeSent()</tt>'''
 
| Reset the exchangeSent flag of the active QSO (see '''<tt>wtQso::IsExchangeSent()</tt>''') - Similar to the use of '''<tt>$RSTEXCHSENT</tt>'''
 
|-
 
| '''<tt>wtQso:ClearStatus()</tt>'''
 
| Clear the status flags of the active QSO
 
|-
 
| '''<tt>wtQso:GetModeId()</tt>'''
 
| Return the mode ID of the active Qso
 
|-
 
| '''<tt>wtQso:IsCallsignRepeated()</tt>'''
 
| Return a boolean. True if the callsign hasn't changed since the last Enter
 
|-
 
| '''<tt>wtQso:IsOperatingModeRun()</tt>'''
 
| Return a boolean. True if the operating mode of the active QSO is RUN (and False if S&P)
 
|-
 
| '''<tt>wtQso:IsModePhone()</tt>'''
 
| Return a boolean. True if the mode of the active QSO is Phone (SSB and FM), and False otherwise
 
|-
 
| '''<tt>wtQso:IsQsoApproved()</tt>'''
 
| Return a boolean. True if all requested fields of the active QSO are filled (contest dependent)
 
|-
 
| '''<tt>wtQso:IsDupe()</tt>'''
 
| Return a boolean. True if the current callsign is a dupe
 
|-
 
| '''<tt>wtQso:IsCurrentFieldCallsign()</tt>'''
 
| Return a boolean : True if the current field is the callsign field
 
|-
 
| '''<tt>wtQso:IsCurrentFieldExchange()</tt>'''
 
| Return a boolean : True if the current field is an exchange field
 
|-
 
| '''<tt>wtQso:IsCurrentFieldOther()</tt>'''
 
| Return a boolean : True if the current field is not the callsign field or an exchange field
 
|-
 
| '''<tt>wtQso:IsCurrentFieldEmpty()</tt>'''
 
| Return a boolean : True if the current field is empty (except RST for the exchange field)
 
|-
 
| '''<tt>wtQso:IsCurrentFieldPrimaryRadio()</tt>'''
 
| Return a boolean : True if the current field is in the primary radio (main log)
 
|-
 
| '''<tt>wtQso:IsCurrentFieldSecondryRadio()</tt>'''
 
| Return a boolean : True if the current field is in the secondary radio
 
|-
 
|}
 
  
====Class wtRadio*====
+
===Calling Scripts via Text Command===
 +
Scripts may be triggered using a Text Command. '''<tt>SCRIPT.wts</tt>''' can be executed by entering '''<tt>SCRIPT</tt>''' in the callsign field.
  
The following functions can apply to:
+
An argument can be passed to the script by expanding it with a slash.  '''<tt>SCRIPT/5</tt>''' will call '''<tt>SCRIPT.wts</tt>''' and pass
'''<tt>wtRadio</tt>''' (the active one),
+
the parameter "5" in the '''<tt>wtArg</tt>''' global variable. The argument is always passed as a string when the script is called from a text command. If no argument is specified, the default argument defined in the script manager will be used (if any).
'''<tt>wtRadioInactive</tt>''' (the non-active one),
 
'''<tt>wtRadioPrimary</tt>''' (the one that is in the main log wnd)
 
'''<tt>wtRadioSecondary</tt>''' (the one that is in the secondary log wnd)
 
'''<tt>wtRadio1</tt>''' and '''<tt>wtRadio2</tt>'''
 
  
WARNING: Some functions may not work because of the CAT protocol or radio hardware limitations.
+
===Automatically Executed Scripts===
 +
Some scripts are being executed automatically, whenever a specific event occurs.
  
 
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show;"
 
{| border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show;"
 
|-
 
|-
| '''<tt>wtRadio*GetFreq()</tt>'''
+
| '''<tt>onFileOpen.wts</tt>'''
| Return freq of the active VFO of the designated radio freq is expressed in kHz
+
| Executed when .wt4 file is opened
 
|-
 
|-
| '''<tt>wtRadio*GetFreq(NVfo)</tt>'''
+
| '''<tt>onFileClose.wts</tt>'''
| Return freq of the designated VFO (0 => VFO A, 1 => VFO B) of the designated radio freq is expressed in kHz
+
| Executed when .wt4 file is closed
 
|-
 
|-
| '''<tt>wtRadio*GetFreqInactiveVfo()</tt>'''
+
| '''<tt>onMicrohamFsOn.wts</tt>'''
| Return freq of the inactive VFO of the designated radio freq is expressed in kHz
+
| Executed, when microHAM footswitch is pressed
 
|-
 
|-
| '''<tt>wtRadio*SetFreq(freq)</tt>'''
+
| '''<tt>onMicrohamFsOff.wts</tt>'''
| Set freq of the active VFO of the designated radio freq is expressed in kHz
+
| Executed, when microHAM footswitch is released
 
|-
 
|-
| '''<tt>wtRadio*SetFreq(freq, nVfo)</tt>'''
+
| '''<tt>onOtrspCrOn.wts</tt>'''
| Set freq of the designated VFO (0 => VFO A, 1 => VFO B) of the designated radio freq is expressed in kHz
+
| Executed, when OTRSP control has value 1
 
|-
 
|-
| '''<tt>wtRadio*SetFreqInactiveVfo(freq)</tt>'''
+
| '''<tt>onOtrspCrOff.wts</tt>'''
| Set freq of the inactive VFO of the designated radio freq is expressed in kHz
+
| Executed, when OTRSP control has value 0
 
|-
 
|-
| '''<tt>wtRadio*SetFreqSubVfo(freq)</tt>'''
+
| '''<tt>onOtrspCrEvent.wts</tt>'''
| Set freq of the sub VFO of the designated radio freq is expressed in kHz
+
| Executed, for all states of OTRSP events
|-
 
| '''<tt>wtRadio*SetSplit(freq)</tt>'''
 
| Set split ON and the split frequency on the designated radio freq is expressed in kHz
 
|-
 
| '''<tt>wtRadio*ResetSplit()</tt>'''
 
| Reset split on the designated radio
 
|-
 
| '''<tt>wtRadio*IsSplit()</tt>'''
 
| Return false or true whether the split is set or not on the designated radio
 
|-
 
| '''<tt>wtRadio*GetRadioId()</tt>'''
 
| Return the radioID (0 => RADIO_1, 1 => RADIO_2) of the designated radio
 
|-
 
| '''<tt>wtRadio*Send(catString)</tt>'''
 
| Send the ASCII catString to the designated radio
 
|-
 
| '''<tt>wtRadio*SendHex(hexString)</tt>'''
 
| Send the hexString to the designated radio. The hexString must contain only 0-9 and A-F characters and must have an even length. Ex "02DFA8" etc.
 
 
|-
 
|-
 
|}
 
|}
  
 +
===Synchronous vs. asynchronous - the #@ Notation===
 +
The scripts calls in the CW or RTTY messages are synchronous to the CW or the RTTY streams. To execute them asynchronously, they
 +
can be called with the #@ notation. Example:
  
====Win-Test Constants====
+
-- script.wts
Constants are not guaranteed to remain constant in Lua. The name of the constant could be accidentally reassigned to refer to some other object or value. Unfortunately, there is no easy way to generate code that prevents this. You will just have to be careful.
+
wtApp:AlertBox("Hello World!");
 
 
=====Child windows IDs=====
 
<pre>
 
WT_WND_SUMMARY = 0;
 
WT_WND_GRIDSQUAREMAP = 1;
 
WT_WND_CHECKPARTIAL = 2;
 
WT_WND_RATESHEET = 3;
 
WT_WND_CLOCK = 4;
 
WT_WND_VUMETER = 5;
 
WT_WND_RATE = 6;
 
WT_WND_GAB = 7;
 
WT_WND_MAP = 8;
 
WT_WND_CHECKCOUNTRY = 9;
 
WT_WND_ZONE = 10;
 
WT_WND_MULT = 11;
 
WT_WND_NP1 = 12;
 
WT_WND_RADIO1 = 13;
 
WT_WND_RADIO2 = 14;
 
WT_WND_PACKETCLUSTER = 15;
 
WT_WND_DXCLUSTERANN = 16;
 
WT_WND_SOLAR = 17;
 
WT_WND_PILEUP = 18;
 
WT_WND_STATUS = 19;
 
WT_WND_SKED = 20;
 
WT_WND_CHECKCALL = 21;
 
WT_WND_SECONDARYRADIO = 22;
 
WT_WND_RTTY1 = 23;
 
WT_WND_RTTY2 = 24;
 
WT_WND_QSYWIZARD = 25;
 
WT_WND_EXTRAINFO = 26;
 
WT_WND_ZONE2 = 27;
 
WT_WND_ROTATORS = 28;
 
WT_WND_CONTESTRECORDER = 29;
 
</pre>
 
 
 
=====Supported contests IDs=====
 
<pre>
 
WT_CONTEST_IARU_VHF = 1;
 
WT_CONTEST_IARU_UHF = 2;
 
WT_CONTEST_IARU_CW = 3;
 
WT_CONTEST_IARU_HF = 4;
 
WT_CONTEST_IARU_R1_50MHZ = 5;
 
WT_CONTEST_REF_THF = 10;
 
WT_CONTEST_REF_DDFM_50MHZ = 11;
 
WT_CONTEST_THF_EU = 20;
 
WT_CONTEST_THF_EU_50_70 = 21;
 
WT_CONTEST_THF_EU_GRIDSQUARE = 30;
 
WT_CONTEST_THF_EU_GRIDSQUARE_50_70 = 31;
 
WT_CONTEST_THF_EU_GRIDSQUARE_NO_DIST = 32;
 
WT_CONTEST_THF_EU_GRIDSQUARE_NO_DIST_50_70 = 33;
 
WT_CONTEST_REF_HF = 100;
 
WT_CONTEST_ARRL_DX = 101;
 
WT_CONTEST_ARRL_10 = 102;
 
WT_CONTEST_ARRL_160 = 103;
 
WT_CONTEST_ARRL_SWEEPSTAKES = 104;
 
WT_CONTEST_ARRL_FD = 105;
 
WT_CONTEST_ARRL_RU = 106;
 
WT_CONTEST_ARRL_UHF_AUG = 130;
 
WT_CONTEST_ARRL_VHF_JAN = 131;
 
WT_CONTEST_ARRL_VHF_JUN = 132;
 
WT_CONTEST_ARRL_VHF_SEP = 133;
 
WT_CONTEST_REF_160 = 150;
 
WT_CONTEST_CQWW_DX = 200;
 
WT_CONTEST_CQWW_WPX = 201;
 
WT_CONTEST_CQWW_160 = 202;
 
WT_CONTEST_CQWW_VHF = 250;
 
WT_CONTEST_RDXC = 300;
 
WT_CONTEST_RDAC = 301;
 
WT_CONTEST_CIS = 302;
 
WT_CONTEST_R_160 = 303;
 
WT_CONTEST_RRTC = 304;
 
WT_CONTEST_RAEM = 305;
 
WT_CONTEST_DXPEDITION_HF = 400;
 
WT_CONTEST_DXPEDITION_VHF = 410;
 
WT_CONTEST_ALL_ASIAN = 500;
 
WT_CONTEST_SPDXC = 600;
 
WT_CONTEST_JIDX = 700;
 
WT_CONTEST_KCJ = 701;
 
WT_CONTEST_KCJ_TOPBAND = 702;
 
WT_CONTEST_YUDXC = 800;
 
WT_CONTEST_CQM = 900;
 
WT_CONTEST_ARI = 1000;
 
WT_CONTEST_ARI_SEZIONI = 1001;
 
WT_CONTEST_ARI_40_80 = 1002;
 
WT_CONTEST_BALTIC = 1100;
 
WT_CONTEST_KING_OF_SPAIN = 1200;
 
WT_CONTEST_IOTA = 1300;
 
WT_CONTEST_RSGB_160 = 1301;
 
WT_CONTEST_RSGB_80_CC = 1302;
 
WT_CONTEST_RSGB_CMW = 1303;
 
WT_CONTEST_RSGB_15_10 = 1304;
 
WT_CONTEST_RSGB_AFS = 1305;
 
WT_CONTEST_WAEDC = 1400;
 
WT_CONTEST_WAG = 1401;
 
WT_CONTEST_DARC_XMAS = 1402;
 
WT_CONTEST_DARC_10 = 1403;
 
WT_CONTEST_YODXC = 1500;
 
WT_CONTEST_EU_HF = 1600;
 
WT_CONTEST_SCC = 1601;
 
WT_CONTEST_OCDXC = 1700;
 
WT_CONTEST_TOECC = 1800;
 
WT_CONTEST_SAC = 1900;
 
WT_CONTEST_NRAU_BALTIC = 1901;
 
WT_CONTEST_NAC = 1902;
 
WT_CONTEST_SARTG = 1903;
 
WT_CONTEST_QP_TX = 2000;
 
WT_CONTEST_EU_SPRINT = 2100;
 
WT_CONTEST_UKDXC = 2200;
 
WT_CONTEST_OKOMDXC = 2300;
 
WT_CONTEST_STEW_PERRY = 2400;
 
WT_CONTEST_GACW_DX = 2401;
 
WT_CONTEST_NINE_KCC_15 = 2402;
 
WT_CONTEST_FOC_MARATHON = 2403;
 
WT_CONTEST_LOTW = 2404;
 
WT_CONTEST_AP_SPRINT = 2405;
 
WT_CONTEST_JARTS = 2406;
 
WT_CONTEST_MARCONI_HF = 2407;
 
WT_CONTEST_LZDX = 2500;
 
WT_CONTEST_CROATIAN_CW = 2600;
 
WT_CONTEST_UBADX = 2700;
 
WT_CONTEST_UBA_SPRING_80M = 2701;
 
WT_CONTEST_UBA_SPRING_6M = 2702;
 
WT_CONTEST_UBA_SPRING_2M = 2703;
 
WT_CONTEST_ON_80M = 2704;
 
WT_CONTEST_ON_6M = 2705;
 
WT_CONTEST_ON_2M = 2706;
 
WT_CONTEST_RAC_DAY = 2800;
 
WT_CONTEST_RAC_WINTER = 2801;
 
WT_CONTEST_PACC = 2900;
 
WT_CONTEST_HELVETIA = 3000;
 
WT_CONTEST_HELVETIA_VHF = 3001;
 
WT_CONTEST_IARU_FD_R1_GENERIC = 3100;
 
WT_CONTEST_IARU_FD_R1_DARC = 3101;
 
WT_CONTEST_IARU_FD_R1_RSGB = 3102;
 
WT_CONTEST_UFT_HF = 3200;
 
WT_CONTEST_AGCW_HNY = 3300;
 
WT_CONTEST_HA_DX = 3400;
 
WT_CONTEST_NAQP = 3500;
 
WT_CONTEST_NA_SPRINT = 3501;
 
WT_CONTEST_NCCC_SPRINT = 3600;
 
WT_CONTEST_CQIR = 3700;
 
</pre>
 
  
=====Supported modes IDs=====
+
and the CW/RTTY message content is:
<pre>
 
WT_MODE_CW = 0;
 
WT_MODE_SSB = 1;
 
WT_MODE_RTTY = 2;
 
WT_MODE_FM = 3;
 
WT_MODE_PSK = 4;
 
WT_MODE_PKT = 5;
 
WT_MODE_HELL = 6;
 
WT_MODE_SAT = 7;
 
</pre>
 
  
=====Supported status keys IDs=====
+
AAA #SCRIPT BBB
<pre>
 
WT_KEY_SHIFT = 1;
 
WT_KEY_ALT = 2;
 
WT_KEY_CTRL = 4;
 
</pre>
 
  
=====Radio Constants=====
+
The keyer sends AAA, then "waits" until the user hits the OK button in the "Hello World!" alert box to send BBB. If the CW/RTTY message content is:
<pre>
 
WT_RADIO_MAX = 2;
 
  
WT_RADIO_VFOA = 0;
+
AAA #@SCRIPT BBB
WT_RADIO_VFOB = 1;
 
  
WT_RADIO_1 = 0;
+
The keyer sends AAA and starts the script (and the alert box is open), '''but''' it continues to key the rest of the message ("BBB") without waiting the user intervention. This is the asynchronous mode.
WT_RADIO_2 = 1;
 
</pre>
 
  
===Notes===
+
===Tips for Programming===
  
 
# Use the Scripts Manager to manage scripts, using a simple editor like Notepad. The scripts are stored in the '''{AppData}/All Users/Win-Test/scripts/''' directory.  
 
# Use the Scripts Manager to manage scripts, using a simple editor like Notepad. The scripts are stored in the '''{AppData}/All Users/Win-Test/scripts/''' directory.  
Line 609: Line 324:
 
The return value is -1 => After executing the script (the alert box will be displayed), the embedded ESM script is ignored and WT will also ignore the Enter key process (no QSO is entered).
 
The return value is -1 => After executing the script (the alert box will be displayed), the embedded ESM script is ignored and WT will also ignore the Enter key process (no QSO is entered).
  
===Advanced Examples===
+
For a collection of more advanced programming examples please see [[LUA user contributed|user contributed scripts]] and [[API#Advanced_Programming_Examples|advanced programming examples]].
 
 
====ESM Script (embedded into Win-Test)====
 
For convenience, you can find below the current ESM embedded script. Note that the real returned values are somewhat different from the ones described above, because of the nature of this script (embedded), but it is a good source of inspiration for your own masterpiece. As Lua is an interpreted language, the good news is that you can edit your script while WT is running. No need to exit WT, enter modifications, and start WT again. Just edit esm.wts while WT is running, save it, and try it immediately!
 
 
 
<pre>
 
-- v1.1 Dupes taken into account in the S&P mode
 
-- v1.0 Initial version
 
 
 
-- Send functions
 
 
 
function sendCq()
 
  wtQso:ResetExchangeSent();
 
  wtApp:SendFKey("F1");  -- Always use the function key
 
end;
 
 
 
function sendExchangeRun()
 
  if (wtQso:IsModePhone()) then
 
    wtApp:SendFKey("F2");
 
  else
 
    wtKeyer:Play("$INSERT");
 
  end;
 
  wtQso:SetExchangeSent();
 
end;
 
 
 
function sendExchangeAgain()
 
  if (wtQso:IsModePhone()) then
 
    wtApp:SendFKey("F2");
 
  else
 
    wtKeyer:Play("$F5 $F7"); -- $LOGGED ?
 
  end;
 
end;
 
 
 
function sendTu()
 
  if (wtQso:IsModePhone()) then
 
    wtApp:SendFKey("PLUS");
 
  else
 
    wtKeyer:Play("$PLUS");
 
  end;
 
  wtQso:ClearStatus();
 
end;
 
 
 
function sendQuestionMark()
 
  wtQso:ResetExchangeSent();
 
  if (wtQso:IsModePhone()) then
 
    wtApp:SendFKey("F7"); -- Again ?
 
  else
 
    wtKeyer:Play("$F7");
 
  end;
 
end;
 
 
 
function sendMyCall()
 
  if (wtQso:IsModePhone()) then
 
    wtApp:SendFKey("F4"); -- My call
 
  else
 
    wtKeyer:Play("$F4");
 
  end;
 
end;
 
 
 
function sendExchangeSAndP()
 
  if (wtQso:IsModePhone()) then
 
    wtApp:SendFKey("F2");
 
  else
 
    wtKeyer:Play("$F2");
 
  end;
 
  wtQso:SetExchangeSent();
 
end;
 
 
 
-- ESM core code
 
 
 
-- Return 0 (or return nothing) if we want the CR
 
-- to be processed also by WT (ie log QSO) and -1 if not.
 
 
 
if (wtQso:IsOperatingModeRun()) then -- Run
 
  if (wtContest:IsExchangeRequired()) then -- Usual contests
 
    if (wtQso:IsExchangeEmpty() or not wtQso:IsQsoApproved()) then
 
      if (wtQso:IsCallsignEmpty()) then
 
        sendCq();
 
      else
 
        if (wtQso:IsCallsignRepeated()) then
 
          sendExchangeAgain();
 
        else
 
          sendExchangeRun();
 
        end;
 
      end;
 
    else
 
      if (wtQso:IsExchangeSent()) then
 
        sendTu()
 
      else
 
        sendExchangeRun();
 
      end;
 
    end;
 
  else -- DXPed etc.
 
    if (not wtQso:IsQsoApproved()) then
 
      if (wtQso:IsCallsignEmpty()) then
 
        sendCq();
 
      else
 
        if (wtQso:IsCallsignRepeated()) then
 
          sendExchangeAgain();
 
        else
 
          sendExchangeRun();
 
        end;
 
      end;
 
    else
 
      if (wtQso:IsExchangeSent()) then
 
        sendTu();
 
      else
 
        sendExchangeRun();
 
      end;
 
    end;
 
  end;
 
else -- S&P : The automatic exchange fill (if enabled) is disabled by WT
 
  if ( (wtQso:IsExchangeEmpty() and wtContest:IsExchangeRequired())
 
        or not wtQso:IsQsoApproved() ) then
 
    if (wtQso:IsCallsignEmpty()) then
 
      sendQuestionMark();
 
    else
 
      if (not wtQso:IsDupe()) then -- Call only if not dupe
 
        sendMyCall();
 
      end;
 
    end;
 
  else
 
    if (wtQso:IsExchangeSent()) then
 
      wtQso:ClearStatus();
 
      return 1 -- Log it silently _Caution_ : embedded script returns 0
 
    else
 
      if (not wtQso:IsDupe()) then -- Sent exchange only if not dupe
 
        sendExchangeSAndP();
 
      end;
 
    end;
 
  end;
 
end;
 
 
 
return -1; -- This script overrides the Win-Test CR process
 
 
 
</pre>
 
 
 
====Alternative ESM Script (provided by F5VIH/SV3SJ)====
 
 
 
At the top of the script you will find a variable setting:
 
 
 
shortcq = false;
 
 
 
Setting it to true, it will convert the CQ calling and the TU part of the QSO in short forms (a la 5b4agn) and the exact contents of the messages are defined in the two lines that follow the shortcq setting. I have also added the possibility to have an exchange filled in and no call (in that case the script sends CL?)
 
 
 
I must say I am very impressed by the functionality that WT opens to the users with lua scripts. I would really like to see more API calls made available and WT functions using scripts (programmable keys, even SO2R, etc).
 
 
 
In the mean time if you have suggestions to improve the script let me know. I can easily inlcude them.
 
 
 
<pre>
 
-----------------------------------
 
-- Wintest ESM - Nick, F5VIH/SV3SJ
 
-- Set "shortCQ to true or false
 
-----------------------------------
 
 
 
shortcq = false;
 
shortCQ = "$MYCALL";
 
shortTU = "$CORRECT ++TU-- $CR";
 
 
 
-- Send functions
 
 
 
function sendCq()
 
wtQso:ResetExchangeSent();
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F1");
 
else
 
  if (shortcq) then
 
    wtKeyer:Play(shortCQ);
 
  else
 
    wtApp:SendFKey("F1");  -- Always use the function key
 
  end;
 
end;
 
end;
 
function sendExchangeRun()
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F2");
 
  wtKeyer:Play("$CR");
 
else
 
  wtKeyer:Play("$INSERT");
 
end;
 
wtQso:SetExchangeSent();
 
end;
 
 
 
function sendExchangeAgain()
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F2");
 
else
 
  wtKeyer:Play("$F5 $F7"); -- $LOGGED ?
 
end;
 
end;
 
 
 
function sendTu()
 
if (wtQso:IsModePhone()) then
 
  if (shortcq) then
 
    wtKeyer:Play("$CR");
 
    wtApp:SendFKey("F5");
 
  else
 
    wtApp:SendFKey("PLUS");
 
  end;
 
else
 
  if (shortcq) then
 
    wtKeyer:Play(shortTU);
 
  else
 
    wtKeyer:Play("$PLUS");
 
  end;
 
end;
 
wtQso:ClearStatus();
 
end;
 
 
 
function sendQuestionMark()
 
wtQso:ResetExchangeSent();
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F7"); -- Again ?
 
else
 
  wtKeyer:Play("$F7");
 
end;
 
end;
 
 
 
function sendMyCall()
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F4"); -- My call
 
else
 
  wtKeyer:Play("$F4");
 
end;
 
end;
 
 
 
function sendExchangeSAndP() -- Sends appropriate exchange when in S&P mode
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F2"); -- 5NN EXCHANGE
 
else
 
  wtKeyer:Play("$F2");
 
end;
 
wtQso:SetExchangeSent();
 
end;
 
 
 
function sendAskForCall()
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F7"); -- AGN
 
else
 
  wtKeyer:Play("CL?");
 
end;
 
end;
 
 
 
function askForNumber()
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F6"); -- NR AGN
 
else
 
  wtKeyer:Play("$F6");
 
end;
 
end;
 
 
 
function askWithPartialCall()
 
if (wtQso:IsModePhone()) then
 
  wtApp:SendFKey("F7"); -- AGN
 
else
 
  wtKeyer:Play("$F5 ?");
 
  end;
 
end;
 
 
 
-- ESM core code
 
 
 
-- Return 0 (or return nothing) if we want the CR
 
-- to be processed also by WT (ie log QSO) and -1 if not.
 
 
 
if (wtQso:IsOperatingModeRun()) then -- Run Mode
 
if (wtContest:IsExchangeRequired()) then -- Usual contests requiring an exchange
 
  if (wtQso:IsCallsignEmpty()) then
 
    if (wtQso:IsExchangeEmpty()) then
 
      sendCq();
 
    else -- we ve got an exchange but not a call, ask for the call
 
      sendAskForCall();
 
    end;
 
  else -- call is not empty
 
    if (wtQso:IsExchangeSent()) then -- we have sent the exchage
 
      if (not wtQso:IsQsoApproved()) then
 
        if (wtQso:IsCurrentFieldCallsign() and not wtQso:IsExchangeEmpty()) then
 
          askWithPartialCall();
 
        end;
 
        if (wtQso:IsCurrentFieldCallsign() and wtQso:IsExchangeEmpty()) then
 
        wtQso:ResetExchangeSent();
 
        sendExchangeRun();
 
        if (wtQso:IsCurrentFieldCallsign()) then wtKeyer:Play("$SPACEBAR") end;
 
        end;
 
        if (wtQso:IsCurrentFieldExchange() and wtQso:IsExchangeEmpty()) then
 
          askForNumber();
 
        end;
 
      else -- qso has valid call and exchange
 
        if (wtQso:IsCurrentFieldExchange()) then
 
          sendTu();
 
        else -- current field is not exchange (should be callsign)
 
        if (wtQso:IsCurrentFieldCallsign()) then
 
          wtQso:ResetExchangeSent();
 
          sendExchangeRun();
 
          if (wtQso:IsCurrentFieldCallsign()) then wtKeyer:Play("$SPACEBAR") end;
 
        end;
 
        end;
 
      end;
 
 
 
    else -- have not sent exchange and we are in the call field
 
      sendExchangeRun();
 
      if (wtQso:IsCurrentFieldCallsign()) then wtKeyer:Play("$SPACEBAR") end;
 
    end;
 
end;
 
 
 
else -- The contest doesnt require an exchange to be received e.g. DXPed etc.
 
  if (not wtQso:IsQsoApproved()) then
 
    if (wtQso:IsCallsignEmpty()) then
 
      sendCq();
 
    else
 
      if (wtQso:IsCallsignRepeated()) then
 
        sendExchangeAgain();
 
      else
 
        sendExchangeRun();
 
      end;
 
    end;
 
  else
 
    if (wtQso:IsExchangeSent()) then
 
      sendTu();
 
    else
 
      sendExchangeRun();
 
    end;
 
  end;
 
end;
 
 
 
else -- S&P : The automatic exchange fill (if enabled) is disabled by WT
 
if ( (wtQso:IsExchangeEmpty() and wtContest:IsExchangeRequired()) or not wtQso:IsQsoApproved() ) then
 
  if (wtQso:IsCallsignEmpty()) then
 
    sendQuestionMark();
 
  else
 
    if (not wtQso:IsDupe()) then -- Call only if not dupe
 
      sendMyCall();
 
    end;
 
  end;
 
else
 
  if (wtQso:IsExchangeSent()) then
 
    wtQso:ClearStatus();
 
    wtKeyer:Play("$CR");
 
    return -1; -- Log it silently
 
  else
 
    if (not wtQso:IsDupe()) then -- Sent exchange only if not dupe
 
      sendExchangeSAndP();
 
    end;
 
  end;
 
end;
 
end;
 
 
 
return -1; -- This script overrides the Win-Test CR process
 
</pre>
 
 
 
====Grab next call from partner window====
 
The following script was kindly provided by Hank Lonberg, KR7X. It remaps the '''<tt>[~]</tt>''' key to grab the next callsign from the partner window and send an exchange.
 
 
 
<pre>
 
wtKeyer:Play("$CORRECT TU $CR NOW $GRABPARTNER $NEXT $GUESSEXCH $F2 $13");
 
</pre>
 
 
 
====Re-map Ä key with /P for Field Day====
 
Practical in Field Day where a lot of stations are signing "/P" - especially with a German keyboard layout.
 
 
 
<pre>
 
-- add /P to a callsign for Field Day operations
 
wtApp:SendKeyCode(47);
 
wtApp:SendKeyCode(112);
 
</pre>
 
  
 
==Load a target file==
 
==Load a target file==
Line 1,001: Line 353:
 
After pressing OK a file with the extension '''<tt>.obf</tt>''' will be created which will look similar to the file below:
 
After pressing OK a file with the extension '''<tt>.obf</tt>''' will be created which will look similar to the file below:
  
<code>
 
 
  #
 
  #
 
  # Target file generated by Win-Test
 
  # Target file generated by Win-Test
Line 1,034: Line 385:
 
  34 QSO = 42 MULT = 5 POINTS = 50
 
  34 QSO = 42 MULT = 5 POINTS = 50
 
  35 QSO = 81 MULT = 7 POINTS = 224
 
  35 QSO = 81 MULT = 7 POINTS = 224
</code>
 
  
 
As you can see the structure of the file is so easy to understand that you might want to use an ASCII editor to go and make some changes - or create it completely from scratch yourself using this template!
 
As you can see the structure of the file is so easy to understand that you might want to use an ASCII editor to go and make some changes - or create it completely from scratch yourself using this template!
Line 1,042: Line 392:
 
You have different options, depending on the category you choose (see pictures below):
 
You have different options, depending on the category you choose (see pictures below):
 
<center>
 
<center>
 +
 +
[[Image:ToolsCheckLog-SO.PNG|center|frame|Check Log feature for the single operator category]]
  
 
[[Image:ToolsCheckLog.PNG|center|frame|Check Log feature for M/S category]]
 
[[Image:ToolsCheckLog.PNG|center|frame|Check Log feature for M/S category]]
Line 1,060: Line 412:
  
 
* '''Display distinct callsigns...''': Display all distinct callsigns of a log, and band(s)/mode(s) worked by each station. You can sort this report by callsign, by number of Q and by country.
 
* '''Display distinct callsigns...''': Display all distinct callsigns of a log, and band(s)/mode(s) worked by each station. You can sort this report by callsign, by number of Q and by country.
 +
 +
* '''Callsigns syntax...''': Match the callsigns to the callsign pattern file (see [[Other_Files]]).
 +
 +
* '''Open the notes linked to the current log''': Allows you to comfortably walk through your notes taken during the contest. Clicking on a line brings you to that specific QSO.  Edit a note by selecting it and use '''<tt>Alt-N</tt>''' to modify the comment.
 +
 +
* '''Open a different notes file''': Switch notes file, if more than one exists.
 +
 +
* '''Download the LCR file''': Download your Log Check Report from the contest web site.
 +
 +
* '''Open a Different LCR file''': Switch to a different Log Check Report.
  
 
These are some of the typical reports you get:
 
These are some of the typical reports you get:
Line 1,070: Line 432:
  
 
You have the options of opening the report in a Notepad window for further processing.  
 
You have the options of opening the report in a Notepad window for further processing.  
 +
The Copy button allows you to Copy & Paste the data into a spreadsheet for comfortable filtering and processing.
 
Additionally, you may press the Update button to create an updated report after you have done
 
Additionally, you may press the Update button to create an updated report after you have done
 
some changes to the log.
 
some changes to the log.
Line 1,084: Line 447:
 
Note that time shifting is pretty CPU consuming. It may take quite some time for large logs, because each QSO modification requires several internal structures (mainly statistics) to be updated accordingly. Time shifting '''can not be cancelled''' while it is in progress, to avoid any log inconsistency.
 
Note that time shifting is pretty CPU consuming. It may take quite some time for large logs, because each QSO modification requires several internal structures (mainly statistics) to be updated accordingly. Time shifting '''can not be cancelled''' while it is in progress, to avoid any log inconsistency.
  
'''Note''': Wise users will create a backup of their log before using this option.
+
{{wbox|Note|Wise users will create a backup of their log before using this option.}}
  
 
==Correcting OP over a QSO range==
 
==Correcting OP over a QSO range==
This function lets you change (or add ) the operator to a range of QSO. The QSOs are selectable by QSO number, by band, by mode or by callsign.
+
This function lets you change (or add) the operator to a range of QSO. The QSOs are selectable by QSO number, by band, by mode or by callsign.
  
 
[[Image:ToolsCorrectingOp.PNG|center|frame|Tool to correct operator for a range of QSOs]]
 
[[Image:ToolsCorrectingOp.PNG|center|frame|Tool to correct operator for a range of QSOs]]

Latest revision as of 16:19, 9 April 2023

Menu:Tools

Automatic CQ repeat

Use the text command RPTDELAY to get to this menu quickly.

Auto CQ Settings

This option allows you to automatically repeat messages after a certain amount of time if no key was pressed by the operator. This feature works on all modes and simulates the operator pressing one of the keys [F1] to [F7] key after so and so many seconds.

Traditionally, this is used for the [F1] key to auto-repeat CQ but it can also beused on other keys.

Contrary to CW operation, note that when using an external voice keyer on SSB (like the built-in DRU-2 in a Kenwood TS-850) Win-Test does not know when the message ends. For this reason, the time period to be set is the time that elapses between two CQ calls. This is also true for RTTY when using the MMTTY plug-in.

You may want to use the text commands NORPT or RPT to deactivate and later reactivate that function. Optionally, you may chose that only the Escape key deactivates the repeat function by clicking the appropriate option in the context menu or by RPTESCONLY and NORPTESCONLY text commands.

Intelligent Quick QSL...

Use the text command QUICKQSL to get to this menu quickly. Use QQSLON / QQSLOFF or QQSL / NOQQSL text commands to enable (or disable) the Quick QSL feature.

This option controls the content of the two message variables $QQSLT and $QQSLC. When used, these variables change their content after so and so many seconds or when a number of QSOs have been logged. That way you can send a short QSL message to confirm the QSO in a pileup, but make sure your full callsign gets transmitted automatically every 2 minutes or every 5 QSOs only. So while most QSOs would be completed with TU or EE sometimes we would send a message like TU F5MZN.

The intelligent quick QSL option allows you to automatically control sending of your own callsign every so often during a heavy pileup.

A timer ($QQSLT macro) or a counter ($QQSLC macro) are associated with these macros to determine if either a short or a long QSL message is to be transmitted. Additionally, this feature can be related to the current QSO rate (so-called adaptive intelligent quick QSL).

The $QQSLC and $QQSLT macros can either be used in the CW/RTTY Messages or in the advanced SO2R scenarios. It is also possible to use the feature in SSB (SO1R and SO2R not avanced) but this needs a specific configuration in the SSB tab of the configuration window.

In the PLUS message in the Standard CW messages configuration, replace TU $MYCALL with $QQSLC or $QQSLT. Intelligent Quick QSL will then send a short QSL message or a long QSL message according to the set counter or the set timer in the respective variable.

The macro $QQSLRESET resets the timer or the counter like if the long QSL message were just sent. It makes sense to use this macro in each message you send your callsign in like CQ (F1) or MYCALL (F4). That way, you won't send a long QSL message after just having sent your call a few seconds before.

Redefine keyboard keys

Use the text command DEFINEKEYS to get to this menu quickly.

On some keyboards, it is difficult to reach specific keys, so Win-Test allows you to re-define some of the keys on your keyboard.

Redefine Keyboard Keys

For example, to make the period key [.] call CQ, just like [F1]:

  1. Press the [Add] button
  2. Press the key you want to reprogram: the period key [.]
  3. Press the key that does the function you want: the [F1] key
  4. Press the [OK] button to save the changes, or press the [Esc] key to exit without saving any changes

To restore a remapped key to its default behavior, highlight a line by clicking on it with the mouse, then press the [Delete] button.

Remapping is done on a 1:1 basis. One keystroke becomes an alternate version of another. The original key still works as before. Keyboard remapping is saved in the wt.ini file, so the same map will automatically be used for all contests.

WARNING: Do not copy wt.ini from one machine to a new machine that already has a registered version of Win-Test, or else will have to re-enter the registration key on the new machine. See registration instructions.

In the example above, you can see how the commonly-used keys like [F1], [Ins], and [+] have all been remapped to keys that are much easier to reach on a U.S. keyboard, especially if you are a touch-typist. The keyboard map shown in the example was developed by N6TV for Team Vertical:

  • [.] (the period key) calls CQ, just like [F1]
  • [;] (the semiclon key) sends the message, just like the [Ins] key
  • ['] (the single-quote key) sends TU and logs the QSO, just like the [+] key
  • [\] (the backslash key, just above the [Enter] key on many U.S. keyboards) sends $MYCALL, just like [F4]
  • [,] (the comma key) sends a single question mark, just like [F7]

NOTE: Remapped keys are ignored in keyboard mode unless you enable the CW Option Remap keys in keyboard mode. It is generally a good idea to enable this option so that all message keys work the same, whether you are in keyboard mode or not.

Remapping [*] and [+] when using Notebook or Mini keyboard

By default, the asterisk key [*] is used to switch active radios, and the plus key [+] is used to send "TU" and log a QSO. These keys are located on the numeric keypad of a full-sized keyboard. Win-Test does not treat these keys the same as Shift-[*] and Shift-[+], which is what you would normally press when typing text.

If you are using a Notebook, Laptop or "mini" keyboard without a separate numeric keypad on the right side, equivalent keys with special colored symbols become active only when you press the [NumLock] key. One of these keys should be labeled with an asterisk in a different color, and another should be the plus. For example, on a U.S. ThinkPad keyboard, the colored asterisk may be located on the [P] key, and the colored plus may be shared with the [/] key. Those are the keys to use when remapping, after activating Num Lock mode.

For example, to make Ctrl-S act as the "Switch Active Radio" key when using a keyboard without a numeric keypad:

  1. Press the [Add] button
  2. Press [Ctrl-S]
  3. Press Shift-[NumLock] to enter Num Lock mode
  4. Press the key that does the function of the asterisk when in Num Lock mode, perhaps the letter P?
  5. Press Shift-[NumLock] again to exit Num Lock mode

If a single asterisk * appears in the New Keys column as shown below, the key has been correctly defined. If it says Shift * or something else, it has not.

Redefine Keyboard Keys, with function of ASTERISK and PLUS keys properly re-assigned to other keys.

QWERTY and AZERTY Keyboards

French (and some Begian) users: Button added in the keys redefinitions dialog to load AZERTY redefinitions that allow the AZERTY keyboards users to access the numbers located on the top row without using the Shift or Shift Lock keys. They allow direct access to the ?, . and / keys of the bottom row as well. This button is displayed only when the language is set to French.

Data entry

These functions describe settings that influence data entry to the log entry line.

Exchange guessing

Exchange guessing is a feature of Win-Test that predicts the exchange that is going to be received before your QSO partner actually sends the report. In many contests a fixed piece of information is exchanged like the CQ zone in the CQWW contests, or ITU zone in IARU. This option allows you to select the way Win-Test fills in the exchange:

  • pressing the space bar
  • automatically
  • after timeout

Note this option also acts on the various warnings (dupe, new mult, etc., if any) displayed under the log lines.

This feature saves you from continuously typing the same information over and over again but you better make yourself sure the guessed report is correct before you press the [Enter] key.

Please refer also to Setting up Exchange Guessing in Win-Test to know how to activate this feature for a specific contest.

Note: CQ zones in the USA and Russia will be guessed correctly (well, 99%) only when you have loaded F5IN's CTY_WT_MOD.DAT file. Otherwise Win-Test will always come up with the default zone of that country (5 for USA, 17 for UA9 and UA0). Please see Data files for more details on how to select the right CTY file.

Callsign check

On the fly callsign pattern check based on the K1TTT callsign.pat file, described here (over 400 rules applied today). The latest version of callsign.pat may be downloaded here.

Yellow text denotes a warning, red text denotes an invalid callsign.

Callsign possibly wrong
Callsign definitely wrong

Callsign pattern file location:

  • Windows XP: C:\Documents and Settings\All Users\Application Data\Win-Test\extras\callsign.pat
  • Windows Vista or Windows 7: C:\ProgramData\Win-Test\extras\callsign.pat

Updates may be downloaded from http://download.win-test.com/files/extras/.

You are encouraged to report to the author (K1TTT) any mistakes or updates needed in this file.

Callsigns which don't follow the usual rules, like RAEM, 5VDE, 7QAA, etc.) are grouped in the exceptions.dat file for easy updating.

Priority

To change bands, you may wish to enter a frequency or band (m) into the callsign field. This option determines how these figures are to be understood by the program:

  • Band - take 10,15,20,40,80,160 as a meter band
  • Frequency - take the input as a frequency; shorted inputs as kHz

To make this a little more clear, if you enter 40:

  • In the first case will switch the band to 40 meters (thus, enter 040 or 40.0 if you want to tune your radio to 040)
  • In the second case it will tune your radio to decimal 040 on the current band (thus, enter 40M if you want to switch to 40 meters).

Enable ESM

Win Test v4 comes with an Enter Sends Message (ESM) feature, well-known by users of TR LOG by N6TR. The functionality can be turned on or off via this menue item or using the text commands ESM/NOESM.

ESM relies on the following messages assignation:

 F1: CQ
 F2: Sent report
 F4: Mycall
 F5: Logged callsign ($LOGGED)
 F7: ? (or "Again ?" in phone)
 INSERT: Callsign + sent report
 PLUS: TU + enter Q

The basic functionality of ESM can be described like this:

  • Pressing [Enter] with an empty callsign field, will send the [F1] message.
  • Pressing [Enter] with a callsign filled in but no report will send the [INSERT] message.
  • Pressing [Enter] with callsign and report filled in will send the [PLUS] message.
  • Pressing [Enter] with callsign and partial report filled in will send [F7] message.

It makes CW/RTTY easier, as you use one key for most of the operations instead of the various F keys.

There are additional minor details to ESM, which are not described here. On top, ESM behaviour is user-modifyable by using a script editor.

Once ESM is enabled, the [Enter] key can no longer be used to silently log a QSO. The key combination [Ctrl+Plus] has been introduced and added for this purpose.

When using the SO2R advanced technique, the scenarios messages are used instead of the standard.

Disable CW cut numbers translation

Allows to completely disable Win-Test's intelligent translation of cut numbers like TTA to 001. Note that this translation is performed on a contest and worked station contextual basis. The equivalent text commands are CUTON and CUTOFF. Do not mix up with CUT/NOCUT that are reserved for CW cut numbers generation !

Remap Slash to /P

This option allows you to map "/" to "/P" for Field Day, VHF/UHF contests and DX pedition mode.


Enable Run/S&P switching

Enable RUN/S&P switching

Allow switching between Run and Search & Pounce Operating Mode in order to have two different sets of CW/RTTY messages: one when running, and one when searching multipliers.

  • Use [Ctrl-tab] to switch between RUN and S&P mode on the Primary Radio. The current mode is shown in the clock window. To change the mode of the Secondary Radio Window, use either [Ctrl-Shift-tab] or a mouse click on the appropriate control in the Secondary Radio Window.
  • It is possible to configure WT to automatically populate the Band Map and wipe the data entry area whenever the operator changes the radio's frequency, if Search & Pounce mode is activated on that radio. This can be configured from the Band Map Properties dialog (right click in the Band Map window).

Note: Search & Pounce is not activated by default. To automatically populate the Band Map, you must switch to S&P mode.

Note: When switching from Run to S&P mode, Auto CQ and Auto CW Sending are automatically disabled.

Switch keyboard...

Switch keyboard during the contest - useful for mult-national teams

Keyboard switching for international teams with different keyboards. It is enabled only if several keyboards are installed on your system. You can also access this dialog by entering the text commands KEYBOARD or KEYB for short.

Countdown timer...

The countdown timer indicates exactly when the single operator can start operating again after a break. It's based on the time of the last QSO entered in the log, truncated to the minute.

Countdown timer to plan breaks.
When running, it displays minutes when operation can commence.

You can also use the text command TIMER/nnHmmM' or TIMER/nnHmm (meaning nn hours and mm minutes), or TIMER/xxH (nn hours) or TIMER/nnM (nn minutes) to set and start the timer automatically.

Scripts Manager

Allows to edit, create, delete or rename scripts. It's also used to assign a key and/or an argument to a script. Scripts are to be created and maintained by the user using the Lua programming language. See the Win-test Lua API. For a reference of the Lua programming language, see http://www.lua.org/manual/5.1/. Sample Lua scripts demonstrating how to control the RIT and internal DVR (voice keyer) of the Elecraft K3 and other radios may be downloaded from http://bit.ly/wtscripts.

The Win-Test Scripts Manager to edit, create, delete or rename WTS scripts

You may also use the text command SCRIPTS to open the scripts manager.

By double-clicking an existing script, the default Editor is opened. Ctrl + Double click brings up the properties dialog.

Before you can modify scripts, you must configure an appropriate script editor. Per Default, Win-Test uses the SciTE Editor, which can be optionally installed. It does context sensitive highlighting, syntax checking etc. If you are only writing a simple script, Windows notepad.exe is probably sufficient.

Introduction

The Win-Test scripting language gives the user the unique ability to achieve dynamic tasks in Win-Test. It also provides a way to share your work with other Win-Test users who don't have time or skill to write their own scripts.

ESM (Enter Sends Message) was the first Win-Test application where the scripting language Lua was used. The ESM function itself is a Lua script, embedded in Win-Test (not modifiable). But, it has been designed to be totally overridden by a user-written script if desired, i.e., you can write and use you own modified version of the ESM script to change the default ESM actions. See ESM Script (embedded into Win-Test) for the LUA source code.

To do this, the minimum requirement is to know some basics of a programming language. The Lua syntax is very simple for doing easy tasks. If you're comfortable with any programming language, you will learn Lua in minutes, at least for basic scripting involved in Win-Test. Many Win-Test API (Application Programming Interface) functions are provided to control various Win-Test features.

For a list of Win-Test API Functions and Constants, see API.

# Notation

Scripts can either by called by pressing a key or from within a CW or RTTY message. For this, you must use the #SCRIPTNAME(ARGUMENT) notation. The argument (and parenthesis) are optional. The script will be called synchronously, but is executed in the main thread, meaning that it is not blocking the CW/RTTY stream.

For example :

 TU N6TV #CLEARRIT  

assuming your script is called CLEARRIT.wts - or

 TU #QSYUP(200)

assuming you created a script named QSYUP.wts to QSY up wtArgument Hz after a QSO.

Calling Scripts via Text Command

Scripts may be triggered using a Text Command. SCRIPT.wts can be executed by entering SCRIPT in the callsign field.

An argument can be passed to the script by expanding it with a slash. SCRIPT/5 will call SCRIPT.wts and pass the parameter "5" in the wtArg global variable. The argument is always passed as a string when the script is called from a text command. If no argument is specified, the default argument defined in the script manager will be used (if any).

Automatically Executed Scripts

Some scripts are being executed automatically, whenever a specific event occurs.

onFileOpen.wts Executed when .wt4 file is opened
onFileClose.wts Executed when .wt4 file is closed
onMicrohamFsOn.wts Executed, when microHAM footswitch is pressed
onMicrohamFsOff.wts Executed, when microHAM footswitch is released
onOtrspCrOn.wts Executed, when OTRSP control has value 1
onOtrspCrOff.wts Executed, when OTRSP control has value 0
onOtrspCrEvent.wts Executed, for all states of OTRSP events

Synchronous vs. asynchronous - the #@ Notation

The scripts calls in the CW or RTTY messages are synchronous to the CW or the RTTY streams. To execute them asynchronously, they can be called with the #@ notation. Example:

-- script.wts
wtApp:AlertBox("Hello World!");

and the CW/RTTY message content is:

AAA #SCRIPT BBB

The keyer sends AAA, then "waits" until the user hits the OK button in the "Hello World!" alert box to send BBB. If the CW/RTTY message content is:

AAA #@SCRIPT BBB

The keyer sends AAA and starts the script (and the alert box is open), but it continues to key the rest of the message ("BBB") without waiting the user intervention. This is the asynchronous mode.

Tips for Programming

  1. Use the Scripts Manager to manage scripts, using a simple editor like Notepad. The scripts are stored in the {AppData}/All Users/Win-Test/scripts/ directory.
  2. Before you can press the Edit button, make sure you have configured an ASCII editor in the Options Menu
  3. If you wish to replace the built-in ESM script in Win-Test, save your script as "esm.wts". The value returned by your script will tell Win-Test what to do after it is executed:
    • If the return value is 0 (or if there is no return value), WT will run its own embedded script after yours.
    • If the return value is 1, WT will continue the Enter key process, without calling its embedded script.
    • And if the return value is -1, WT will stop the Enter key process, without calling its embedded script.
  4. WT maintains two different QSO status: One for each radio. They are automatically cleared when the QSO is entered, if the operating mode (RUN/S&P) is switched or if the wtQso:ClearStatus() is executed.
  5. Lua global variables are persistent between scripts calls. If you don't want this behavior, use local variables instead (keyword local).

Basic Examples

Example 1

  -- esm.wts
  wtApp:AlertBox("Enter key ! ESM rulez...");
  return 0; -- This line can be omitted
  -- end

No return value (or 0) => WT will execute this script (the alert box will be displayed), and the embedded script will be called after it.

Example 2

  -- esm.wts
  wtApp:AlertBox("Enter key ! The key is processed by WT");
  return 1;
  -- end

The return value is 1 => After executing the script (the alert box will be displayed), WT will continue its own process and act exactly as if someone hit Enter. Read: It silently enters the QSO if it is OK. The embedded ESM script is ignored.

Example 3

  -- esm.wts
  wtApp:AlertBox("Enter key ! The key processing is stopped");
  return -1;
  -- end

The return value is -1 => After executing the script (the alert box will be displayed), the embedded ESM script is ignored and WT will also ignore the Enter key process (no QSO is entered).

For a collection of more advanced programming examples please see user contributed scripts and advanced programming examples.

Load a target file

This option allows you to load a so-called target file - an ASCII file (maybe self-generated) that has QSO and multiplier targets for each hour of the contest. This is a nice way to integrate a plan into your contest environment to keep yourself motivated. In the old days we used to have a piece of paper on the wall - today Win-Test automatically tracks this information for your convenience.

Before you can load a target file you will have to create one or receive one from somebody else. Please see Export a target file on how to do that.

The content of the target file becomes visible in the statistics window (see Statistics) when you compare current standings with the values in the target file.

Loading a target file is usually a Pre-contest configuration task. Please refer to the usual Pre-contest configuration activities chapter in this manual.

A target file can also be loaded at any time during the contest. If you see your target score was too easy, you can load a new target to keep your motivation high. You set a target to break your national record, and now things go better and you see the possibility to break the continental record. How can you track this new situation? Preparing more than one file with different targets is a good practice: if conditions change then simply load the new target file and WT will show you how you are doing against that new target!

Export a target file

This option allows you to create a target file from the log file currently loaded. It is useful to use last year's log as a start to create a target for this year's contest.

Exporting a target (.obf) file

You should give a title to the target file to make clear what you're comparing to. Maybe you will want to change the target file to a more optimistic one when you'll realize band conditions are so great this time!

You may want to select which time frame to export (Starting time, ending time). Hours on Sunday have to be given in time + 24 hours so that 12:00 UTC on Sunday becomes 36.

Next you have to choose which columns to export to the target file. Normally you will want QSO count (with or without dupes), multipliers and points.

After pressing OK a file with the extension .obf will be created which will look similar to the file below:

#
# Target file generated by Win-Test
#
# VERSION 100
#
TITLE IARU Contest 2006 DA0HQ
START = 12
END = 36
12 QSO = 0 MULT = 0 POINTS = 0
13 QSO = 1 MULT = 1 POINTS = 1
14 QSO = 1 MULT = 1 POINTS = 1
15 QSO = 1 MULT = 1 POINTS = 1
16 QSO = 1 MULT = 1 POINTS = 1
17 QSO = 2 MULT = 2 POINTS = 4
18 QSO = 3 MULT = 2 POINTS = 4
19 QSO = 4 MULT = 2 POINTS = 6
20 QSO = 4 MULT = 2 POINTS = 6
21 QSO = 4 MULT = 2 POINTS = 6
22 QSO = 8 MULT = 3 POINTS = 18
23 QSO = 8 MULT = 3 POINTS = 18
24 QSO = 8 MULT = 3 POINTS = 18
25 QSO = 8 MULT = 3 POINTS = 18
26 QSO = 8 MULT = 3 POINTS = 18
27 QSO = 8 MULT = 3 POINTS = 18
28 QSO = 8 MULT = 3 POINTS = 18
29 QSO = 8 MULT = 3 POINTS = 18
30 QSO = 8 MULT = 3 POINTS = 18
31 QSO = 8 MULT = 3 POINTS = 18
32 QSO = 18 MULT = 3 POINTS = 21
33 QSO = 30 MULT = 5 POINTS = 45
34 QSO = 42 MULT = 5 POINTS = 50
35 QSO = 81 MULT = 7 POINTS = 224

As you can see the structure of the file is so easy to understand that you might want to use an ASCII editor to go and make some changes - or create it completely from scratch yourself using this template!

Check log

This tool allows you to verify if special restrictions of the contest rules have been adhered to in this log. You have different options, depending on the category you choose (see pictures below):

Check Log feature for the single operator category
Check Log feature for M/S category
Check Log feature for the M2 category - note the differences in options offered. If you select a contest and/or category which does not have a QSY limit, this option will not show up.

Depending on the selected contest category, you may check for:

  • 8 QSY per Hour: Check the QSY count per hour (ARRL DX in M/2 category for example).
  • 10 min QSY rule: Check if the minimum time on a band has been respected (Multiplier station in a M/S effort during a CQWW DX for example).
  • Check that QSO on Mult station are Mults: Check if all QSOs made on the multiplier station are actually multipliers. You may want to quote the exceptions (if any) when sending your log to the contest sponsor to avoid massive score reductions.
  • Search for possible Bad Exchanges: Search the logged exchanges which are potentially bad, according to the database or to the other QSOs made with the same station during the contest. Works for CQWW, ARRL DX or any contest in which there is something which apparently is a zone. It also works for the VHF contest when a Gridsquare is logged.
  • Show Uniques: Search N+1 for each unique logged callsign in the log. A unique callsign is a callsign that appears in the log only once (contact only on one band and mode, and no dupe). N+1 can be searched against the log, the callsign database (Master database) or both. It is possible to switch off N+1 searching for unique callsigns which are known to the callsign database.
  • Display distinct callsigns...: Display all distinct callsigns of a log, and band(s)/mode(s) worked by each station. You can sort this report by callsign, by number of Q and by country.
  • Callsigns syntax...: Match the callsigns to the callsign pattern file (see Other_Files).
  • Open the notes linked to the current log: Allows you to comfortably walk through your notes taken during the contest. Clicking on a line brings you to that specific QSO. Edit a note by selecting it and use Alt-N to modify the comment.
  • Open a different notes file: Switch notes file, if more than one exists.
  • Download the LCR file: Download your Log Check Report from the contest web site.
  • Open a Different LCR file: Switch to a different Log Check Report.

These are some of the typical reports you get:

Checked Exchanges Report
Unique Report
Distinct Callsigns Report - see who you worked on which bands/modes

You have the options of opening the report in a Notepad window for further processing. The Copy button allows you to Copy & Paste the data into a spreadsheet for comfortable filtering and processing. Additionally, you may press the Update button to create an updated report after you have done some changes to the log.

Time shifting

This option allows you to time shift selected QSOs by any amount of time - either positive or negative. It lets you correct a constant time offset (like you had set the wrong date on the computer, or the clock was off by one hour). You may consider to use this option after the contest to avoid heavy manual editing of many QSO's time through the use of Alt-F.

The time shift can be applied to the entire log or to a range of QSOs, to the QSOs entered by your own station (this could make sense in a multi operator environment), to QSOs entered by several stations. Note that in a multi operator environment, one station should always be (or should have been) defined as the time master to establish a common time base in the network.

Time Shifting Parameters

Even though this tool is supposed to be used after a contest to correct a wrong clock setting, each time change will be broadcasted to all other stations of the network by default. You can disable this broadcasting — if not needed.

Note that time shifting is pretty CPU consuming. It may take quite some time for large logs, because each QSO modification requires several internal structures (mainly statistics) to be updated accordingly. Time shifting can not be cancelled while it is in progress, to avoid any log inconsistency.

Note: Wise users will create a backup of their log before using this option.

Correcting OP over a QSO range

This function lets you change (or add) the operator to a range of QSO. The QSOs are selectable by QSO number, by band, by mode or by callsign.

Tool to correct operator for a range of QSOs

Download Files through the Network

To collect logs from different networked computers after a contest is over is the task of this function. Instead of having to visit each single computer, plug in the USB drive, copy the files over and move on to the next, this feature let's you collect the binary and notes files from all computers at once.

Collect files after the contest without leaving your chair

Back to Menus