I am trying to write xcode4 custom behavior to check the current active file with Perforce. I know that I can write custom behavior to trigger when a key is pressed (e.g. F1 ). I would like this user behavior to run AppleScript (or any kind of script, for that matter) that recognizes the current "active" "source document in Xcode, get its path and try to check it through Perforce.
As far as I can tell, AppleScript is the best way to get to the target document, as it easily navigates the Xcode DOM. Given that the DOM itself is a maze.
Can this be done?
source share