applescript pro needed


    Jun 21 2007 | 11:57 am
    hello,
    i'm searching the commands to use with the shell object to move the cursor inside ableton live...
    i mean to do keystroke "direction" ( up down right left ) and keystroke "enter"
    i googled osascript but i didn't found or didn't understood :o ..
    any idea?
    zank you
    freeka

    • Jun 21 2007 | 2:09 pm
      Hi Freeka,
      To move the cursor, click etc you can use aka.mouse in Max: http://
      www.iamas.ac.jp/~aka/max/#aka_mouse
      This may be an easier solution for you if you already know Max.
      Best,
      Chris
      On 21 Jun 2007, at 12:57, freeka wrote:
      >
      > hello,
      > i'm searching the commands to use with the shell object to move the
      > cursor inside ableton live...
      > i mean to do keystroke "direction" ( up down right left ) and
      > keystroke "enter"
      > i googled osascript but i didn't found or didn't understood :o ..
      >
      > any idea?
      >
      >
      > zank you
      >
      > freeka
      ........................................................................
      ...
      Christopher McClelland
      Sonic Arts Research Centre
      Queens University Belfast
      BT7 1NN
      Email: c.mcclelland@qub.ac.uk
    • Jun 21 2007 | 2:16 pm
      uh excuse me , my explications are not totally good,
      in fact this is not the mouse cursor that i wanna move..
      In live ableton when you are on sampler mode you have like a grid with your samples, and you can move a selection with direction keystroke and trig/stop the sample with the "enter" keystroke.
      my interest is to move that selection in live with a gamepad or midi interface ..
      so i know i can do it with max and hi, i just need to know how to scrip it to keystroke live : )
      thanks
      freeka
    • Jun 21 2007 | 3:07 pm
      You may want to explore the newly release (unoffical) Live API:
      Dan
      At 8:16 AM -0600 6/21/07, freeka wrote:
      >uh excuse me , my explications are not totally good,
      >in fact this is not the mouse cursor that i wanna move..
      >In live ableton when you are on sampler mode you have like a grid
      >with your samples, and you can move a selection with direction
      >keystroke and trig/stop the sample with the "enter" keystroke.
      >
      >my interest is to move that selection in live with a gamepad or midi
      >interface ..
      >so i know i can do it with max and hi, i just need to know how to
      >scrip it to keystroke live : )
      >
      >
      >thanks
      >
      >
      >freeka
      --
      Dan Nigrin
      Defective Records
      202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
      Malfunction
      http://www.defectiverecords.com
    • Jun 21 2007 | 3:10 pm
      ...and you're asking about doing something in Live
      *here* because....
    • Jun 21 2007 | 5:21 pm
      hey mr Taylor
      At the end of chain, the last action is in live but i'm talking about max, shell and osascript...
      how to send to an other application, using shell, the message keystroke "up / down /left / right/ enter"
      mmmm
      freeka
    • Jun 21 2007 | 6:40 pm
      Cycling hasn't exactly distanced themselves from Ableton.
      b
      On Jun 21, 2007, at 8:10 AM, Gregory Taylor wrote:
      >
      > ...and you're asking about doing something in Live
      > *here* because....
      >
      > --
      > knowledge is not enough/science is not enough/Love is dreaming this
      > equation
      barry threw
      composition : sound : programming
      http://www.barrythrew.com
      bthrew(at)gmail(dot)com
      857-544-3967
      And I know not if, save in this, such gift be allowed to man,
      That out of three sounds he frame, not a fourth sound, but a star.
      -Robert Browning
    • Jun 21 2007 | 8:16 pm
      Quote: freeka wrote on Thu, 21 June 2007 13:57
      ----------------------------------------------------
      > I'm searching the commands to use with the shell object to move
      > the cursor inside ableton live...
      > i mean to do keystroke "direction" ( up down right left ) and
      > keystroke "enter"
      > i googled osascript but i didn't found or didn't understood
      ----------------------------------------------------
      Hi,
      Spotlight your HD for a script called "Key Down-Up.applescript" and change this script for your needs.
      Once done, adapt its contents for 'osascript'.
      PG
    • Jun 22 2007 | 1:59 am
      Quote: freeka wrote on Thu, 21 June 2007 13:57
      > ----------------------------------------------------
      > > I'm searching the commands to use with the shell object to
      > > move the cursor inside ableton live...
      > > i mean to do keystroke "direction" ( up down right left ) and
      > > keystroke "enter"
      > > i googled osascript but i didn't found or didn't understood
      ----------------------------------------------------
      > Spotlight your HD for a script called "Key Down-Up.applescript"
      > and change this script for your needs.
      > Once done, adapt its contents for 'osascript'.
      ----------------------------------------------------
      > yes its ok but i still don't find the command to "call" the
      > direction key...
      For example:
      tell app "TextEdit" to activate
      tell app "System Events"
      keystroke (ASCII character 28) -- left arrow key
      end tell
      Or:
      tell app "TextEdit" to activate
      tell app "System Events" to keystroke (ASCII character 28)
      > I seen somewhere direction need to use ascii character
      Yes, or the key codes:
      keystroke (ASCII character 28)--left
      key code 123 -- left arrow Key
      --
      keystroke (ASCII character 29)--right
      key code 124 -- right arrow Key
      --
      keystroke (ASCII character 30)--up
      key code 126 -- up arrow Key
      --
      keystroke (ASCII character 31)--down
      key code 125 -- down arrow Key
      --
      I suggest to use "Accessibility Inspector" if you have Xcode installed:
      If not, you can download "UIElementInspector":
      Or better, "UI Browser" by Prefab:
      HTH,
      Philippe
    • Jun 23 2007 | 3:12 am
      Quote: freeka wrote on Thu, 21 June 2007 13:57
      ----------------------------------------------------
      Hi freeka,
      > the patch you gave me works perfect!
      Nice! ;-)
      > i don have screenshot but to have an idea go to max/msp
      > jit.cellblock.help
      > select a cell with your mouse and then use direction keys to
      > change your cell (the hilight one)
      > this is what i wanna do but inside live using a gamepad via hi
      > object in max.
      > make it sense??
      Yes, definitely. I don't have yet a working patcher for this purpose but I'm going to build one as your needs meet my own needs!
      And it's what I understood when I read your posts: your script will need the {x, y} coordinates of the window bounds and each included UI elements.
      > anyway the patch you gave me seems to work perfect :)
      Normally, all we can do from within a script editor such "Script Editor", "Smile", "Script Debugger" or even "Xcode" can be performed from within Max through the "System Events", including the use of scripting additions (aka osax or osaxen).
      The main problem is about statement formatting as message box in Max, like for the script below you can copy-paste into a "Script Editor" script window and run:
      No danger for Max ;-)
      Enjoy and see you soon!
      Philippe
      ==============No Break==============
      set the clipboard to "" as text --> empty the clipboard
      activate application "MaxMSP" -- only if you need to put MaxMSP as the foreground app. Optional.
      -- Create a new Max text window. Do it once and then inhibit this block:
      tell application "System Events" to tell process "MaxMSP"
      click menu item "Text" of menu 1 of menu item "New" of menu 1 of menu bar item "File" of menu bar 1
      click menu item "12" of menu 1 of menu bar item "Font" of menu bar 1
      end tell
      tell application "System Events"
      key down option
      keystroke "e"
      key up option
      keystroke "e"
      keystroke "e" using option down
      keystroke "e"
      key down shift
      keystroke "p"
      key up shift
      key down option
      keystroke "p"
      key up option
      key down {shift, option}
      keystroke "p"
      key up {shift, option}
      keystroke "p" using {shift down, option down}
      keystroke return
      -- stroke your keys ;-)
      delay 2
      keystroke (ASCII character 28) -- left arrow key
      key code 123 -- left arrow Key
      delay 2
      keystroke (ASCII character 29) -- right arrow key
      key code 124 -- right arrow Key
      delay 2
      keystroke (ASCII character 30) -- up arrow key
      key code 126 -- up arrow Key
      delay 2
      keystroke (ASCII character 31) -- down arrow key
      key code 125 -- down arrow Key
      end tell
      ====================================
      Here a Max patcher with AppleScript dialogs that shows how to escape double-quote and comma characters used by Max as tokens:
    • Jun 23 2007 | 3:21 am
      Sorry, part of the patcher is not correctly displayed.
      Here it is as attachment, "AS_Dialogs.txt".
      Bye,
      PG
    • Jun 23 2007 | 2:43 pm
      Thanks you Philippe :)
      freeka
    • Mar 11 2008 | 11:05 pm
      a little OT, but is there anything similar to aka.mouse for windows, or can someone post the code here, please? Thanks for reading ;)