Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

VideoBeagle

macrumors 6502a
Original poster
Aug 17, 2010
823
18
App Q&A testing by request.
I've made a little applescript and attached it to a folder in DropBox.

From elsewhere, like work, I can drop a text file into the folder, and then on my G5 at home, it'll display a dialog with the contents of the text file. (using display dialog)



Basicly, it's for me to have a reminder of something I need to do when I get home.

However, I'm wondering if there's a better way to do this, as I've seen that only the first text file gets a message...no more are shown until the 1st dialog is Ok'd/Canceled.

I believe Growl notifications would do multiple, but they don't stay on screen, to my knowledge.

Anyone have any thoughts on this?
 
Growl will do this. You can have the notifications stay on screen until they are clicked, or they can auto-dismiss. They can also be whatever you want, so you don't have to actually prewrite them. Once you register your AppleScript "application", you can configure it however you want.

http://growl.info/documentation/applescript-support.php

Huh...I had read that..or a similar page, and my impression was you had to give it a list of different messages at the start....so it can display read in variables?
 
Huh...I had read that..or a similar page, and my impression was you had to give it a list of different messages at the start....so it can display read in variables?

Of course. Instead of the stuff in " ", you can just as easily pass in a variable.
 
I believe this is what you are looking for, what it does is that it takes the first file that is dropped into the folder, reads it and sends a growl notification. However, I have no idea how one would parse the file into readable text, it currently has a bunch of formatting stuff at the top. I would appreciate if you show me how you would do it :D
Code:
on adding folder items to this_folder after receiving added_items
	set readfile to read item 1 of added_items as string
	tell application "GrowlHelperApp"
		set the allNotificationsList to ¬
			{"Dropbox Notify"}
		set the enabledNotificationsList to ¬
			{"Dropbox Notify"}
		register as application ¬
			"Dropbox Notify" all notifications allNotificationsList ¬
			default notifications enabledNotificationsList ¬
			icon of application "Dropbox"
		notify with name ¬
			"Dropbox Notify" title ¬
			"Dropbox Notify" description ¬
			readfile application name "Dropbox Notify"
	end tell
end adding folder items to
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.