![]() Do you need to repair exactly the same area in a number of different photos? I guess my question is - how do you plan to script the areas to be repaired? Thank you so much for the reply, that's extremely helpful and appreciated. In terms of the repair tool, it would be for the same area in a large number of photos. The attempt was to write a script to apply the tool to the same area, location or coordinates of the photos since they're all the same dimensions. Thank you again for the AppleScript support. #Omnigraffle applescript examples download#.#Omnigraffle applescript examples license#.#Omnigraffle applescript examples upgrade#.While there is no way to continuously generate OmniGraffle diagrams with the desired level of complexity automatically, the hacks I’ve shown here at least make it easier to add OmniGraffle files to your XCode project and keep them up to date. I have found that OmniGraffle is the best way to diagram these relationships, but if the diagrams are not kept current, they lose their value very quickly. As I work on increasingly complex apps I want to document the relationships between classes and subsystems for my future self as well as for other developers who may join the team and have to mantain my code. This is more than just an exercise in inter-app communication for me. This keeps the PDF files in sync with the OmniGraffle files. With this rule in place Hazel now automatically generates a PDF file of the first canvas of any new or updated OmniGraffle file in the specific directory. You can find the changes I made here, or you can just clone my fork of this project. I had to modify the bash file to accept a single command line argument. This is a very useful bash script that I found on GitHub. When this rule matches a file it calls graffle.sh on that file. I created a new service and set it up to receive no input and run in XCode as shown below. To install this code as a service I first started up Automator. ![]() com / xcode - open - file - in - current - tab - in - external - editor - macvim / set current_document_path to "" tell application " Xcode " set last_word_in_main_window to ( word - 1 of ( get name of window 1 )) if ( last_word_in_main_window is " Edited " ) then display notification " Please save the current document and try again " - eventually we could automatically save the document when this becomes annoying else set current_document to document 1 whose name ends with last_word_in_main_window set current_document_path to path of current_document end if end tell tell application " OmniGraffle Professional " if ( current_document_path is not "" ) then activate open current_document_path end if end tell return input end run ![]() AppleScript to open the current file in an external editor on run For completeness I’m including the code that I use over here: I changed the code to use OmniGraffle Professional instead of MacVim. This script opens the current file with an external editor. Opening in an external editorĪfter a little Googling I found an elegant AppleScript written by Milan Krystek. Whenever a file is created or saved, this rule will run a script that converts the OmniGraffle file into a PDF document. ![]() The second thing I did is create a rule in Hazel that monitors the directory in which I save OmniGraffle files. This service will launch OmniGraffle and open the file that’s being displayed (as XML) in the current XCode tab. Here’s the summary of what I did: I created a service that takes no input and only runs within XCode. I wanted to be able to view the diagram, and also launch OmniGraffle from within XCode. I’ve filed a bug report with Apple, asking them to fix this. However when I did that, instead of showing me what QuickLook would show me in the Finder, I saw the raw XML contents of the OmniGraffle file. I wanted to add an OmniGraffle file to my XCode project and have XCode display it when I click on it.
0 Comments
Leave a Reply. |