Monday, August 08, 2011

Launch Corona Simulator from IntelliJ

Watch this video to learn how to launch that script from IntelliJ using a keyboard shortcut.


Windows:
Download this script and save it anywhere (I saved mine as "CoronaLauncher.vbs"). You'll reference it from the external tools in IntelliJ.




Mac: (If you get this working, please post in the comments if there's any tricks you need to do)
Link to the AppleScript code used in the TextMate bundle:
https://github.com/osadchuk/Corona-SDK.tmbundle/blob/master/Commands/Run%20Simulator.tmCommand




Here's a screenshot of the External Tools setup:

9 comments:

  1. [...] 한방에 해결해주는 솔루션을 만든 사람이 있습니다. (http://johnlindquist.com/2011/08/08/launch-corona-simulator-from-intellij/) 그러나, 맥용은 아직 개발이 안되었네요.ㅠㅠ TextMate 용 런처 연동 [...]

    ReplyDelete
  2. For this to work I had to add a hyphen to

    WshShell.AppActivate "Corona Simulator"

    Like so:

    WshShell.AppActivate "- Corona Simulator"

    Otherwise it would give focus to the output window.

    ReplyDelete
    Replies
    1. Thanks mate! Couldn't figure out how to solve this problem - it was driving me crazy!

      Delete
  3. Hi! When i attempt to run Simulator this way i got an error dialog:

    Windows Script Host
    There is no file extension in "C:\Program".

    I've copied .vbs file content from here and don't make any changes in it.

    ReplyDelete
  4. Thanks for the post.
    It works for me!

    ReplyDelete
  5. how to install api corona in intellij? and how to work only corona simulator? thnx sir

    ReplyDelete
  6. I can't get this to work when there are spaces in the Path to main.lua.

    ReplyDelete
    Replies
    1. I've tried adding quotes inside of the External Tools parameter around the source path, I've tried adding quotes inside the VBS around the argument when it launches corona. Nothing seems to work.

      Delete
    2. I figured this out by changing

      WshShell.Run """C:\Program Files (x86)\Ansca\Corona SDK\Corona Simulator.exe """ & WScript.Arguments(0)

      to

      WshShell.Run """C:\Program Files (x86)\Ansca\Corona SDK\Corona Simulator.exe """ & """" & WScript.Arguments(0) & """"

      Delete