Just thought this may come handy to some...
I'm using Sublime Text 2 as my main editor and was annoyed by the extra clicks I had to go through every time I wanted to run the sketch in Processing. So instead I'm using a very simple
Autohotkey script to find the correct Processing window and send ctrl-r. Trivial, but it really saves some clicks and avoids having to deal with the command line...
here's the script:
- #b::
- SetTitleMatchMode, 2
- ;assuming we're in the editor right now
- WinGetActiveTitle, st2
- ; title contains filename and some extra bits. trim from right to cut of editor name and file extension from title (21 characters in this case)
- StringTrimRight, st2trim, st2, 21
- ; we only want the last part of the filename
- StringSplit, arr, st2trim,\
- f := arr%arr0%
- ; open the Processing window and send ctrl-r to run
- WinActivate,%f% | Processing 1.5.1
- send ^r
Hope it's of use to someone...
Michael
1