/* Import a user generated sequence
 * this program is called by the Display Monitor
 *
 * Copyright (C) 2018 Blonde Guy
 * All Rights Reserved
 */

cr = d2c(13)
Instructions = "Import Sequence" || cr || cr ||,
               "Specifiy the name of the sequence",
               "to be imported. Use the Browse button to activate",
               "a file dialog to search for a sequence."
dialogName = "Import Seq"
template = '*.seq'
response = query(dialogName, template, instructions)

if response = template then return

if stream(response, 'c', 'query exists') <> '' then do
   suntanDir = cdglobal('suntanDir')
   address cmd '@copy "' || response || '"' suntanDir '> nul'
   call LogCdi "!scanseq"
   call LogCdi "Imported Sequence" response
end

return
