Using Shell to run a DOS program
David C.
davidocoker at gmail.com
Mon Jan 17 10:09:30 EST 2011
On Sun, Jan 16, 2011 at 11:31 PM, Alejandro Tejada
<capellan2000 at gmail.com> wrote:
> Hi all,
>
> I have been trying, without sucess, to run
> the program CRC32.EXE using Shell
> from LiveCode.
>
> This is the code that I am using:
>
> put "C:\crc32.exe CRC32INPUT >CRC32OUTPUT.txt" into tCommand
> set the hideconsolewindows to true
> get shell (tCommand)
> get URL "file:C:\CRC32OUTPUT.txt "
> put it
>
> Notice that I had already created the files
> named CRC32INPUT and CRC32OUTPUT.txt
>
> On the command prompt it works,
> but not inside LiveCode.
>
> I am testing this using Rev 2.8 and 4.0
> using this DOS program
> http://www34.brinkster.com/dizzyk/download/crc32.zip
>
> downloaded from this page:
> http://www34.brinkster.com/dizzyk/crc32.asp
>
> Thanks in advance!
>
> Al
Although slightly different, after trying several different
variations, this seems to work for me:
on mouseUp
set the defaultFolder to "C:\crc32\" --> must set the folder
location to the same as crc32.exe
put "crc32.exe" into tCommand
put " readme.txt > c:\crc32\output.txt" into tArg
put tCommand & tArg into tShellText
get shell (tCommand)
get URL "file:c:\crc32\output.txt"
put it
end mouseUp
Note the importance of setting the folder path to the location of crc32.exe
Best regards,
David C.
More information about the use-livecode
mailing list