vendredi 28 novembre 2014

Programatically change service script settings


I have a service-script which accepts a text and saves it in file. So I need a setting of folder where file will be located and hotkey for command.


Problem is that user may change setting when service works, and service behaviour have to change too.


I am trying to implement that via Cocoa app, which supposed to contain AppleScript with some variables, and installs it by press of button. User is able to change some settings in window and install service again.


Problem is that I have no idea how to run service from my app.


I've tried osascript, but as faar as I see it only runs script once I didn't found any way to tell Automator to install service, except to paste workflow into /services folder.


So I am a bit confused, I dont see any way how reload service with changed script according to user settings.


Or, maybe, is there some way to use configuration file and static workflows, which I can definately install by telling Automator Add, but I still need configurable shortcut key.





Aucun commentaire:

Enregistrer un commentaire