using objective-c in applescript studio

Hi, I’d like to use some c commands in an otherwise completely applescript application but don’t know the syntax…
for example, I’d like to use one of these to communicate with quicktime in ways that applescript doesn’t seem to be able to - for instance reading the timecode track, if present.

Much thanks for any help

TimeScale gTimeScale = 2997; // typical for NTSC video (29.97 frames/sec)
TimeValue gFrameDur = 100; // duration of a single frame
long gNumFrames = 30; // frames per second
Boolean gDisplayTimeCode = false;
Boolean gDisplayBelowVideo = true;
Boolean gDropFrameVal = true;
Boolean g24Hour = true;
Boolean gNegOK = false;
Boolean gIsNeg = false;
Boolean gUseTimeCode = true; // ue timecode (true) or counter (false)?
long gHours = 0;
long gMinutes = 0;
long gSeconds = 0;
long gFrames = 0;
long gCounterVal = 0;

you can implement obj-c using call method “methodname” of class “classname” with parameters {x,y,z}

for example to implement this:

@interface myClass : NSObject { }

  • (NSString *)myMethod:(NSString *) forThis:(NSString *)myParameter;

you’d write in your AppleScript:

set myResult to (call method "myMethod:forThis:" of class "myClass" with parameters {"paramter1", "parameter2"})

thanks for the help, I will try this!