Well done! You are doing greatly desired work!
I really, really like it.
Posts made by sergey2402
-
RE: [Plugin] Hatchfaces (v1.8 beta) UPDATED 15-Dec-2012
-
RE: [Plugin] Hatchfaces (v1.8 beta) UPDATED 15-Dec-2012
I hope very much you will continue to improve this plugin.
-
RE: Ruby Hotkeys Plugin?
Thank you. I will tell my friend - it's impossible. Forget about it.
-
RE: Ruby Hotkeys Plugin?
@tig said:
... BUT my question is why do you want to do this ? ...
OK. I will tell you a little story.
My friend (F) said to me (M) recently:
(F) I have on the toolbar buttons of SketchUp at the top 4 rows of icons , bottom - 1 row, left 2 columns and right 1 column
I do not need so much.
In these plugins I use only one or two icons (maybe three - but no more).
Why do I need to keep unwanted toolbar icon?
I know - it is possible to see the text of each script, find the command that it does and write a new script for the icon on the toolbar for this command.
But I'm not a programmer. And I canât and I donât want find at the other people's scripts rows with those commands.
And I do not know how to write Ruby scripts.(M) And what do you want from me?
(F) I can define in SketchUp hotkeys for commands necessary to me.
And you should write a new Ruby script that would be emulated press these hot keys (such as "Shift+Ctrl+A.rb" and "Shift+Ctrl+B.rb" and "Shift+Ctrl+C.rb", ect, but not "Shift+Ctrl+E.rb" or âH.rbâ and so on, because those are internal commands of SketchUp). And these new scripts must be in the form of an icons on the toolbar.(M) BUT why would you want to do this??
(F) Then I can assign hotkeys (to plugins, that I need) and leave them on the toolbar (your new icon), and the all unwanted icons (top 4 rows, bottom 1 row, etc) I will hide.
And the lines in your new scripts (e.g. cmd.tooltip = "Shift + Ctrl + A") I'll be able to change myself by e.g. cmd.tooltip = "run plugin X". And the icons in your new folder "My Icons" I'll be able to change myself, too.(M) And then what?
(F) 1. And then - on my toolbar is only one row with the required icons.
2. And then - when I want I can quickly redefine hotkeys for the other plugins (if there is a newer or better version from another programmer).
3. And then - I can have icons for plugins that do not have icons.
4. And then - any user (not programmer) will be able very easy to create your personal toolbar.
5. And so on...(M) Well, I'll ask on the forum sketchucation.com - is it possible to do so?
And so I ask - is it possible to do so?
-
RE: Ruby Hotkeys Plugin?
I know about the key-emulators.
But I want to achieve this result by means Ruby and Sketchup. Is it not possible? -
RE: Ruby Hotkeys Plugin?
Yes. You are right. Just I have not checked the information given to me
-
RE: Ruby Hotkeys Plugin?
In the menu Window > Preferences > Shortcuts I redefined the letter "H" from the âCamera/Panâ to plugin âPipe Along Pathâ.
I drew the lines, selected them and pressed on the keyboard the letter âHâ.
Plugin âPipe Along Pathâ been executed. BINGO!I drew the lines again, selected them and run Window > Ruby Console.
In the Ruby console I wrote a string âSketchup.send_action 10523â and pressed Enter
(I know - the value of 10 523 corresponds to the letter âHâ)And what I see as a result?
I see a HAND (Camera/Pan)!!!
What nonsense is going on?
-
RE: Ruby Hotkeys Plugin?
@jim said:
Serge, you are talking about Windows Automation with Ruby.
Unfortunately, for me it is too difficult. I'm just a civil engineer, not a programmer. I really like SketchUp and I found it very useful. I just want a little to tweak it for me...
-
RE: Ruby Hotkeys Plugin?
@tig said:
BUT why would you want to do this ??
In a nutshell - the ultimate goal to create a Ruby script called "hotkeys buttons (or icons) on the toolbar"
I mean, hotkeys are not built into SketchUp. I mean user-defined any hotkeys for any plugins. -
RE: Ruby Hotkeys Plugin?
@thomthom said:
?
You can define hotkeys for any menu or toolbar element - that include those the belongs to ruby scripts?Sorry, I do not understand. That was the question? Or was it your help?
Of course, my English is "excellent", but I understand it is very bad. -
RE: Ruby Hotkeys Plugin?
@dan rathbun said:
Numeric arguments only work on Windows, not on Apple Mac.
Concentrate on the command (not the key combos,) and use the string arguments for send_action.
Example: Ctrl+Shift+W = Camera Zoom Window, so:
Sketchup.send_action("selectZoomWindowTool:")
Any user can change the shortcut key combos for commands.
Thank you very much for you paid me attention. But my question is different.
Where can I find numeric values for these ("Shift+Ctrl+A" or "Shift+Ctrl+B" or "Shift+Ctrl+C") key combination? -
RE: Ruby Hotkeys Plugin?
@tig said:
BUT why would you want to do this ??
I will answer your question. But, with my âexcellent knowledge of Englishâ, I'll be a long time to formulate my ideas.
-
RE: Ruby Hotkeys Plugin?
@dan rathbun said:
use the Sketchup.send_action method.
I know some of numeric values applied to âSketchup.send_action( )"
For example, some of them:
10527: "Shift+Ctrl+E"
10526: "Shift+Ctrl+W"
-7892: "Ctrl+Y"
21101: "Ctrl+A"
21065: "A"
21096: "C"
21019: "E"
21074: "B"And so onâŚ
But I donât know the numeric values for the key combination, for example, "Shift+Ctrl+A" or "Shift+Ctrl+B" or "Shift+Ctrl+C", etc.
Where can I find numeric values for these (and similar) key combination?
-
RE: Ruby Hotkeys Plugin?
Is there a theoretical possibility to write the text of Ruby-script, which emulated a pressing hotkeys defined in the SketchUp by the user?
-
RE: Ruby Hotkeys Plugin?
I mean another thing.
It does not matter which plug-in to execute. Maybe "Weld", maybe "Beld" or maybe "Weld-Beld". Does Ruby ability to perform the command associated with the "hotkeys" assigned to Sketchup?
I don't want to know the name of the method, which plugin defines. I only know one thing - "hotkeys", which I defined in Sketchup, the plugin can be arbitrary. -
Ruby Hotkeys Plugin?
Can I through the Ruby script to execute the command, appointed in Sketchup on "hot keys"?
For example.
I have a plugin âWeldâ. And for him I have âhotkeysâ Ctrl+W.
Then in the Ruby Console I do - "execute Ctrl+W " and will execute the plugin âWeldâ.
Is it possible?