am trying to get a simple program run as a standalone from the command line accepting parameters and displaying results on the screen.
I got accepting parameters in both Windows and Mac, but there is no way to get output to the screen on Windows. I read everything on forums and list about this issue and seems it is an obscure feature or simply doesn't works.
Currently am running LC 4.6.4
This is stack code am trying:
Code: Select all
on startup
hide this stack
local tCommandLine
--put "using put hello2 plus cr" & CR into stdout
--put "using put hello2 plus return" & return into stdout
--write "using write hello2 plus return" & return to stdout
write "using write hello2 plus cr" & CR to stdout
-- handle command line arguments here
put word 1 to -1 of lower($1) into tCommandLine
switch char 2 of tCommandLine
case "t"
put "with -t param" & return after URL "file:debug.txt"
quit
break
default
put "any other case " & tCommandLine & return after URL "file:debug.txt"
quit
break
end switch
end startup
This is the only way I found to get output on the screen on Mac OSX
Code: Select all
write "using write hello2 plus cr" & CR to stdout
Thanks
Jose