Hello All!
Am trying to script a control app to add features to the popular app HandBrake, but have run into a problem with the Bash app Sample.
I need to capture the call graph it generates, but it INSISTS on writing to the /tmp file, and nothing seems to work.
here is what I have:
set handbrakeActivity to (do shell script "var=$(sample HandBrake 1); echo $var") as list
Now the txt file it produces in /tmp has all the data I need, like the following, but I can’t seem to redirect it.
Analysis of sampling pid 501 every 10.000000 milliseconds
Call graph:
100 Thread_0f13
100 start
100 _start
100 NSApplicationMain
100 -[NSApplication run]
100 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
100 _DPSNextEvent
100 BlockUntilNextEventMatchingListInMode
100 ReceiveNextEventCommon
100 RunCurrentEventLoopInMode
100 CFRunLoopRunSpecific
100 __CFRunLoopRun
99 mach_msg
99 mach_msg_trap
99 mach_msg_trap
1 __CFRunLoopDoObservers
1 _handleWindowNeedsDisplay
1 -[NSWindow displayIfNeeded]
1 -[NSView displayIfNeeded]
1 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
1 -[NSView lockFocus]
1 -[NSView lockFocusIfCanDraw]
1 -[NSView _focusFromView:withContext:]
1 -[NSFocusState flush]
1 CGGStateReset
1 CGGStateRenderingReset
1 renderingStateCopy
1 renderingStateCopy
Not sure if this is sterr or what, but the manual for Sample states that you can specify the output to a new path. Is it possible to foo an output path into a variable??
Really Stumped on this one! :o