auto bump script

Here is a script I wrote to automatically bump my post on a website every 30 minutes:


tell application "Safari"
	activate
	open location "http://www.tf2outpost.com/trade/6252612/bump"
	delay (5)
	tell application "Safari" to do JavaScript "window.close()" in front document
end tell
repeat
	do shell script "sleep 1800"
	tell application "Safari"
		activate
		open location "http://www.tf2outpost.com/trade/6252612/bump"
		delay (5)
		tell application "Safari" to do JavaScript "window.close()" in front document
	end tell
end repeat


An AppleScript delay is rather cpu intensive – you’re better off with


do shell script "sleep 1800"

Look at the man page – this is a delay, not sleep as we normally think about it.

Thank you.

i did a test

ran a delay 100 then went to the activity monitor and no cpu loading on applescript or script editor.

maybe apple improved the performance since then

i did not try it on a ppc machine

Hello.

Here is a little script that should be saved as a stay open application for refreshing a page every 5 minutes (when you are waiting for posts). You should quit it when you are posting.


on idle
	try
		tell application "Safari"
			tell its document 1 to set a to its URL
			open location a
		end tell
		return 300
	on error
		tell me to quit
	end try
end idle

on quit
	continue quit
end quit