Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

applescript to build in IntelliJ IDEA

Is it possible to write a applescript to:

  • activate IntelliJ IDEA
  • make project
  • I tried:

    tell application "IntelliJ IDEA 13.1.3.app"
        activate
        write text "^b" -- I have mapped ctrl+b to make project
    end tell
    

    but it didn't work.

    Recording actions in automator and playing them back works sometimes but not always.

    Seeing how there isn't much on the interwebs regarding IDEA+applescript. I almost feel, IDEA doesn't support applescript but I haven't verified this claim.

    like image 579
    user674669 Avatar asked Oct 22 '25 23:10

    user674669


    1 Answers

    Try using the "System Events" app instead for the keystroke emulation.

    eg,

    activate application "IntelliJ IDEA 13.1.3"
    
    tell application "System Events"
        keystroke "b" using control down
    end tell
    
    like image 55
    adamh Avatar answered Oct 24 '25 14:10

    adamh