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

Import source code from Safari into a new GoLive page Apps
To import the source code from the current Safari window directly into a new GoLive Document, use the following applescript. Save and place in the script menu, or add to whatever else you use to automate your workfolow.

tell application "Safari"
  set theSource to source of front document
end tell

tell application "Adobe GoLive 6.0.1"
  New document
  Select Line 1
 Replace Using theSource
end tell
Short and sweet, but I couldn't find any references to GoLive scripting anywhere on the web, so it took a bit to get figured out, especially how to remove the initial 15 lines of code that a new GoLive file contains. I have found that with some web pages, after performing this action, I ended up with anywhere from 1-5 lines of complete gibberish, always at the very bottom of the file. All I have to do is select it and delete it, and things work fine, otherwise GoLive complains about 00 byte characters. Hope this helps!
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[3,123 views]  

Import source code from Safari into a new GoLive page | 2 comments | Create New Account
Click here to return to the 'Import source code from Safari into a new GoLive page' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Import source code from Safari/IE into other applications
Authored by: russh on Jul 03, '03 12:05:49PM

FWIW, I've made some "Get Source" scripts available on my dotmac page.

http://homepage.mac.com/russh/

There are applescripts for BBEdit and Pagespinner for both IE and Safari.

You can drop the scripts into the Script Menu and it makes an easy way to load the source of a page into your preferred editing tool.

---
--
russh



[ Reply to This | # ]
Import source code from Safari/IE into other applications
Authored by: SnapJack on Jul 03, '03 12:26:29PM

I use to do something like that until I found out about the command in GoLive "Download page" under the File menu. It does a lot more than get the code for that page, it will also get the images, the js scripts and css documents if available. Not sure of what else but it makes it a whole lot easier to take a design apart to learn how something works.

Cheers.



[ Reply to This | # ]