Triggering Computer Keys through Max Patch

    Feb 03 2012 | 7:34 pm
    Hi all,
    I am looking for a way to trigger computer keys through my Max Patch. In essence, I am running my patch in parallel with another program and would like to be able use the computer keyboard to type in a search word and hit return, controlled entirely by my max patch. The search will act be an automatic process as the characters will be triggered by routing information that has already been created.
    The search will narrow down files from a wide range and I am then able to open them accordingly. Is there a simple way to do this?
    Thanks a lot for your help,

    • Feb 03 2012 | 7:45 pm
      Hi I believe there are a number of externals for this; the only one I'm familiar with tho is mxj autobot by jan.jdo:
      Just send it ascii numbers in Max.
      For the second part of your question, you may also have to talk nicely to Luke Hall (on here) to learn how to parse text out of Max.
    • Feb 03 2012 | 10:14 pm
      Hi! I noticed my name and though I'd say thanks Brendan the sweet name drop. But also if you grab the java class and are still stuck then just reply to this thread and I'll see if I can help at all.
    • Feb 04 2012 | 12:44 am
      The name drop is well-deserved...Luke's abilities with javascript and [regexp] have made me a believer in these often-confusing tools...!
    • Feb 04 2012 | 4:48 pm
      Hi Nipper, I was doing something similar, maybe this thread helps a bit too
      kudos to Luke Hall from me too :-)
    • Feb 29 2012 | 2:18 pm
      Hey guys, thank you all for your help - apologies for the late reply but I have been soaking up the sun in Dubai for the last few weeks!
      Following your thread, I have been developing the search commands through applescript and have got to grips with it well. Luke, I have looked at a couple of your other threads and also investigated the libraries that you have developed... they are all very impressive. I have just managed to start using the applescript conversion and it looks like it will make life a lot easier than it would have been!
      I will let you know how I get on with the patch and post something up soon.
      Thanks a bunch,
    • Feb 29 2012 | 4:18 pm
      take a look at aka.keyboard also works in max6
    • Feb 29 2012 | 7:38 pm
      Thanks kaboo - I have had a look at this but don't see how I could ensure that the keyboard output is typed into a specific program that is already open... perhaps it is better to continue with applescript?
      However, I am finding that through the applescript method I have to create a new applescript for every search term that I enter, instead of being able to type the individual characters. Each time I start an applescript that triggers the search function, each subsequent applescript that tells system process to type an individual character overwrites the previous entry in the search box. Is there a way around this, or a way to have max enter variable into the applescript message string, for example using $1 etc.
      Thanks for your help,