Using The Command Button

(Aatos Media) #1

This is a newbie question, but I just can’t figure this out.

How can I set a command to open specific Corona SDK project (main.lua -file)?

Command button isn't working
(Erik Schilling) #2


if you click the small arrow next to the Execute Command you can choose Edit Commands and add your command there :smile:

You can put whatever command you want there then.


(Thorbjørn Lindeijer) #3

There is actually a wiki article about using commands.

(Aatos Media) #4

Thanks to all!

Yes that is exactly what I’ve tried, but I’m missing something. I used the following command that works when using terminal, but when I execute it using from Tiled, I get “The command failed to start”:

open -a /Applications/CoronaSDK/Corona\ /Users/user/Desktop/project/main.lua

(Erik Schilling) #5


please check @bjorn’s link:

It says:

    On Mac, remember that Apps are folders, so you need to run the
    actual executable from within the Contents/MacOS folder:

    /Applications/ %mapfile

That might be your issue. (No Mac here to test).


(Aatos Media) #6

Thanks Ablu!

I’ve read the wiki and tried the following commands with MacOS:

open -a /Applications/CoronaSDK/Corona\ /Users/user/Desktop/project/main.lua
/Applications/CoronaSDK/Corona\\ Simulator

Wiki doesnt say if “open” is needed. The first runs fine when using terminal. And if I want to execute a project file, I’m not sure do I have to write %path or what is the logic how executed program should find the file if it is not in the same folder.

I’m sorry. It must be my english, 'cause I think that I can’t tell you correctly what is my question. I think that if someone could just give me an another example how I can run a command that executes a specific application with specific file, like this (pseudo example: run /Apps/Corona-application /game/main.lua)

(Erik Schilling) #7

Sorry… I never used OS X. So I have no idea how to do this there…

(Aatos Media) #8

Well, I noticed that the Corona project loads automatically on Corona Simulator if one of the project document is saved, I can manage without Tiled’s Command Button. In Tiled I just hit CTRL/CMD+E and voila :slight_smile:

(Reid Ellis) #9

Try /usr/bin/open instead of just open

(Seanba) #10

I’m going to necro this this thread in case it helps someone. That path to is almost certainly the problem. It has a back slash and whitespace in it.

Try this instead (notice the quotes):

open -a "/Applications/CoronaSDK/Corona" /Users/user/Desktop/project/main.lua

(Thorbjørn Lindeijer) #11

Thanks @Seanba! I’ve now added a note about this to the Tiled documentation as well: