Author Search Script Example


ECHO "This is a script for running author searches."

ECHO "Press [Esc] at any time if you would like to\ stop."


ECHO "In the pop-up box, enter the last or family\ name of the author:"

GET _lastname label="Last/family name:"

ECHO "In the pop-up box, enter first or given name\ or initial:"

GET _firstname LABEL="First/given name:"

\* Use the STN expand command to provide choices of

\* names.


=> expand _lastname _firstname/au

ECHO "Enter the e-numbers to search, e.g., e3-e5 or\ e3,e7) or end"

GET _enums LABEL="Enter e-numbers:"

IF (_enums = "end") BEGIN

  ECHO "Ending author search at your request."





=> search _enums \> _results

\* If the search yielded zero answers, there is

\* nothing to display. Inform the user and exit.

IF (#_results = 0) BEGIN

  ECHO "There are no answers for your query."




\* The search found hits, so ask how many should be

\* displayed.

ECHO "How many answers would you like to display? (e.g.,\

 #_results or 0):"

GET _display

IF (_display > 0) BEGIN

  ECHO "Please provide a transcript name to use to\

 save your answers."


  \* Don’t try to display more answers than are

  \* available.

  IF (_display > #_results) THEN _display = #_results


  => dis 1-_display bib



ECHO "Your author search is now complete."



Copyright © 2017 American Chemical Society. All Rights Reserved.