[Plugin] HTML popper/writer

[Plugin] HTML popper/writer

Postby MartinRinehart » Wed Oct 28, 2009 6:14 pm

On my computer, in SketchUp, tapping "k" (as in "keycuts"), shows/hides this HTML page:

keycuts.gif


The first Ruby, keycuts_popper.rb, shows/hides c:/sketchup/keyboard_shortcuts.html. This one goes in your Plugins directory. Edit: You must create the c:/sketchup directory.

Mac users (and PC users who want to organize to suit their own style) should change the Ruby's first assignment ($keyboard_shortcuts_pathname = 'c:/sketchup/keyboard_shortcuts.html') to a pathname that suits your OS and taste.

If you have other HTML that you would like to pop up, copy this Ruby and modify that pathname to whatever you find useful.

The second Ruby, keycuts_writer.rb, looks at your shortcuts and writes c:/sketchup/keyboard_shortcuts.html. You can put this one in your Plugins directory if you want the HTML file rewritten each time you start Sketchup. I keep mine in the same directory as the HTML. Loading it in the Ruby Console rewrites the HTML. Edit: This Ruby is not smart enough to create a directory. You must write to an existing directory.

Again, modify the Ruby's first assignment html_file = "/sketchup/keyboard_shortcuts.html" to match the pathname in keycuts_popper.rb.

Anyone who finds this useful owes a big "Thank You!" to Jim, whose code showed me how to do it. Thanks, Jim!
0
Last edited by thomthom on Tue Dec 08, 2009 10:13 pm, edited 5 times in total.
Reason: Just cleaning up and organizing the Plugin forum.
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin]HTML popper/writer

Postby Chris Fullmer » Wed Oct 28, 2009 7:07 pm

Is there a reason to not default the shortcut html location to the SU installation directory? Why hardcode it to c:\sketchup. Seems like a place not many people use, its rather win3.1-ish. The standard should be inside the su installation base folder I would think, then allow users who want to put it in a non-standard location to be able to do so through customization of the script. Just a thought. Otherwise it looks great!

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin]HTML popper/writer

Postby MartinRinehart » Wed Oct 28, 2009 8:22 pm

Chris Fullmer wrote:Is there a reason to not default the shortcut html location to the SU installation directory?


Can't hard code any SU location as the path changes w/every SU upgrade. Wanted to hard code to avoid asking you every time you run k_writer. I use X and Y shortcuts for whatever I'm doing a lot of at the moment, so I run k_writer a lot. (Used to edit the HTML. Running k_writer's a big improvement.)
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

Re: [Plugin]HTML popper/writer

Postby MartinRinehart » Thu Oct 29, 2009 5:50 pm

Grab a new popper. The old one could add extra copies of itself to your Plugins menu.
0
Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

MartinRinehart 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: coconm, thalamix and 10 guests

Visit our sponsors: