Macros

Macros are short text statements that contain imbedded references to text data used by the program fldigi.   Macro definition files(s) are located in the $HOME/.fldigi/macros/ directory and all have the extention ".mdf".  The default set of macros are contained in the file $HOME/.fldigi/macros/macros.mdf.  Fldigi will create this file with a set of default macros on its first execution.

Fldigi supports up to 48 macro definitions in sets of 12.  Macro definitions are not recursive, that is; a macro cannot reference another macro or itself.

The imbedded references are similar to those used by DigiPan and other fine modem programs.  The imbedded reference is an uppercase plain text descriptor contained with the <> brackets.

<FREQ> my frequency
<MODE> mode
<MYCALL> my call
<MYLOC> my locator
<MYNAME> my name
<MYQTH> my QTH
<MYRST> my RST
<VER> Fldigi version


<CALL> other stations callsign
<INFO1> S/N or other data contained in first info field of status bar
<INFO2> IMD or other data contained in second info field of status bar
<LOC> other stations locator
<NAME> other stations name
<QTH> other stations QTH
<RST> other stations RST


<MAPIT> map other stations locator on google
<MAPIT:adr | lat | loc> map other stations address, latitude-longitude or locator as specified


<CLRRX> clear RX pane
<CLRTX> clear TX pane


<GET> text to NAME/QTH
<TALK:on | off | t> Digitalk On, Off, Toggle; this is a Windows only tag and Digitalk must be running
<LOG> save QSO data to logbook immediately
<LNW> log at xmt time
<CLRLOG> clear log fields
<EQSL:[message>
submit the current log entry to www.eQSL.cc
This macro tag should be put before <LOG> or <LNW>


<QSOTIME> insert current logbook time HHMM, ie 0919
<ILDT> insert current local date-time in iso-8601 format, ie 2011-08-28 04:16-0500
<LDT> insert Local date-time, ie 2011-08-28 04:16-0500
<IZDT> insert Zulu date-time in iso-8601 format, ie 08/28/2011 04:16 CDT
<ZDT> insert Zulu date-time, ie 2011-08-28 09:16Z
<LT> insert local time, ie 0416
<ZT> insert zulu time, ie 0916Z
<LD> insert local date, ie 2011-08-28
<ZD> insert Zulu date, ie 2011-08-28
<WX>
<WX:xxxx>
insert current weather data from METAR as specified on WX configuration tab. see WX configure
replace xxxx with the 4 letter METAR designator for a report on a station other than the one specified on the weather configuration tab.


<CNTR> insert current value of contest counter
<DECR> decrement contest counter
<INCR> increment contest counter
<XIN> send exchange in string
<XOUT> send exchange out string
<XBEG> mark exchange in start
<XEND> mark exchange in end
<SAVEXCHG> save marked text to contest exchange in


<RX> receive
<TX> transmit
<TX/RX> toggle Transmit / Receive


<SRCHUP> search UP for next signal
<SRCHDN> search DOWN for next signal


<GOHOME> return to waterfall cursor to sweet spot
<GOFREQ:NNNN> move waterfall cursor to freq NNNN Hz
<QSYTO> same as left-clk on QSY button
<QSYFM> same as right-clk QSY button
<QSY:FFF.F[:NNNN]> Qsy to transceiver frequency in kHz, optional waterfall (Audio) frequency in Hz (If not specified, it i not changed). Several QSY frequencies, or ranges of frequencies provided by one increment, can be proposed, in which case the first frequency after the current frequency is chosen.


<RIGMODE:mode> send CAT command to transceiver to change to a valid mode
<FILWID:width> send CAT command to transceiver to change to a valid filter width

example to QSY to sweetspot (center of bandpass filter) and select narrow filter

<QSYTO><FILWID:200>

example to restore previous waterfall cursor frequency and bandwidth

<QSYFM><FILWID:2700>


<FILE:> insert text file; a file selection box will open when this tag is selected during editing


<IDLE:NN.nn> transmit idle signal for NN.nn sec
<TIMER:NN> repeat this macro every NN sec
<TUNE:NN> transmit single tone tune signal for NN sec
<WAIT:NN> insert delay of NN seconds before transmitting
<REPEAT> repeat macro continuously
<SKED:hhmm[:YYYYDDMM]>
schedule execution to begin at time and optionally date specified


<CWID> transmit a CW callsign identifier
<ID> transmit mode ID using waterfall video text
<TEXT> transmit video text defined on ID configuration tab
<TXRSID:on | off | t> transmit RSID on, off, toggle
<RXRSID:on|off|t> receive RSID on, off, toggle
<DTMF:[Wn:][Ln:]tones
transmit DTMF tone sequence at start of transmission; options
W-wait n msec, default 0
L-tone symbol length n in msec; default 50 msec
'-', ' ' and ',' insert silence symbol
eg: <DTMF:W250:L100:1-256-827-3200>


<POST:+/-nn.n> CW QSK post-timing in milliseconds
<PRE:nn.n> CW QSK pre-timing in milliseconds
<RISE:nn.n><RISE:nn.n> CW rise time in milliseconds
<WPM:NN> CW WPM


<AFC:on | off | t> AFC  on, off, toggle
<LOCK:on | off | t> lock waterfall cursor; on, off, toggle
<REV:on | off | t>
Reverse on, off, toggle


<MACROS:> load a new macro defs file; file prompt when editing macro

Macro tags are also assigned to each supported modem type and sub-modem type that is supported by fldigi:

<MODEM:CW> <MODEM:MFSK-8> <MODEM:BPSK31> <MODEM:OLIVIA> <MODEM:THOR4>
<MODEM:DomEX4> <MODEM:MFSK16> <MODEM:BPSK63> <MODEM:OLIVIA:250:8> <MODEM:THOR5>
<MODEM:DomEX5> <MODEM:MFSK-32> <MODEM:BPSK63F> <MODEM:OLIVIA:500:8> <MODEM:THOR8>
<MODEM:DomEX8> <MODEM:MFSK-4> <MODEM:BPSK125>
<MODEM:OLIVIA:500:16> <MODEM:THOR11>
<MODEM:DomX11> <MODEM:MFSK-11> <MODEM:BPSK250> <MODEM:OLIVIA:1000:8> <MODEM:THOR16>
<MODEM:DomX16> <MODEM:MFSK-22> <MODEM:BPSK500> <MODEM:OLIVIA:1000:32> <MODEM:THOR22>
<MODEM:DomX22> <MODEM:MFSK-31> <MODEM:QPSK31> <MODEM:RTTY> <MODEM:THROB1>
<MODEM:FELDHELL> <MODEM:MFSK-64> <MODEM:QPSK63> <MODEM:RTTY:170:45.45:5:90> <MODEM:THROB2>
<MODEM:SLOWHELL> <MODEM:MT63-500> <MODEM:QPSK125> <MODEM:RTTY:170:50:5:100> <MODEM:THROB4>
<MODEM:HELLX5> <MODEM:MT63-1XX> <MODEM:QPSK250> <MODEM:RTTY:850:75:5:150> <MODEM:THRBX1>
<MODEM:HELLX9> <MODEM:MT63-2XX> <MODEM:QPSK500> <MODEM:RTTY:shift:baud:bits:bandwidth>
<MODEM:THRBX2>
<MODEM:FSK-HELL>
<MODEM:PSK125R>
<MODEM:THRBX4>
<MODEM:FSK-H105>
<MODEM:PSK250R>
<MODEM:WWV>
<MODEM:HELL80>
<MODEM:PSK500R>
<MODEM:ANALYSIS>





<MODEM:NULL>
null modem - Rx stream is discarded. Tx stream is silent but PTT is enabled



Local references are specified during the program configuration and can be changed during program operation.

Remote references are all part of the qso log field definitions and are routinely changed from contact to contact.

Global references are for items like Greenwich Mean Time.

The macros.mdf file can be edited with any ascii text editor such as kedit, gedit, geany, nano etc.  But it is much easier to use the built-in macro editor provided in the program.

Right click on any macro key (or the alternate set) and a macro editing dialog opens with the current copy of that macro and its label.  This looks very similar to the DigiPan macro editor at the urging of Skip Teller, KH6TY.



The Text box is a mini-editor with a very limited set of control functions.  You can mark, bound and select text for deletion (ctrl-X), copy (ctrl-C), and paste (ctrl-V).  Marked text can also be deleted with the delete or the backspace keys.  Marked text modification can also be invoked by using the mouse right click after highlighting.  

The macro reference in the pick list can be transfered to the current editing cursor location.  Highlight the desired macro reference and then press the double << arrow key for each occurance of the reference to be put into the macro text.  You can change the label name but any more than 8 characters may exceed the width of the button for the default sized main dialog.

The <TIMER:NN> and <IDLE:NN> macro tags should have the NN replaced with the time interval in seconds.

<TX><IDLE:5>CQ CQ de <MYCALL> <MYCALL> k<RX><TIMER:20>
The label associated with each macro key can be individually annotated with a symbol.  Here are the symbols that are recognized by the button label drawing routine:


The @ sign may also be followed by the following optional "formatting" characters, in this order:

Thus, to show a very large arrow pointing downward you would use the label string "@+92->".

Here are my macro buttons suitably annotated:



There are 4 sets of 12 macro functions.  You can move between the 4 sets using the keyboard and the mouse.
  1. Left click on the "1" button to move to set #2.  Right click on the "1" button to move to set #4.
  2. Move the mouse to anywhere on the macro buttons.  Use the scroll wheel to move forward  & backward through the macro sets
  3. Press the Alt-1, Alt-2, Alt-3 or Alt-4 to immediately change to that macro set.

You could use any label that is symbolic to the function required. Refer to the FLTK web site for a full list of label types.

If you modify the macros and do not save them ("Files/Save Macros" on the main window) fldigi will prompt you to save the macros when you exit the program if you have the "Nag me" option selected.

Advanced Macro Use

External Shell Script Execution

The <EXEC>...</EXEC> macro tag provides a way to create external shell scripts and programs that can interact with fldigi.  See Exec Macro to learn more about the <EXEC> macro tag.

Using contest macro tags

Refer to Contest-How-To

Inline Macro Tags

Unless otherwise noted all of the macro tags discussed thus far are meant to be executed at the time that the macro is invoked by the button closure.  It is possible to execution of the tag to be delated until it appears in the transmit data stream.  This delayed execution capability is limited to a select number of tags.  See Inline Macro Tags for a list of these tags and ex

Contents