Writing messages to the Command Line (stdout)

Mark Wieder mwieder at ahsoftware.net
Sun Feb 18 01:56:22 EST 2007


Derek-

Thursday, February 15, 2007, 9:03:10 AM, you wrote:

> The target operating system for this type of behavior is Windows, and I
> would like to be able to handle all flavors of Windows (95,98,XP,Vista,
> etc.).  Does anyone have any guidance on how I write to the shell/console?

Here's how I do this for a single commandline argument:

on preOpenStack
  local tCommandLine
  -- handle command line arguments here
  put word 1 to -1 of lower($1) into tCommandLine

  switch char 2 of tCommandLine

    case "t"
      hide this stack
      OpenStack -- do the t task
      write field "txtTasks" to stdout
      quit
      break

    default
      -- unhandled option
      if tCommandLine is not empty then
        write "$1=" & tCommandLine & "." to stdout
      end if
      break
  end switch
end preOpenStack
  
-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list