MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "query": {
        "pages": {
            "1770": {
                "pageid": 1770,
                "ns": 0,
                "title": "API",
                "revisions": [
                    {
                        "user": "Dl6rai",
                        "timestamp": "2021-12-30T12:51:52Z",
                        "slots": {
                            "main": {
                                "contentmodel": "wikitext",
                                "contentformat": "text/x-wiki",
                                "*": "===List of Win-Test API Functions===\nCompiled from information found on the WT reflector on October 7, 2009 ([http://lists.f5mzn.org/pipermail/support/2009-October/078505.html],\n[http://lists.f5mzn.org/pipermail/support/2009-October/078510.html]).\n\n'''The most current API documentation from the Win-Test developers may be found at [http://download.win-test.com/v4/lua/LuaApiDoc.txt http://download.win-test.com/v4/lua/LuaApiDoc.txt].\n'''\n====Class wtApp====\n{| 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;\"\n|-\n| '''<tt>wtApp:AlertBox(Text)</tt>'''\n| Opens a standard Windows alert box with the specified text and an [OK] button.\n|-\n| '''<tt>wtApp:CallScript(strScript [, arg])</tt>'''\n| Call a wts script (no extension required in strScript). Can return a number only (or nothing).  Optional argument's value can be accessed via wtArg in the called script.\n|-\n| '''<tt>wtApp:GetAppPath()</tt>'''\n| Win-Test installation directory path\n|-\n| '''<tt>wtApp:GetCfgPath()</tt>'''\n| \\cfg directory path\n|-\n| '''<tt>wtApp:GetCtyPath()</tt>'''\n| \\countryFiles directory path\n|-\n| '''<tt>wtApp:GetDatabasePath()</tt>'''\n| \\databases directory path\n|-\n| '''<tt>wtApp:GetExtraPath()</tt>'''\n| \\extras directory path\n|-\n| '''<tt>wtApp:GetIniFileName()</tt>'''\n| Return the name of the current .ini file, including the \".ini\" extension.  Usually returns \"wt.ini\" unless overidden via the -i command line argument.\n|-\n| '''<tt>wtApp:GetKeyState()</tt>'''\n| Returns the modifers keys status when the function is called.\n|-\n| '''<tt>wtApp:GetLastError()</tt>'''\n| Return the Windows last-error code value when using PostMessage or SendMessage. Can be useful to debug such statements.\n|-\n| '''<tt>wtApp:GetLogFileName()</tt>'''\n| Return the name of the current log file, including the \".wt4\" extension\n|-\n| '''<tt>wtApp:GetLogPath()</tt>'''\n| Current log directory path\n|-\n| '''<tt>wtApp:GetOpPath()</tt>'''\n| \\ops directory path\n|-\n| '''<tt>wtApp:GetScriptPath()</tt>'''\n| \\scripts directory path\n|-\n| '''<tt>wtApp:InputInteger(Prompt, Title, Default)</tt>'''\n| If Prompt is empty, it defaults to \"Enter an integer\".  If Title is empty, it defaults to \"Win-Test script\".  If a default value is specified, the pop-up window is pre-filled with the specified integer value.\n|-\n| '''<tt>wtApp:InputNumber(Prompt, Title, Default)</tt>'''\n| If Prompt is empty, it defaults to \"Enter a number\".  If Title is empty, it defaults to \"Win-Test script\".  If a default value is specified, the pop-up window is pre-filled with the specified number value.  In LUA, a \"number\" data type may or may not contain a decimal point.\n|-\n| '''<tt>wtApp:InputText(Prompt, Title, Default)</tt>'''\n| If Prompt is empty, it defaults to \"Enter a text\".  If Title is empty, it defaults to \"Win-Test script\".  If a default value is specified, the pop-up window is pre-filled with the specified text.\n|-\n| '''<tt>wtApp:InputUpperText(Prompt, Title, Default)</tt>'''\n| Same as wtApp:InputText, but all text is converted to uppercase.\n|-\n| '''<tt>wtApp:IsCapsLock()</tt>'''\n| Returns '''true''' if the '''[Caps Lock]''' key is enabled and the secondary radio window is highlighted, otherwise returns '''false'''.\n|-\n| '''<tt>wtApp:IsPostKeyProcess()</tt>'''\n| Returns '''true''' if the current script is being executed after the assigned key has been processed by WT, otherwise returns '''false'''.\n|-\n| '''<tt>wtApp:MessageBox(Text, Type, Title)</tt>'''\n| Display a Message box with the specified text, using the specified type and message box title (shown in the title bar of the message box window).  See also wtApp:AlertBox().  Type 0 is an ordinary message box with an [OK] button, type 1 has both an [OK] and a [Cancel] button.  The return code indicates the button pressed by the user (which may be ignored).  Return code 1 means the [OK] button was pressed, return code 2 means the [Cancel] button was pressed.\n\nSee the [http://msdn.microsoft.com/en-us/library/ms645505%28VS.85%29.aspx Microsoft Windows MessageBox API documentation] for more details about supported message box types and return codes.\n|-\n| '''<tt>wtApp:PostMessage(strTitle, strClass, nMsg, nWParam, nLParam[, strLParam])</tt>'''\n| Place (post) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message. <br>\nstrTitle : Title of the target window<br>\nstrClass : Specifies the window class name of the child window (must be empty if unused)<br>\nnMsg : Message to be posted<br>\nnWParam : Additional message-specific information (use 0 if unused)<br>\nnLParam : Additional message-specific information (use 0 if unused)<br>\nstrLParam : String as additional message-specific information\n|-\n| '''<tt>wtApp:ResetCapsLock()</tt>'''\n| Disables the '''[Caps Lock]''' key.  Normally used to change focus to the primary radio window when [[Menu:Operating#Caps_Lock_binds_to_the_secondary_radio|Caps Lock binds to the secondary radio]] is enabled\n|-\n| '''<tt>wtApp:SendAltKey(Key)</tt>'''\n| Key is a letter, a number, or a function key (\"F1\"..\"F12\" + \"Insert\" + \"Plus\" + \"Esc\")\n|-\n| '''<tt>wtApp:SendCtrlKey(Key)</tt>'''\n| Key is a letter, a number, or a function key (\"F1\"..\"F12\" + \"Insert\" + \"Plus\" + \"Esc\")\n|-\n| '''<tt>wtApp:SendFKey(Key [, ModifierKeys])</tt>'''\n| Send Functions keys (and Insert and Plus). Key is one of \"F1\"..\"F12\" + \"Insert\" + \"Plus\" + \"Esc\". ModifierKeys (optional) indicates the modifier keys (Ctrl = 4, Alt = 2, Shift = 1, None = 0 - can be combined via addition, e.g., 6 = Ctrl+Alt). If this argument is missing or -1, the current modifier keys are used.\n|-\n| '''<tt>wtApp:SendKey(Key [, ModifiersKeys])</tt>'''\n| Send key or string.  Key is a single character or a string.  ModifiersKeys (optional) indicates the modifiers keys (Ctrl = 4, Alt = 2, Shift = 1, None = 0 - can be combined via addition, e.g., 6 = Ctrl+Alt).  If this argument is missing or -1, the current modifiers keys are used.\n|-\n| '''<tt>wtApp:SendKeyCode(Code [, ModifierKeys])</tt>'''\n| Send a key by its ASCII code. Keycode is an ASCII code. ModifierKeys (optional) indicates the modifier keys (Ctrl = 4, Alt = 2, Shift = 1, None = 0 - can be combined via addition, e.g., 6 = Ctrl+Alt). If this argument is missing or -1, the current modifier keys are used.\n\nFor Windows virtual key codes, add 256 to the key code, e.g. use <tt>wtApp:SendKeyCode(265, WT_KEY_CTRL)</tt> to simulate pressing <tt>[Ctrl]+[TAB]</tt>.  Refer to the [http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx Microsoft Virtual Key Code documentation] to obtain code values for VK_TAB (256+9=265), VK_RETURN (256+13=269), VK_LEFT (256+37=293), etc.\n|-\n|'''<tt>wtApp:SendMessage(strTitle, strClass, nMsg, nWParam, nLParam[, strLParam])</tt>'''\n| Send the specified message to a window. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.<br>\nstrTitle : Title of the target window<br>\nstrClass : Specifies the window class name of the child window (must be empty if unused)<br>\nnMsg : Message to be posted<br>\nnWParam : Additional message-specific information (use 0 if unused)<br>\nnLParam : Additional message-specific information (use 0 if unused)<br>\nstrLParam : String as additional message-specific information<br>\nReturn the string \"FAIL\" if there was a problem or the command timed out. Otherwise, it is set to the numeric result of the message, which might sometimes\nbe a \"reply\" depending on the nature of the message and its target window.\n|-\n| '''<tt>wtApp:SetCapsLock()</tt>'''\n| Enables the '''[Caps Lock]''' key.  Normally used to change focus to the secondary radio window when [[Menu:Operating#Caps_Lock_binds_to_the_secondary_radio|Caps Lock binds to the secondary radio]] is enabled\n|-\n| '''<tt>wtApp:SetWindowColor(ChildWndId, nRed, nGreen, nBlue, nColorIndex)</tt>'''\n| Set the nColorIndex color of the child window designated by its windowID (see [[API#Child_window_IDs|Child window IDs]]). 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.\n|-\n| '''<tt>wtApp:ShowWindow(ChildWndId)</tt>'''\n| Show the child window designated by its windowID (see [[API#Child_window_IDs|Child window IDs]])\n|-\n| '''<tt>wtApp:Sleep(Time)</tt>'''\n| Time expressed in milliseconds.\n|-\n| '''<tt>wtApp:TextCommand(Text)</tt>'''\n| Send WT text command to application\n|-\n| '''<tt>wtApp:ToggleCapsLock()</tt>'''\n| Toggles the '''[Caps Lock]''' key.  Normally used to swap the current focus from the primary or secondary radio window when [[Menu:Operating#Caps_Lock_binds_to_the_secondary_radio|Caps Lock binds to the secondary radio]] is enabled\n|-\n| '''<tt>wtApp:ToggleWindow(ChildWndId)</tt>'''\n| Toggle the child window designated by its windowID (see [[API#Child_window_IDs|Child window IDs]])\n|-\n| '''<tt>wtApp:WizzWindow(ChildWndId)</tt>'''\n| \"Wizz\" (shake or vibrate) the child window designated by its windowID (see [[API#Child_window_IDs|Child window IDs]]).  Can be used to draw attention to a particular window. \n|-\n|}\n\n====Class wtContest====\n{| 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;\"\n|-\n| '''<tt>wtContest:IsExchangeRequired()</tt>'''\n| Return a boolean. True if the current contest requires an exchange (associated with RST)\n|-\n| '''<tt>wtContest:GetCategoryId()</tt>'''\n| Return the current CategoryID\n|-\n| '''<tt>wtContest:GetContestId()</tt>'''\n| Return the current contestID (see [[API#Supported_contest_IDs|Supported contest IDs]])\n|-\n| '''<tt>wtContest:GetModeCategoryId()</tt>'''\n| Return the current Mode CategoryID\n|-\n| '''<tt>wtContest:GetMyCallsign()</tt>'''\n| Return my callsign set in the startup dialog of the contest\n|-\n| '''<tt>wtContest:GetOverlayId()</tt>'''\n| Return the current Overlay Id\n|-\n| '''<tt>wtContest:GetPowerClassId()</tt>'''\n| Return the current Power Class Id\n|-\n|}\n\n====Class wtGab====\n{| 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;\"\n|-\n| '''<tt>wtGab:Send(strText[, strToStation])</tt>'''\n| Sends a gab strText to strToStation. If strToStation is omitted, the text is sent to the whole network.\n|-\n|}\n\n====Class wtKeyer====\n\n{| 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;\"\n|-\n| '''<tt>wtKeyer:GetCwSpeed()</tt>'''\n| Return the CW speed in wpm (return 0 in case of error).\n|-\n| '''<tt>wtKeyer:GrabHighlightedCallsign()</tt>'''\n| Works only in RTTY mode and grabs the currently highlighted callsign from the RX window. \n|-\n| '''<tt>wtKeyer:Insert(strMessage)</tt>'''\n| Works for the CW and RTTY keyers. When used in a synchronous script, it provides a way to \"fill-in\" or \"insert\" data into the CW/RTTY message stream. It is recommended to be used only in synchronous mode to ensure that the characters are inserted in the right place. WARNING: strMessage can only contain text data (no variables or script calls). It is ''not'' interpreted by the CW/RTTY parser (except for +/- speed bursts). \n|-\n| '''<tt>wtKeyer:Play(Message)</tt>'''\n| Message is a plain string to be played, a saved message ('''<tt>$F1</tt>''' etc.) or a variable ('''<tt>$xxx</tt>'''). The word space between the string arguments will be omitted if they end with a \"~\".\n\n|-\n| '''<tt>wtKeyer:PlayAdditionalMsg(AdditionalMsgIndex)</tt>'''\n| Play the additional CW/RTTY messages (Alt-C set)\n|-\n| '''<tt>wtKeyer:SetCwSpeed(Speed)</tt>'''\n| Set CW speed in wpm.\n|-\n| '''<tt>wtKeyer:Stop()</tt>'''\n| Stop the current message\n|-\n|}\n\n====Class wtMicroham====\n{| 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;\"\n|-\n| '''<tt>wtMicroham:GetDeviceId()</tt>'''\n| Return the ID of the microHAM attached device (see [[API#microHAM_Device_IDs|microHAM Device IDs]]).\n|-\n| '''<tt>wtMicroham:GetFirmwareVersion()</tt>'''\n| Return the firmware version string of the microHAM attached device.\n|-\n| '''<tt>wtMicroham:Send(strCommand)</tt>'''\n| Send a command string to the microHAM attached device. The trailing <CR> character is optional, and is appended if needed.\n|-\n|}\n\n====Class wtOp====\n{| 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;\"\n|-\n| '''<tt>wtOp:GetCallsign()</tt>'''\n| Return the current op callsign\n|-\n| '''<tt>wtOp:GetNick()</tt>'''\n| Return the current op nick\n|-\n|}\n\n====Class wtOtrsp====\n{| 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;\"\n|-\n| '''<tt>wtOtrsp:GetDeviceName()</tt>'''\n| Returns the name of the OTRSP attached device.\n|-\n| '''<tt>wtOtrsp:GetFirmwareVersion()</tt>'''\n| Returns the firmware version of the OTRSP attached device. NOTE: Some devices do not support this API, and return an empty string.\n|-\n| '''<tt>wtOtrsp:Send(strCommand)</tt>'''\n| Sends a command string to the OTRSP attached device. The trailing <CR> character is optional, and is appended if needed.\n|-\n|}\n\n====Class wtQso====\n\n{| 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;\"\n|-\n| '''<tt>wtQso:IsCallsignEmpty()</tt>'''\n| Return a boolean : True if the callsign field of the active QSO is empty\n|-\n| '''<tt>wtQso:IsCallsignIncomplete()</tt>'''\n| Return a boolean : True if the callsign field of the active QSO contains a \"?\"\n|-\n| '''<tt>wtQso:IsExchangeEmpty()</tt>'''\n| Return a boolean : True if the exchange field of the active QSO is empty\n|-\n| '''<tt>wtQso:IsExchangeSent()</tt>'''\n| Return a boolean : True if the exchangeSent flag of the active QSO is set\n|-\n| '''<tt>wtQso:IsModeCW()</tt>'''\n| Return a boolean : True if the mode of active QSO is CW\n|-\n| '''<tt>wtQso:IsModeDigital()</tt>'''\n| Return a boolean : True if the mode of active QSO is digital\n|-\n| '''<tt>wtQso:SetExchangeSent()</tt>'''\n| Set the exchangeSent flag of the active QSO (see '''<tt>wtQso:IsExchangeSent()</tt>''') - Similar to the use of '''<tt>$SETEXCHSENT</tt>'''\n|-\n| '''<tt>wtQso:ResetExchangeSent()</tt>'''\n| Reset the exchangeSent flag of the active QSO (see '''<tt>wtQso:IsExchangeSent()</tt>''') - Similar to the use of '''<tt>$RSTEXCHSENT</tt>'''\n|-\n| '''<tt>wtQso:ClearStatus()</tt>'''\n| Clear the status flags of the active QSO\n|-\n| '''<tt>wtQso:GetData()</tt>'''\n| Returns a LUA table object with fields of the current QSO. The current available keys are \"time\", \"band\", \"mode\", \"freq\", \"callsign\", \"rstSent\", \"serialSent\", \"rstReceived\", \"exchReceived\", \"miscInfoReceived\", \"miscInfo2Received\", \"nQSONum\", \"stnName\" and \"stnFlags\"; e.g. qsoData = wtQso:GetData(), then wtQso:GetData[\"time\"] returns \"17:03\" or similar.\n|-\n| '''<tt>wtQso:GetIniFileName()</tt>'''\n| Returns File Name if INI file.\n|-\n| '''<tt>wtQso:GetLogFileName()</tt>'''\n| Returns Log File Name.\n|-\n| '''<tt>wtQso:GetModeId()</tt>'''\n| Return the mode ID of the active QSO (see [[API#Supported_mode_IDs|Supported mode IDs]]).\n|-\n| '''<tt>wtQso:IsCallsignRepeated()</tt>'''\n| Return a boolean. True if the callsign hasn't changed since the last Enter\n|-\n| '''<tt>wtQso:IsOperatingModeRun()</tt>'''\n| Return a boolean. True if the operating mode of the active QSO is RUN (and False if S&P)\n|-\n| '''<tt>wtQso:IsModePhone()</tt>'''\n| Return a boolean. True if the mode of the active QSO is Phone (SSB and FM), and False otherwise\n|-\n| '''<tt>wtQso:IsQsoApproved()</tt>'''\n| Return a boolean. True if all requested fields of the active QSO are filled (contest dependent)\n|-\n| '''<tt>wtQso:IsDupe()</tt>'''\n| Return a boolean. True if the current callsign is a dupe\n|-\n| '''<tt>wtQso:IsCurrentFieldCallsign()</tt>'''\n| Return a boolean : True if the current field is the callsign field\n|-\n| '''<tt>wtQso:IsCurrentFieldExchange()</tt>'''\n| Return a boolean : True if the current field is an exchange field\n|-\n| '''<tt>wtQso:IsCurrentFieldOther()</tt>'''\n| Return a boolean : True if the current field is not the callsign field or an exchange field\n|-\n| '''<tt>wtQso:IsCurrentFieldEmpty()</tt>'''\n| Return a boolean : True if the current field is empty (except RST for the exchange field)\n|-\n| '''<tt>wtQso:IsCurrentFieldPrimaryRadio()</tt>'''\n| Return a boolean : True if the current field is in the primary radio (main log)\n|-\n| '''<tt>wtQso:IsCurrentFieldSecondryRadio()</tt>'''\n| Return a boolean : True if the current field is in the secondary radio\n|-\n|}\n\n====Class wtRadio*====\n\nThe following generic functions can by applied to:\n'''<tt>wtRadio</tt>''' (the active one),\n'''<tt>wtRadioInactive</tt>''' (the non-active one),\n'''<tt>wtRadioPrimary</tt>''' (the one that is in the main log wnd)\n'''<tt>wtRadioSecondary</tt>''' (the one that is in the secondary log wnd)\n'''<tt>wtRadio1</tt>''' and '''<tt>wtRadio2</tt>'''.\n\nWARNING: Some functions may not work because of the CAT protocol or radio hardware limitations. \n\n{| 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;\"\n|-\n| '''<tt>wtRadio*:GetFreq()</tt>'''\n| Return freq of the active VFO of the designated radio freq is expressed in kHz\n|-\n| '''<tt>wtRadio*:GetFreq(NVfo)</tt>'''\n| Return freq of the designated VFO (0 => VFO A, 1 => VFO B) of the designated radio freq is expressed in kHz\n|-\n| '''<tt>wtRadio*:GetFreqInactiveVfo()</tt>'''\n| Return freq of the inactive VFO of the designated radio freq is expressed in kHz\n|-\n| '''<tt>wtRadio*:GetTypeId()</tt>'''\n| Return type of radio (see [[API#Radio_Types|Radio Types]])\n|-\n| '''<tt>wtRadio*:GetManufacturerId()</tt>'''\n| Return manufacturer of radio (see [[API#Radio_Manufacturer_Constants|Radio Manufacturer Constants]])\n|-\n| '''<tt>wtRadio*:SetFreq(freq)</tt>'''\n| Set freq of the active VFO of the designated radio freq is expressed in kHz\n|-\n| '''<tt>wtRadio*:SetFreq(freq, nVfo)</tt>'''\n| Set freq of the designated VFO (0 => VFO A, 1 => VFO B) of the designated radio freq is expressed in kHz\n|-\n| '''<tt>wtRadio*:SetFreqInactiveVfo(freq)</tt>'''\n| Set freq of the inactive VFO of the designated radio freq is expressed in kHz\n|-\n| '''<tt>wtRadio*:SetFreqSubVfo(freq)</tt>'''\n| Set freq of the sub VFO of the designated radio freq is expressed in kHz\n|-\n| '''<tt>wtRadio*:SetSplit(freq)</tt>'''\n| Set split ON and the split frequency on the designated radio freq is expressed in kHz\n|-\n| '''<tt>wtRadio*:ResetSplit()</tt>'''\n| Reset split on the designated radio\n|-\n| '''<tt>wtRadio*:IsSplit()</tt>'''\n| Return false or true whether the split is set or not on the designated radio\n|-\n| '''<tt>wtRadio*:GetRadioId()</tt>'''\n| Return the radioID (0 => RADIO_1, 1 => RADIO_2) of the designated radio\n|-\n| '''<tt>wtRadio*:Send(catString)</tt>'''\n| Send the ASCII catString to the designated radio\n|-\n| '''<tt>wtRadio*:SendHex(hexString)</tt>'''\n| 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.\n|-\n|}\n\nNOTE: '''<tt>wtRadio*:SetFreq(fFreq)</tt>''' and '''<tt>wtRadio*:SetFreq(fFreq, nVfo)</tt>''' ignore the frequency if it is outside of any band, and return with no error message.\n\n====Class wtScript====\n{| 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;\"\n|-\n| '''<tt>wtScript:AssignArgument()</tt>'''\n| function now takes the strings \"true\" and \"false\" as boolean arguments. Numeric values do not require double quotes. More details needed.\n|-\n| '''<tt>wtScript:AssignFKey()</tt>'''\n| assigns a function to an function key. More details needed.\n|-\n| '''<tt>wtScript:AssignKeyCode()</tt>'''\n| assigns a key code. More details needed.\n|-\n|}\n\n====Class wtStatus====\n{| 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;\"\n|-\n| '''<tt>wtStatus:GetList()</tt>'''\n| Returns a table with names of the stations in the network\n|-\n| '''<tt>wtStatus:GetStatus(strStation)</tt>'''\n| returns a table with fields of the status of a given station. Returns nil if this station doesn't exist. The table keys are \"band\" \"mode\" \"currentRadio\" \"radio1Freq\" \"radio2Freq\" \"radio1IsManual\" \"radio2IsManual\" \"passFreq\" \"type\" and \"qsyStatusId\".\n|-\n| '''<tt>wtStatus:GetFreq(strBand[, strMode])</tt>'''\n| returns the \"best\" pass freq for a given band and mode. To determine this frequency, it uses the same algorithm as the $FREQnn variable\n|-\n| '''<tt>wtStatus:GetMyStation()</tt>'''\n| returns the station number.\n|-\n|}\n\n===Win-Test API Variables===\n* '''<tt>wtArg</tt>''': get the optional argument set in the Script Manager or in a '''#SCRIPT(argument)''' call. '''<tt>wtArgument</tt>''' is also provided for backward compatibility. Both variables are local to the script called.\n* '''<tt>wtCurrentScript</tt>''': contains the script name currently executed, without extension\n* '''<tt>wtRootScript</tt>''': contains the name of the top-most called script, without extension\n\n===Win-Test API Constants===\n'''The most current list of Win-Test API Constants may be found at [http://download.win-test.com/v4/lua/constants.wts http://download.win-test.com/v4/lua/constants.wts].'''\n\nConstants are not guaranteed to remain constant in Lua, that is, a program can update these variables. Any 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.  Avoid creating variable names starting with WT_.\n\n====Child window IDs====\n<pre>\nWT_WND_SUMMARY = 0;\nWT_WND_GRIDSQUAREMAP = 1;\nWT_WND_CHECKPARTIAL = 2;\nWT_WND_RATESHEET = 3;\nWT_WND_CLOCK = 4;\nWT_WND_VUMETER = 5;\nWT_WND_RATE = 6;\nWT_WND_GAB = 7;\nWT_WND_MAP = 8;\nWT_WND_CHECKCOUNTRY = 9;\nWT_WND_ZONE = 10;\nWT_WND_MULT = 11;\nWT_WND_NP1 = 12;\nWT_WND_RADIO1 = 13;\nWT_WND_RADIO2 = 14;\nWT_WND_PACKETCLUSTER = 15;\nWT_WND_DXCLUSTERANN = 16;\nWT_WND_SOLAR = 17;\nWT_WND_PARTNER = 18;\nWT_WND_STATUS = 19;\nWT_WND_SKED = 20;\nWT_WND_CHECKCALL = 21;\nWT_WND_SECONDARYRADIO = 22;\nWT_WND_RTTY1 = 23;\nWT_WND_RTTY2 = 24;\nWT_WND_QSYWIZARD = 25;\nWT_WND_EXTRAINFO = 26;\nWT_WND_ZONE2 = 27;\nWT_WND_ROTATORS = 28;\nWT_WND_CONTESTRECORDER = 29;\n</pre>\n\n====Supported contest IDs====\n<pre>\nWT_CONTEST_IARU_VHF = 1;\nWT_CONTEST_IARU_UHF = 2;\nWT_CONTEST_IARU_CW = 3;\nWT_CONTEST_IARU_HF = 4;\nWT_CONTEST_IARU_R1_50MHZ = 5;\nWT_CONTEST_REF_THF = 10;\nWT_CONTEST_REF_DDFM_50MHZ = 11;\nWT_CONTEST_THF_EU = 20;\nWT_CONTEST_THF_EU_50_70 = 21;\nWT_CONTEST_THF_EU_GRIDSQUARE = 30;\nWT_CONTEST_THF_EU_GRIDSQUARE_50_70 = 31;\nWT_CONTEST_THF_EU_GRIDSQUARE_NO_DIST = 32;\nWT_CONTEST_THF_EU_GRIDSQUARE_NO_DIST_50_70 = 33;\nWT_CONTEST_REF_HF = 100;\nWT_CONTEST_ARRL_DX = 101;\nWT_CONTEST_ARRL_10 = 102;\nWT_CONTEST_ARRL_160 = 103;\nWT_CONTEST_ARRL_SWEEPSTAKES = 104;\nWT_CONTEST_ARRL_FD = 105;\nWT_CONTEST_ARRL_RU = 106;\nWT_CONTEST_ARRL_UHF_AUG = 130;\nWT_CONTEST_ARRL_VHF_JAN = 131;\nWT_CONTEST_ARRL_VHF_JUN = 132;\nWT_CONTEST_ARRL_VHF_SEP = 133;\nWT_CONTEST_REF_160 = 150;\nWT_CONTEST_CQWW_DX = 200;\nWT_CONTEST_CQWW_WPX = 201;\nWT_CONTEST_CQWW_160 = 202;\nWT_CONTEST_CQWW_VHF = 250;\nWT_CONTEST_RDXC = 300;\nWT_CONTEST_RDAC = 301;\nWT_CONTEST_CIS = 302;\nWT_CONTEST_R_160 = 303;\nWT_CONTEST_RRTC = 304;\nWT_CONTEST_RAEM = 305;\nWT_CONTEST_DXPEDITION_HF = 400;\nWT_CONTEST_DXPEDITION_VHF = 410;\nWT_CONTEST_ALL_ASIAN = 500;\nWT_CONTEST_SPDXC = 600;\nWT_CONTEST_JIDX = 700;\nWT_CONTEST_KCJ = 701;\nWT_CONTEST_KCJ_TOPBAND = 702;\nWT_CONTEST_YUDXC = 800;\nWT_CONTEST_CQM = 900;\nWT_CONTEST_ARI = 1000;\nWT_CONTEST_ARI_SEZIONI = 1001;\nWT_CONTEST_ARI_40_80 = 1002;\nWT_CONTEST_BALTIC = 1100;\nWT_CONTEST_KING_OF_SPAIN = 1200;\nWT_CONTEST_IOTA = 1300;\nWT_CONTEST_RSGB_160 = 1301;\nWT_CONTEST_RSGB_80_CC = 1302;\nWT_CONTEST_RSGB_CMW = 1303;\nWT_CONTEST_RSGB_15_10 = 1304;\nWT_CONTEST_RSGB_AFS = 1305;\nWT_CONTEST_WAEDC = 1400;\nWT_CONTEST_WAG = 1401;\nWT_CONTEST_DARC_XMAS = 1402;\nWT_CONTEST_DARC_10 = 1403;\nWT_CONTEST_YODXC = 1500;\nWT_CONTEST_EU_HF = 1600;\nWT_CONTEST_SCC = 1601;\nWT_CONTEST_OCDXC = 1700;\nWT_CONTEST_TOECC = 1800;\nWT_CONTEST_SAC = 1900;\nWT_CONTEST_NRAU_BALTIC = 1901;\nWT_CONTEST_NAC = 1902;\nWT_CONTEST_SARTG = 1903;\nWT_CONTEST_QP_TX = 2000;\nWT_CONTEST_EU_SPRINT = 2100;\nWT_CONTEST_UKDXC = 2200;\nWT_CONTEST_OKOMDXC = 2300;\nWT_CONTEST_STEW_PERRY = 2400;\nWT_CONTEST_GACW_DX = 2401;\nWT_CONTEST_NINE_KCC_15 = 2402;\nWT_CONTEST_FOC_MARATHON = 2403;\nWT_CONTEST_LOTW = 2404;\nWT_CONTEST_AP_SPRINT = 2405;\nWT_CONTEST_JARTS = 2406;\nWT_CONTEST_MARCONI_HF = 2407;\nWT_CONTEST_LZDX = 2500;\nWT_CONTEST_CROATIAN_CW = 2600;\nWT_CONTEST_UBADX = 2700;\nWT_CONTEST_UBA_SPRING_80M = 2701;\nWT_CONTEST_UBA_SPRING_6M = 2702;\nWT_CONTEST_UBA_SPRING_2M = 2703;\nWT_CONTEST_ON_80M = 2704;\nWT_CONTEST_ON_6M = 2705;\nWT_CONTEST_ON_2M = 2706;\nWT_CONTEST_RAC_DAY = 2800;\nWT_CONTEST_RAC_WINTER = 2801;\nWT_CONTEST_PACC = 2900;\nWT_CONTEST_HELVETIA = 3000;\nWT_CONTEST_HELVETIA_VHF = 3001;\nWT_CONTEST_IARU_FD_R1_GENERIC = 3100;\nWT_CONTEST_IARU_FD_R1_DARC = 3101;\nWT_CONTEST_IARU_FD_R1_RSGB = 3102;\nWT_CONTEST_UFT_HF = 3200;\nWT_CONTEST_AGCW_HNY = 3300;\nWT_CONTEST_HA_DX = 3400;\nWT_CONTEST_NAQP = 3500;\nWT_CONTEST_NA_SPRINT = 3501;\nWT_CONTEST_NCCC_SPRINT = 3600;\nWT_CONTEST_CQIR = 3700;\n</pre>\n\n====Supported mode IDs====\n<pre>\nWT_MODE_CW = 0;\nWT_MODE_SSB = 1;\nWT_MODE_RTTY = 2;\nWT_MODE_FM = 3;\nWT_MODE_PSK = 4;\nWT_MODE_PKT = 5;\nWT_MODE_HELL = 6;\nWT_MODE_SAT = 7;\n</pre>\n\n====Status key IDs====\n<pre>\nWT_KEY_NONE = 0;\nWT_KEY_SHIFT = 1;\nWT_KEY_ALT = 2;\nWT_KEY_CTRL = 4;\n</pre>\n\n====Radio Constants====\n<pre>\nWT_RADIO_MAX = 2;\n\nWT_RADIO_VFOA = 0;\nWT_RADIO_VFOB = 1;\n\nWT_RADIO_1 = 0;\nWT_RADIO_2 = 1;\n</pre>\n\n====Radio Manufacturer Constants====\n<pre>\nWT_RADIO_MANUFACTURER_UNKNOWN = 0;\nWT_RADIO_MANUFACTURER_ICOM = 1;\nWT_RADIO_MANUFACTURER_YAESU = 2;\nWT_RADIO_MANUFACTURER_KENWOOD = 3;\nWT_RADIO_MANUFACTURER_TENTEC = 4;\nWT_RADIO_MANUFACTURER_ELECRAFT = 5;\nWT_RADIO_MANUFACTURER_FLEXRADIO = 6;\n</pre>\n\n====Radio Types====\n<pre>\nWT_RADIO_UNKNOWN = -1;\nWT_RADIO_NONE = 0;\nWT_RADIO_KENWOOD = 1;\nWT_RADIO_IC703 = 1703;\nWT_RADIO_IC706 = 1706;\nWT_RADIO_IC706MkII = 17061;\nWT_RADIO_IC706MkIIG = 17062;\nWT_RADIO_IC718 = 1718;\nWT_RADIO_IC725 = 1725;\nWT_RADIO_IC728 = 1728;\nWT_RADIO_IC729 = 1729;\nWT_RADIO_IC735 = 1735;\nWT_RADIO_IC736 = 1736;\nWT_RADIO_IC738 = 1738;\nWT_RADIO_IC737 = 1737;\nWT_RADIO_IC746 = 1746;\nWT_RADIO_IC746Pro = 17761;\nWT_RADIO_IC751 = 1751;\nWT_RADIO_IC756 = 1756;\nWT_RADIO_IC756Pro = 17561;\nWT_RADIO_IC756ProII = 17562;\nWT_RADIO_IC756ProIII = 17563;\nWT_RADIO_IC761 = 1761;\nWT_RADIO_IC765 = 1765;\nWT_RADIO_IC775 = 1775;\nWT_RADIO_IC781 = 1781;\nWT_RADIO_IC275 = 1275;\nWT_RADIO_IC475 = 1475;\nWT_RADIO_IC1275 = 11275;\nWT_RADIO_IC910 = 1910;\nWT_RADIO_IC7000 = 17000;\nWT_RADIO_IC7600 = 17600;\nWT_RADIO_IC7700 = 17700;\nWT_RADIO_IC7800 = 17800;\nWT_RADIO_ICGENERIC = 1000;\nWT_RADIO_FT1000MP = 2110;\nWT_RADIO_FT1000 = 2100;\nWT_RADIO_FT2000 = 2200;\nWT_RADIO_FT990 = 2099;\nWT_RADIO_FT920 = 2092;\nWT_RADIO_FT100 = 2010;\nWT_RADIO_FT847 = 20847;\nWT_RADIO_FT900 = 2090;\nWT_RADIO_FT897 = 20897;\nWT_RADIO_FT817 = 20817;\nWT_RADIO_FT857 = 20857;\nWT_RADIO_FT757GXII = 207572;\nWT_RADIO_FTDX9000 = 2900;\nWT_RADIO_FT450 = 2450;\nWT_RADIO_FT950 = 2950;\nWT_RADIO_ORION = 3000;\nWT_RADIO_OMNI6 = 3001;\nWT_RADIO_JUPITER = 3002;\nWT_RADIO_OMNI7 = 3003;\nWT_RADIO_ORION_II = 3004;\nWT_RADIO_SDR1000 = 4000;\nWT_RADIO_K2 = 5000;\nWT_RADIO_K3 = 5001;\nWT_RADIO_OMNIRIG = 6000;\n</pre>\n\n====microHAM Device IDs====\n<pre>\nWT_MICROHAM_NONE = 0;\nWT_MICROHAM_MK = 1;\nWT_MICROHAM_MKII = 2;\nWT_MICROHAM_MK2R = 10;\nWT_MICROHAM_MK2R_PLUS = 11;\nWT_MICROHAM_MICRO_2R = 12;\n</pre>\n\n===Advanced Programming Examples===\n====ESM Script (embedded into Win-Test)====\nFor convenience, you can find below the current ESM (Enter Sends Message) 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!\n\nThe script assumes the following messages have been programmed into the [[Menu:Options#Modify_standard_messages...|Standard CW messages]] dialog:\n\n----\n'''F1''' => CQ<br>\n'''F2''' => RST + Exchange<br>\n'''F3''' => TU<br>\n'''F4''' => $MYCALL<br>\n'''F5''' => $LOGGED<br>\n'''F7''' => ? or Again (Phone)<br>\n'''INSERT''' => Sends exchange (CW and RTTY)<br>\n'''PLUS''' => TU and Log the QSO<br>\n----\n\nHere is the source code for '''esm.wts'''.  To change the behavior, save it in the Win-Test scripts directory (File | Explore | /scripts directory), then edit it.\n\n -- v1.2 All variables in messages replaced by keypresses\n -- v1.1 Dupes taken into account in the S&P mode\n -- v1.0 Initial version\n \n -- Send functions\n \n function sendCq()\n    wtQso:ResetExchangeSent();\n    wtApp:SendFKey(\"F1\");  -- Always use the function key\n end;\n \n function sendExchangeRun()\n    wtApp:SendFKey(wtQso:IsModePhone() and \"F2\" or \"INSERT\"); -- Ternary Operator\n    wtQso:SetExchangeSent();\n end;\n \n function sendExchangeAgain()\n    if (wtQso:IsModePhone()) then\n       wtApp:SendFKey(\"F2\");\n    else\n       wtApp:SendFKey(\"F5\"); -- $LOGGED\n       wtApp:SendFKey(\"F7\"); -- ?\n    end;\n end;\n \n function sendTu()\n    wtApp:SendFKey(\"PLUS\");\n    wtQso:ClearStatus();\n end;\n \n function sendQuestionMark()\n    wtQso:ResetExchangeSent();\n    wtApp:SendFKey(\"F7\"); -- Again ?\n end;\n \n function sendMyCall()\n    wtApp:SendFKey(\"F4\"); -- My call\n end;\n \n function sendExchangeSAndP()\n    wtApp:SendFKey(\"F2\");\n    wtQso:SetExchangeSent();\n end;\n \n \n -- ESM core code\n \n -- Return 0 (or return nothing) if we want the CR\n -- to be processed also by WT (ie log QSO) and -1 if not.\n \n if (wtQso:IsOperatingModeRun()) then -- Run\n    if (wtContest:IsExchangeRequired()) then -- Usual contests\n       if (wtQso:IsExchangeEmpty() or not wtQso:IsQsoApproved()) then\n          if (wtQso:IsCallsignEmpty()) then\n             sendCq();\n          else\n             if (wtQso:IsCallsignRepeated()) then\n                sendExchangeAgain();\n             else\n                sendExchangeRun();\n             end;\n          end;\n       else\n          if (wtQso:IsExchangeSent()) then\n             sendTu()\n          else\n             sendExchangeRun();\n          end;\n       end;\n    else -- DXPed etc.\n       if (not wtQso:IsQsoApproved()) then\n          if (wtQso:IsCallsignEmpty()) then\n             sendCq();\n          else\n             if (wtQso:IsCallsignRepeated()) then\n                sendExchangeAgain();\n             else\n                sendExchangeRun();\n             end;\n          end;\n       else\n          if (wtQso:IsExchangeSent()) then\n             sendTu();\n          else\n             sendExchangeRun();\n          end;\n       end;\n    end;\n else -- S&P : The automatic exchange fill (if enabled) is disabled by WT\n    if ( (wtQso:IsExchangeEmpty() and wtContest:IsExchangeRequired())\n      or not wtQso:IsQsoApproved() ) then\n       if (wtQso:IsCallsignEmpty()) then\n          sendQuestionMark();\n       else\n          if (not wtQso:IsDupe()) then -- Call only if not dupe\n             sendMyCall();\n          end;\n       end;\n    else\n       if (wtQso:IsExchangeSent()) then\n          wtQso:ClearStatus();\n          return 0; -- Log it silently\n       else\n          if (not wtQso:IsDupe()) then -- Sent exchange only if not dupe\n             sendExchangeSAndP();\n          end;\n       end;\n    end;\n end;\n \n return -1; -- This script overrides the Win-Test CR process\n\n====Alternative ESM Script (provided by F5VIH/SV3SJ)====\n\nAt the top of the script you will find a variable setting:\n\n shortcq = false;\n\nSetting 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?)\n\nI 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).\n\nIn the mean time if you have suggestions to improve the script let me know. I can easily inlcude them.\n\n<pre>\n----------------------------------- \n-- Wintest ESM - Nick, F5VIH/SV3SJ\n-- Set \"shortCQ to true or false\n-----------------------------------\n\nshortcq = false;\nshortCQ = \"$MYCALL\";\nshortTU = \"$CORRECT ++TU-- $CR\";\n\n-- Send functions\n\nfunction sendCq()\n wtQso:ResetExchangeSent();\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F1\");\n else\n   if (shortcq) then\n     wtKeyer:Play(shortCQ);\n   else\n     wtApp:SendFKey(\"F1\");  -- Always use the function key\n   end;\n end;\nend;\nfunction sendExchangeRun()\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F2\");\n   wtKeyer:Play(\"$CR\");\n else\n   wtKeyer:Play(\"$INSERT\");\n end;\n wtQso:SetExchangeSent();\nend;\n\nfunction sendExchangeAgain()\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F2\");\n else\n   wtKeyer:Play(\"$F5 $F7\"); -- $LOGGED ?\n end;\nend;\n\nfunction sendTu()\n if (wtQso:IsModePhone()) then\n   if (shortcq) then\n     wtKeyer:Play(\"$CR\");\n     wtApp:SendFKey(\"F5\");\n   else\n     wtApp:SendFKey(\"PLUS\");\n   end;\n else\n   if (shortcq) then\n     wtKeyer:Play(shortTU);\n   else\n     wtKeyer:Play(\"$PLUS\");\n   end;\n end;\n wtQso:ClearStatus();\nend;\n\nfunction sendQuestionMark()\n wtQso:ResetExchangeSent();\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F7\"); -- Again ?\n else\n   wtKeyer:Play(\"$F7\");\n end;\nend;\n\nfunction sendMyCall()\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F4\"); -- My call\n else\n   wtKeyer:Play(\"$F4\");\n end;\nend;\n\nfunction sendExchangeSAndP() -- Sends appropriate exchange when in S&P mode\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F2\"); -- 5NN EXCHANGE\n else\n   wtKeyer:Play(\"$F2\");\n end;\n wtQso:SetExchangeSent();\nend;\n\nfunction sendAskForCall()\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F7\"); -- AGN\n else\n   wtKeyer:Play(\"CL?\");\n end;\nend;\n\nfunction askForNumber()\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F6\"); -- NR AGN\n else\n  wtKeyer:Play(\"$F6\");\n end;\nend;\n\nfunction askWithPartialCall()\n if (wtQso:IsModePhone()) then\n   wtApp:SendFKey(\"F7\"); -- AGN\n else\n   wtKeyer:Play(\"$F5 ?\");\n  end;\n end;\n\n-- ESM core code\n\n-- Return 0 (or return nothing) if we want the CR\n-- to be processed also by WT (ie log QSO) and -1 if not.\n\nif (wtQso:IsOperatingModeRun()) then -- Run Mode\n if (wtContest:IsExchangeRequired()) then -- Usual contests requiring an exchange\n  if (wtQso:IsCallsignEmpty()) then\n    if (wtQso:IsExchangeEmpty()) then\n      sendCq();\n    else -- we ve got an exchange but not a call, ask for the call\n      sendAskForCall();\n    end;\n  else -- call is not empty\n    if (wtQso:IsExchangeSent()) then -- we have sent the exchage\n      if (not wtQso:IsQsoApproved()) then\n        if (wtQso:IsCurrentFieldCallsign() and not wtQso:IsExchangeEmpty()) then\n          askWithPartialCall();\n        end;\n        if (wtQso:IsCurrentFieldCallsign() and wtQso:IsExchangeEmpty()) then\n         wtQso:ResetExchangeSent();\n         sendExchangeRun();\n         if (wtQso:IsCurrentFieldCallsign()) then wtKeyer:Play(\"$SPACEBAR\") end;\n        end;\n        if (wtQso:IsCurrentFieldExchange() and wtQso:IsExchangeEmpty()) then\n          askForNumber();\n        end;\n      else -- qso has valid call and exchange\n        if (wtQso:IsCurrentFieldExchange()) then\n          sendTu();\n        else -- current field is not exchange (should be callsign)\n         if (wtQso:IsCurrentFieldCallsign()) then\n          wtQso:ResetExchangeSent();\n          sendExchangeRun();\n          if (wtQso:IsCurrentFieldCallsign()) then wtKeyer:Play(\"$SPACEBAR\") end;\n         end;\n        end;\n      end;\n\n    else -- have not sent exchange and we are in the call field\n      sendExchangeRun();\n       if (wtQso:IsCurrentFieldCallsign()) then wtKeyer:Play(\"$SPACEBAR\") end;\n    end;\n end;\n\n else -- The contest doesnt require an exchange to be received e.g. DXPed etc.\n   if (not wtQso:IsQsoApproved()) then\n     if (wtQso:IsCallsignEmpty()) then\n       sendCq();\n     else\n       if (wtQso:IsCallsignRepeated()) then\n         sendExchangeAgain();\n       else\n         sendExchangeRun();\n       end;\n     end;\n   else\n     if (wtQso:IsExchangeSent()) then\n       sendTu();\n     else\n       sendExchangeRun();\n     end;\n   end;\n end;\n\nelse -- S&P : The automatic exchange fill (if enabled) is disabled by WT\n if ( (wtQso:IsExchangeEmpty() and wtContest:IsExchangeRequired()) or not wtQso:IsQsoApproved() ) then\n   if (wtQso:IsCallsignEmpty()) then\n     sendQuestionMark();\n   else\n     if (not wtQso:IsDupe()) then -- Call only if not dupe\n       sendMyCall();\n     end;\n   end;\n else\n   if (wtQso:IsExchangeSent()) then\n     wtQso:ClearStatus();\n     wtKeyer:Play(\"$CR\");\n     return -1; -- Log it silently\n   else\n     if (not wtQso:IsDupe()) then -- Sent exchange only if not dupe\n       sendExchangeSAndP();\n     end;\n   end;\n end;\nend;\n\nreturn -1; -- This script overrides the Win-Test CR process\n</pre>\n\n====Grab next call from partner window====\nThe 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.\n\n<pre>\nwtKeyer:Play(\"$CORRECT TU $CR NOW $GRABPARTNER $NEXT $GUESSEXCH $F2 $13\");\n</pre>\n\n====Re-map [\u00c4] key with /P for Field Day====\nPractical in Field Day where a lot of stations are signing \"/P\" - especially with a German keyboard layout. \n\n<pre>\n-- add /P to a callsign for Field Day operations\nwtApp:SendKeyCode(47);\nwtApp:SendKeyCode(112);\n</pre>\n\n====Change background of Main Window depening on RUN/S&P Mode====\nThe idea to this script was provided by GW3NJW. Name this script '''<tt>RunSPSwitch.wts</tt>''' and have it assigned to '''<tt>Ctrl-Tab</tt>'''\n\n<pre>\nif (wtApp:IsPostKeyProcess()) then\n  if (wtQso:IsOperatingModeRun()) then\n    wtApp:SetWindowColor(-1, 0, 165, 165);\n  else\n    wtApp:SetWindowColor(-1, 128,128,128);\n  end;\nelse\n  return 1; -- Triggers a post key process call\nend;\n</pre>"
                            }
                        },
                        "comment": "/* Class wtRadio* */"
                    }
                ]
            },
            "1": {
                "pageid": 1,
                "ns": 0,
                "title": "Main Page",
                "revisions": [
                    {
                        "user": "Dl6rai",
                        "timestamp": "2020-04-05T16:54:18Z",
                        "slots": {
                            "main": {
                                "contentmodel": "wikitext",
                                "contentformat": "text/x-wiki",
                                "*": "__NOTOC__\n<div style=\"width:100%;margin-bottom:20px\">\n{{Main Page header}}\n</div>\n\n<ol type=\"I\">\n<li>'''[[Preface]]''' \n  <ol>\n    <li>[[Preface#Authors and Contributors|Authors and contributors]]\n  </ol>\n<li> '''[[Installation|Installation]]'''\n      <ol> \n         <li>[[Installation#Download_the_software|Download the software]]\n         <li>[[Installation#Install_the_software|Install the software]]\n         <li>[[Installation#Registering_the_software|Registering the software]]\n      </ol>\n<li> '''[[Configuration|Configuration]]''' \n  <ol>\n    <li> [[Configuration#One-time_configuration|One-time configuration]] \n    <ul>\n      <li> [[Interfaces|Interface configuration]] \n      <li> [[FAQ:DX_Cluster_and_wtDxTelnet|DX Cluster configuration]]\n      <li> [[Rotators|Rotator configuration]]\n      <li> [[RTTY|RTTY configuration]] \n      <li> [[Networking|Setting up networking]]\n      <li> [[Best Practice|Category:BestPractice]]\n    </ul>\n    <li> [[Configuration#One-time_configuration|Pre-contest configuration]]\n</ol>\n    <li> '''[[Running_a_contest|Running a contest]]'''\n      <ol>\n        <li>[[Running_a_contest#Logging_QSOs|Logging QSOs]]\n        <li>[[Running_a_contest#SO1R_specifics|SO1R]]\n        <li>[[Running_a_contest#SO2R_specifics|SO2R]]\n        <li>[[Running_a_contest#Multi-op_contesting|Multi-op]]\n        \n        <li>[[Contest_specific_behaviour#Contest_specific_Behaviour|Contest-specific behaviour]]\n        <li>[[Running_a_contest#post_online_score|Posting live score on-line]]\n        <li>[[Running_a_contest#Post-contest_specifics|Post-contest specifics]]\n      </ol>\n\n<li> '''[[Menus]]''' \n  <ol>\n    <li>[[Menu:File_new|File (without a Win-Test file opened)]]\n    <li>[[Menu:File_open|File (with a Win-Test file opened)]]\n    <li>[[Menu:Edit|Edit]]\n    <li>[[Menu:Operating|Operating]]\n    <li>[[Menu:Commands|Commands]]\n    <li>[[Menu:Messages|Messages]]\n    <li>[[Menu:Tools|Tools]]\n    <li>[[Menu:Windows|Windows]]\n    <li>[[Menu:Options|Options]]\n    <li>[[Menu:Help|Help]]\n</ol>\n<li> '''More...''' \n  <ol>\n    <li>[[Icon bar]]\n    <li>[[Text commands]]\n    <li>[[Keys]]\n    <li>[[Message variables|Message variables (aka macros)]]\n    <li>[[Supported Contests|Supported contests]]\n    <li>[[Supported rigs]]\n    <li>[[Supported Accessories|Supported accessories]]\n    <li>[[Check Partial and Np1 Files|Check Partial and N+1 Files]]\n    <li>[[Database Files|Database files]]\n    <li>[[Other Files|Other files...]]\n    <li>[[Release Notes|Release notes]]\n    <li>[[Release Notes V3|Release notes (old version 3 archive)]]\n</ol>\n<li> '''Frequently Asked Questions (FAQ)''' \n<ol>\n    <li>[[FAQ:Problems Registering and Running|Problems registering and running]]\n    <li>[[FAQ:DX Cluster and wtDxTelnet|DX Cluster and wtDxTelnet]]\n    <li>[[FAQ:Rotator_Control_and_wtRotators|Rotator control and wtRotators]]\n    <li>[[FAQ:User Interface|User interface]]\n    <li>[[FAQ:Networking|Networking]]\n    <li>[[FAQ:Licensing|Licensing issues]]\n</ol>\n<li> '''See also ''' \n<ul>\n   <li>[[FAQ:Problems_Registering_and_Running#How_do_I_install.2C_register_and_configure_Win-Test_on_a_new_computer.3F|Win-Test installation, registration and configuration guide]]\n    <li>[http://www.win-test.com/rubrique.php3?id_rubrique=1630 Win-Test quick start manual] &mdash; for Win-Test 3.11.0  (slightly outdated)\n    <li>[[Mailing List|Win-Test mailing list]]\n</ul>"
                            }
                        },
                        "comment": ""
                    }
                ]
            }
        }
    }
}