Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 13, 2012, 10:01 PM   #1
r1ngx
macrumors newbie
 
Join Date: Oct 2010
Please help with this Applescript. Thanks in advance!

I would like to adapt the following NewsRack plug-in applescript to save the .html that is generated to a directory on the hd. Thanks in advance for any help.

Code:
tell application "NewsRack"
	set article_url to url of selected tab
	if article_url is "" then
		display dialog "No article selected." buttons {"OK"}
		return
	end if
	if article_url starts with "http://www.instapaper.com/m?" then
		return -- we are already on an Instapaper page
	end if
	
	set encoded_url to escape article_url
	set instapaper_url to "http://instapaper.com/m?u=" & encoded_url
	
	if kind of selected tab is "news" then
		do JavaScript "document.location.href = '" & instapaper_url & "'"
	else
		set url of selected tab to instapaper_url
	end if
end tell

Last edited by OllyW; Dec 14, 2012 at 03:06 AM. Reason: Please use code tags
r1ngx is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Programming 0 Oct 28, 2013 11:38 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Applications and Mac App Store 0 Oct 28, 2013 11:32 PM
Frame Advance DexterII Apple TV and Home Theater 0 Mar 25, 2013 03:04 PM
iPhone: Sorry in advance, but should I upgrade my 4S from 5.0.1 now? docgerrard Jailbreaks and iOS Hacks 22 Jan 29, 2013 10:38 PM

Forum Jump

All times are GMT -5. The time now is 09:36 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC