Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:

Features:

Oscilloscope

Spectrum Analyzer

8-Channel
Signal Generator

(Absolutely FREE!)

Spectrogram

Pitch Tracker

Pitch-to-MIDI

DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Period
    Event
    Spectral Event

    Temperature
    Pressure
    MHz Frequencies

Data Logger

Waveform Averager

Histogram

Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls

Auto-Calibration

Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording

Accessibility

Applications:

Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery

Automotive

Product test

Contact us about
your application!

Macro Message Boxes (With Buttons)


Macros: WaitMsg, WaitMsgTitle, WaitMsgType, WaitMsgAns

Introduction:

WaitMsg="Click OK to resume macro..." shows a standard Windows message box with an 'OK' button. After the message is shown, macro processing halts until the user responds to the message. If the message had multiple buttons (see below), you can query to find out which one the user clicked on.

Note that WaitMsg can't be used in Multitasking macros or in Custom Controls handlers, and will be ignored if given there.

Macro commands given before the main WaitMsg can be used to control features of the message such as title, number of buttons, default button, and icon. There are two general approaches for this: Explicit named commands such as WaitMsgTitle, and extensions of the WaitMsg macro that use the general format of WaitMsg="<parameters". The latter is the same format used by Custom Meters, and is also allowed by the non-button Msg macro.


Message Title:

WaitMsg has a default title bar that shows "Macro Wait" above the message text. WaitMsgTitle="New Wait Title" or WaitMsg="<<New Wait Title" changes it to "New Wait Title". WaitMsgTitle= or WaitMsg="<<" specifies an empty title bar. Titles may be up to 64 characters long, and will be used with subsequent WaitMsg macros until specifically changed.


Icon and Buttons:

You can change WaitMsg features with WaitMsgType or WaitMsg="<tparameters". The default is WaitMsgType=O or WaitMsg="<tO" for OK. You can choose an icon for the message, the number and type of buttons, and the default button (the one that is chosen by just hitting the Enter key) by including a character from each of these groups:

  • S = Stop icon (white X in red circle).
  • Q = Question mark.
  • E = Exclamation point.
  • I = Information ('i' in a circle).
  • O = OK button only.
  • C = OK and Cancel buttons.
  • A = Abort, Retry, Ignore.
  • X = Yes, No, Cancel.
  • Y = Yes, No.
  • R = Retry, Cancel.
  • 1 = 1st button default.
  • 2 = 2nd button default.
  • 3 = 3rd button default.

So, for example WaitMsgType=EX2 or WaitMsg="<tEX2" will show subsequent WaitMsg text with an Exclamation point icon and Yes, No, Cancel buttons, with the No button the default.

For the Macro Examples and Mini-Apps included with Daqarta that use WaitMsg, there is also a separate Help button that appears to the right of the other buttons. Clicking it will open the specific Help topic for that particular macro. Since there is no way for users to write and integrate their own Help topics, this is not an option for user-written macros.

However, as noted previously, you can use Msg messages (or Mtr0 to Mtr3 Custom Meters) to display your custom help.


User Response:

WaitMsg is used to wait for a response from the user. If it is just to have the user confirm that he has read the message, the default OK type can be used. Macro processing will stop after the WaitMsg command until the OK button is clicked or the message box is dismissed with the [x] button, then proceed with the next macro command:

WaitMsg="1) Attach electrodes to monster.
 2) Raise platform.
 3) Turn dial to 'Danger'.
 4) Click 'OK' to proceed..."
 @_Reanimate

The above example shows a multi-line message (note the quote marks at the beginning and end), then waits for 'OK' before running the Reanimate macro. (You can also show multi-line messages using line continuation and string expression methods.)

If you ask the user to make a decision, such as with a Yes/No message, you can provide different macro actions based upon the response. The WaitMsgAns command is used in an IF statement to obtain a number corresponding to the user action:

WaitMsgType=EY2     ;!, Yes/No, No default
WaitMsg="Ignore Reactor Warning Alarm?"
IF.WaitMsgAns=6     ;6=YES
    @_MaxPower
 ELSE.
     @_ShutDown
 ENDIF.

The possible response values (depending on message type) are:

  • 1 = OK
  • 2 = Cancel
  • 3 = Abort
  • 4 = Retry
  • 5 = Ignore
  • 6 = Yes
  • 7 = No
  • 8 = Close

Copying Message Text:

To copy a displayed WaitMsg message to the Windows Clipboard, hit CTRL+C while the message window has focus (after it is displayed, without clicking on another non-Daqarta application). This copies the entire message, including the title and button text.

This utilizes a standard Windows feature that was first introduced in Windows 2000. It is available in Windows XP, Vista, and Windows 7, 8, and 10 but not in Windows 98 or earlier.


See also Message Macros, Macro Overview

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved