Page 1 of 1

Launching a program with a switch

Posted: Thu Apr 16, 2015 10:10 pm
by DavJans
this is the EXE i need to run:
"C:\Program Files\Bar Tender 8.0\Bartend.exe" "F:\data\labels\SSCC01.btw" /P /XS

can it be done directly with a button or should I create a shortcut with the switch and tell livecode to run the shortcut?

Re: Launching a program with a switch

Posted: Mon Apr 20, 2015 6:22 pm
by ChrisM
DavJans wrote:this is the EXE i need to run:
"C:\Program Files\Bar Tender 8.0\Bartend.exe" "F:\data\labels\SSCC01.btw" /P /XS

can it be done directly with a button or should I create a shortcut with the switch and tell livecode to run the shortcut?

I do the same sort of thing, running command line from buttons with variables from a text field, took a bit of working out the commands. As far as I could work out, you need to break it up a little bit because of the quotes, so it would be something like:-

set the hideConsoleWindows to true
get shell("C:\Program Files\Bar Tender 8.0\Bartend.exe " & Quote & "F:\data\labels\SSCC01.btw " & Quote & "/P /XS")


You also need to be aware to build the spaces into command - the bit above might not be right, its just off top of my head :-)