Topic: https://brettterpstra.com/2011/03/07/watch-for-file-changes-and-refresh-your-browser-automatically/
hide preview

What's next? verify your email address for reply notifications!

unverified 4y, 56d ago

Wow, awesome!

hide preview

What's next? verify your email address for reply notifications!

unverified 4y, 144d ago

Sorry to comment on an ancient post, but for future reference: I got an error number -2741. After a little research it became apparent that tell atab to do javascript "window.location.reload()" should read tell atab to execute javascript "window.location.reload()".

Also, I needed to enable Chrome to execute Javascript events throught AppleScript (View -> Developer).

hide preview

What's next? verify your email address for reply notifications!

Tommy 13y, 36d ago

This looks awesome, but I'm not able to get the rb-script nor the service working in Lion. Any ideas?

hide preview

What's next? verify your email address for reply notifications!

pax 13y, 82d ago

Awesomely awesome! Thanks for saving some very repetitive keystrokes.
Though, I only managed to get it going in Safari (the system service version) but when I run the Crome version I, when I change one of the files inside the watched folder I get:
The action “Run Shell Script” encountered an error.

hide preview

What's next? verify your email address for reply notifications!

Indy 13y, 210d ago

Thanks. This is very useful. I'm enjoying working through my test process using this.

A quick word though. The Watcher Automator script does not seem to work on Lion.

You wouldn't happen to have a version running on Lion, would you?

hide preview

What's next? verify your email address for reply notifications!

Donald Curtis 14y, 11d ago

One of these processes got away from me today. Seems like using the services menu they will persist. I just stopped the service but the process (ps x | grep ruby) is still showing up.

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 14y, 11d ago

Odd. Did you kill the process that you found in ps? It's possible that processes spawned from a Service might not be entirely controllable by the Service. Couple of questions:

<ol>
<li>Did you have more than one folder being watched at the time?</li>
<li>If so, did you select multiple folders, or run the Service more than once?</li>
</ol>

hide preview

What's next? verify your email address for reply notifications!