Shell command

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
matgarage
Posts: 60
Joined: Sat Apr 20, 2013 11:39 am

Shell command

Post by matgarage » Fri May 17, 2019 9:12 am

Hi
I'm using a command line tool to generate link for file on our ftp server.
The command line tool is part of commercial FTP server software and I'm using it to automate our workflow.

The command is in this form :
DropShip server_adress login password path_to_the_file_to_send
When I test it on Terminal (OS X) the result is the link i'm waiting for.

But when I'm trying to put it in livecode with this script :

Code: Select all

on mouseUp
   put "DropShip 192.168.10.100 login pass /Volumes/Jobs/MyFile_1905.pdf" into tempCom
   put shell(tempCom) into fld "Field1"
end mouseUp
The result in field1 is : "/bin/sh: line 1: DropShip: command not found"

Could someone help me to understand where is the problem ?

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1033
Joined: Thu Apr 11, 2013 11:27 am

Re: Shell command

Post by LCMark » Fri May 17, 2019 10:05 am

@matgarage : The macOS Terminal has a different environment than that which you get from running an app from Finder (for example 'PATH' which defines where command line binaries are looked for is typically different). Try locating where the DropShip binary is and using the full path in shell (you could maybe make it a preference in your app, with a sensible, checked default).

matgarage
Posts: 60
Joined: Sat Apr 20, 2013 11:39 am

Re: Shell command

Post by matgarage » Fri May 17, 2019 2:09 pm

Nice !
You're right, with the full path it's working perfectly now.

Thanks :)

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”