title: How do I convert this AppleScript to osascript?
body: <p>I have written an AppleScript and want to convert it to an osascript so I can run it on launch using launchd. Is there any way I can convert this to osascript or do I have to rewrite the whole script as an osascript? If it can't be done is there at least a way to run it as osascript in the terminal? Thank you!</p>
  
  <pre><code>on idle
         tell application "System Events" to ¬
      if exists process "Launchpad" then run script
          tell application "Launchpad"
              delay 0
              tell application "System Events" to keystroke "b" using {control down, option down, command down}
              delay 0
              tell application "System Events" to keystroke "b" using {control down, option down, command down}
              delay 0
              tell application "System Events" to keystroke "b" using {control down, option down, command down}
              delay 0
          end tell
  end idle
  </code></pre>