Page 1 of 1

use of terminal commands OSX

Posted: Thu Apr 11, 2013 9:38 am
by KevinPy
Hi everyone,

I'm a new to LiveCode, and i try to build a little app for OSX, based on terminal commands.
I try to create a "purge" script, but i don't know very well the language.

On Terminal, the command is simple: purge (What else ?)
But on LiveCode, i create a button, with this code:

on mouseUp
shell("purge")
set the shellCommand to "purge"
end mouseUp

I try two shell commands, but does not work.

Thanks you in advance for you help.

Re: use of terminal commands OSX

Posted: Thu Apr 11, 2013 9:59 am
by jmburnod
Hi kevinPy,

I don't use shell but i know

Code: Select all

get shell("say" && "Welcome in this forum Kevin")
works
I hope this help
Best regards

Jean-Marc

Re: use of terminal commands OSX

Posted: Thu Apr 11, 2013 11:18 am
by KevinPy
thanks, it works.

Re: use of terminal commands OSX

Posted: Thu Apr 11, 2013 11:44 am
by Klaus
Hi Kevin,

yes, Jean-Marc is right, SHELL() is a function so you need to:
1. GET shell("...")
## now IT contains the returned value, if any...
or
2. PUT shell("...") into Some_Var
:D


Best

Klaus

Re: use of terminal commands OSX

Posted: Thu Apr 11, 2013 1:36 pm
by KevinPy
OK, I understand. Since I participated in the financing Kickstarter, I have access to tutorials, and I think I make a day or two discovery software.