[Plugin] LaunchIt v 1.4 (14 oct 2009)
-
here is the change of mine !
I add these to change the command list easy ,but is there any ways to read the command listfile directly?
AND the attachment is the plugin-GUI I changed
Ps: I think doubleKlick is better than oneclick
#ε½δ»€ε ₯ε
@Cpath = File.dirname(FILE)
@Cbarset = Set.new
Ctbs = Dir[@Cpath +"/A4_launchit"+ "/*.txt"]Ctbs.each do |tb|
IO.readlines(tb).each do |cmd|
next if cmd[0, 1] == "#"
#cmd, cmt = cmd.split("#")
next if cmd.nil?
cmd.strip!
@Cbarset = @Cbarset.insert cmd@Cbarset.each do |ca| $launchitcmd.push ca.split("|")[0..1] end end
end
-
great stuff! it's cleaner to have commands in a separate txt. I suggest you share your whole script (as a branch?)
Does anybody have experience with online code hosting ? like code.google.com ? Is there a branching feature to allow deviation from the main code ?
Regarding your question about automatic command extraction, I think this could be done by using the IO.readline to read all plugins and look for the lines which populate the menu and context (right-click) menu.
As I wrote in the first post, look for the
.add_item("
string in all the rubies, after the double quote, there usually is a command name, and the action
-
nice work a4chitect and thanks for putting my scripts as an example
I like github.com for hosting source and allows forking and if you want to learn about check the online book about Git
-
tbd: you're welcome. will look into the github, thx
-
hello a4rchitect,
i was just thinking if this could combine and work with pluginloader by alexschreyer to load plugins, then use launchit as the front-end.
pluginloader link
http://www.alexschreyer.net/projects/plugin-loader-for-sketchup/ -
Added a load of plugins but only one ever shows up by adding the
if(defined? $launchitcmd == nil) $launchitcmd = [] end $launchitcmd.push ["Command name","Command action"]
Bit, but only one ever shows up.
seems to be in alphabetical order, so weld.rb was the only one that would load, moved out of the folder then it was webconsole.rb and so on.
Any ideas?
-
@a4chitect said:
tbd: you're welcome. will look into the github, thx
don't let this stop you from working on the plugin. Distributed version control software is nice, but can have a lengthy learning curve (my experience, at least.) If you're in it for the long haul, then learning to use git or mercurial is well worth the effort. If this is an occasional endeavor - maybe not so much.
-
I was playing around with speech, and this could turn out to be a good interface for voice command control of SketchUp. It's not quite working - I can speak the word and it gets typed in the filter box, but for whatever reason the list is not filtered.
-
doesn't seem to work on macs too well but...
this is built into OS X (it's not SU specific.. all apps have this ability)
same deal, start typing some letters and all the options start popping up etc.. if you hover over a command for a second, it's path will be shown as well.. skindigo, fredo, etc works fine too..
it's also sort of smart in that it won't display commands that aren't possible at the time (for instance, redo won't show up in the search if there's nothing to redo)
i don't have anything to test it with but i'm almost positive voice cmmd will work.
[flash=640,385:3v2nt73s]http://www.youtube.com/v/1HBmYx3w3W0&hl=en&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6[/flash:3v2nt73s]
i'll add this.. it's a cool feature but the only time i use it is for obscure commands or when learning a new app.. once you know an app, shortcut keys are way better..
-
Jim: I suppose that using speech for input doesn't trigger the OnKey event in the javascript - to perform the search
Jeff: I envy you - because the built-in OS X functionality looks great. The whole purpose and idea of launchit was, that my plugins menu won't fit on the screen anymore, and gets 'randomized' very often - because of new plugin installations. I agree that using keyboard shortcuts is way better. I think that Google should consider integrating the shortcut preferences into the GUI. It provides the functionality of searching for commands already, but serves only to assign shortcuts.
-
How's the git repo coming?
-
Jim: I gave up on git or any other code repos for the time being. This plugin would probably not get developed by anyone else
-
@a4chitect said:
Jim: I gave up on git or any other code repos for the time being. This plugin would probably not get developed by anyone else
I can understand. But I did actually want to look at this as the menu for a "Protable Plugins" project to create a plugins folder people can carry with them on a portable device.
-
you are welcome to use/reuse/change the code
I would love someone to upgrade the command-extraction routine from present ruby files, the current version is weak (fails at extracting fredo6 commands, dynamic commands, and actually at all not simple ones)
I was hoping that all visiting ruby developers could agree on one method of the sketchup-top-menu and context-menu population, which could simplify any GUI replacement projects.
Even at this stage a GUI replacement in html+javascript could be easily done, thanks to the wonderful sketchup-ruby architecture.
-
oh NO ,
IN YOUR V1.4 I get a lot of error BECAUSE OF your html FILES
is there times for us to disscusion through MSN or QQ?
I have some idea to your plugins -
if i regenerate the list of ruby... doesn't appear all my ruby script.. why?? i've so many ruby.. but in the list there are only a part
-
now i have null your script and change some part of it .
- Just use the Java script to Filit or return the command name ,then index the command in the command array.
because if you throuh the javascript to launch the below commands it get errors
========
Joint Push Pull|JointPushPull.execute 'J'|jointpushpull|jpp_j|Joint Push Pull
Vector Push Pull|JointPushPull.execute 'V'|jointpushpull|JPP_V|Vector Push Pull
Normal Push Pull|JointPushPull.execute 'N'|jointpushpull|JPP_N|ζ²Ώζ³ηΊΏζ€εΊ
Undo Push Pull|JointPushPull.redo|jointpushpull|JPP_Undo|θΏε
RDC_ROUND|RoundCorner.launch :RDC_ROUND_ ||RDC_icon_Round_16|Round corners in 3D
RDC_SHARP|RoundCorner.launch(:RDC_SHARP_, { :sharp => true }) ||RDC_icon_Sharp_16|Sharp corners in 3D
RDC_BEVEL|RoundCorner.launch(:RDC_BEVEL_, { :profile_type => ['C', 1] }) ||RDC_icon_Bevel_16|Bevel edges and corners
=======
the index code
ame=$launchitcmd.find{|n|n.index(params.to_s)}
so i change to just to return the command name to ruby.
-
I try to use the winole.so to connect to the access file ,and the Excel files ,it work well and fast, but it must work on the mechine which have install the sofeware.
- Just use the Java script to Filit or return the command name ,then index the command in the command array.
-
how comes not all my plugins get loaded into the menu 'weld' is not there for eg ...
-
forgive me for being a bit on the dumb side, but this first post could declare what the plugin is supposed to do. it is only through reading the whole thread that one is able to understand its function.
-
hi a4chitect!! i installed your launchit plugin in my sketchup plugins folder... unfortunately when i start sketchup the following message appears
Error Loading File A4_launchit.rb
undefined method `file_loaded?' for #<Object:0xbd292d0 @ignorelist=["launchit", "indigo"]>what should i do??
Advertisement