Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7904167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:56:14+00:00 2026-06-03T09:56:14+00:00

I’m using SublimeText 2 to code my Processing sketches, but every time I need

  • 0

I’m using SublimeText 2 to code my Processing sketches, but every time I need to run the program I have to switch to Processing and click the Run button, Textmate have a bundle to automate this process and I would like to do the same with SublimeText but I’ve no idea how

I’m using Mac OSX Lion by the way

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:56:19+00:00Added an answer on June 3, 2026 at 9:56 am

    Thanks for the advice brunchstorm! I modified your method so that the Processing file open in Sublime can be sent directly to the Processing application. First, I downloaded and installed a TextMate Processing package so that .pde files would be correctly identified (and syntax-highlighted) as Processing documents in Sublime ( http://www.onebitwonder.com/projects/processing ). If you browse that tmbundle, there is a TextMate language definition file (Processing.tmbundle/Syntaxes/Processing.tmLanguage) that must be modifed. Near the bottom of that file there is a line:

    <string>source.java-processing</string>

    This line must be changed to:

    <string>source.pde</string>

    After you save Processing.tmLanguage, you can drop the entire Processing.tmbundle package into your Sublime packages directory. Now open a .pde document in Sublime. In the bottom-right corner of the Sublime window is a document type identifier that will probably say “Plain Text”. Click on that identifier and pick “Open all with current extension as…” and choose “Processing”, which should now be in the list. I wrote two AppleScripts to launch and run Processing and a shell script to drive them (this is the only way I could get the AppleScripts to launch correctly from Sublime in sequence).

    The first script launches Processing if it is not already running. This step is necessary because if Processing is not running, a delay must be inserted before Processing will register keystrokes (a splash screen appears for several seconds during startup). A delay of 3 seconds works well with my system, but you may need to lengthen the delay depending on your hardware. Perhaps somebody else can think of a more elegant way to make AppleScript wait for processing to get past the splash screen.

    First AppleScript (named “first_processing.scpt” by me):

    --check to see if Processing is running
    tell application "System Events"
        set x to (count (every process whose creator type is "Pde1"))
    end tell
    
    --if Processing is not running, open Processing and delay
    --for three seconds to allow time for splash screen
    --to disappear and to allow keystrokes to be
    --registered
    if x is 0 then
        activate application "Processing"
        delay 3
    end if
    

    The second applescript sends a keystroke to run your Processing program (named “second_processing.scpt”):

    tell application "Processing"
        activate
    end tell
    
    tell application "System Events"
        --deliver the "run" command
        delay 0.1
        keystroke "r" using command down
        --hide Processing; delay is necessary for reliable hiding
        --you may want to turn off hiding to see error messages
        delay 0.2
        keystroke "h" using command down
    end tell
    

    The driver shell script (named “launch_processing_file.sh”):

    osascript ~/Documents/AppleScript_Library/processing/first_processing.scpt
    open -a Processing $1
    osascript ~/Documents/AppleScript_Library/processing/second_processing.scpt
    

    Finally, the Sublime build system for Processing (to be stored in your user directory with a “.sublime-build” extension):

    {
        "cmd": ["sh", "full_path_to_shell_script/launch_processing_file.sh", "$file"],
        "selector": "source.pde"
    }
    

    Note that you must choose “Use external editor” in the Processing preferences for this method to work correctly. Also note that your Processing file must be contained in a folder with the same name. I may write a script to create the proper enclosing folder for a bare Processing file, but for now that aspect is not taken care of automatically. Enjoy!

    P.S.

    This is my first post here. What a fantastic site!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.