Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'An AppleScript frontend' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript frontend
Authored by: klktrk on Apr 25, '03 03:58:06PM
Once you've built your binary as per the instructions above, just make an AppleScript, like so:
set shellcmd to "/path/to/your/binary/rebuild_services"

display dialog "Are you sure you want to rebuild your services menu?" ¬
     buttons {"Cancel", "OK"} default button 2
-- ¬ is a line wrap. 

set the reply to the button returned of the result
if the reply is not "OK" then exit repeat

with timeout of 1000000 seconds
		set output to do shell script shellcmd
	on error errormsg
		display dialog errormsg --in case anything goes wrong
	end try
end timeout

activate me
display dialog output

Now, save this AppleScript in your ~/Library/Scripts folder, or, for system wide access, in /Library/Scripts. Then you can rebuild your services menu just by pulling down the menu time in your menu bar and selecting this script.

[ Reply to This | # ]
An AppleScript frontend
Authored by: bluehz on Apr 25, '03 09:02:23PM

I wish there was more documentation (read "READABLE BY AVG
USER") on AppleScriptStudio and ProjectBuilder in general. This
would be the perfect kind of project I could sink my teeth in for
an afternoon and learn how to create small applications, etc.
Alas - I have tried, and tried, and tried and it just doesn't gel -
but my perl and shell scripting abilities are coming along nicely.
Now if I just knew how to pkg those up in nice apps for others.

[ Reply to This | # ]