Using Shell to run a DOS program

Alejandro Tejada capellan2000 at gmail.com
Tue Jan 18 00:38:43 EST 2011


Hi David,

David C. wrote:

>Try this one, which works on this end:
>on mouseUp
>-- must set the folder location to the same as crc32.exe
>   set the defaultFolder to "C:\crc32\"
>   put "crc32.exe" into tCommand
>  put " readme.txt > c:\crc32\output.txt" into tArg
>   put tCommand & tArg into tShellText
>  set the hideconsolewindows to true
>   get shell (tShellText)
>   get URL "file:c:\crc32\output.txt"
>   put it -- put in message box
>   --put it into fld "Field1" -- put in field
>end mouseUp

Oh. I must set the defaultFolder first...
Yes, the Docs mention this:
"The command is executed in the current defaultFolder"
and this actually means:

Before using shell with a command line application
you must set the default folder to the folder where
this Command line application resides.
For example: ...- paste example published by David-

This particular information, with the example provided
by David, could be an useful addition to the Online
dictionary.

Many Thanks again, David,
for publishing and testing
this handler!

Al




More information about the use-livecode mailing list