Show messages:
1-20
21-40
41-44
From: dinos
Hi Michael.
Thanks for your help. I've updated the first post to include 2 versions of the script: one with a close button and one without.
Personally i prefer the version without the close button as it feels more natural: Shortcut for the popup to appear, command or escape to dismiss.
But i'm sure there are cases where it might be more useful to have a close button.
Dinos
From: Frenchy Pilou (PILOU)
Perfect : I had not enabled the French Language! :)
So when I enable it magically "Fermer" appears as aspected!
Sorry for the little disturb!
Of course I had also the red x button! ;)
From: Michael Gibson
Hi Pilou,
> Perfect : I had not enable the French Language! :)
Mystery solved! :)
- Michael
From: Andrei Samardac
Why I can not to have this script correctly shown in window?
script: /*! Show all except curves, points and Hidden style*/ var obj = moi.geometryDatabase.getObjects().getBReps(), st = moi.geometryDatabase.findstyle("Hidden",0), sti; if (st) {sti = st.index;} else { sti = "nf";} for ( var o = 0; o < obj.length; ++o ) { if ( obj.item(o).hidden && obj.item(o).styleIndex !== sti) { obj.item(o).hidden = false; obj.item(o).selected = false; }};
In script window it looks like this:
< obj.length; ++o ) { if ( obj.item(o).hidden && obj.item(o).styleIndex !== sti) { obj.item(o).hidden = false; obj.item(o).selected = false; }};"> Show all except curves, points and Hidden style
Looks like it becouse <.
From: Andrei Samardac
Is it any way to make some categories in this script window, to store scripts more logically?
From: dinos
Hi Andrei,
The problem is caused by the double quotes around "Hidden" and "nf" in the script.
If you replace the double quotes with single quotes it should work fine:
script: /*! Show all except curves, points and Hidden style*/ var obj = moi.geometryDatabase.getObjects().getBReps(), st = moi.geometryDatabase.findstyle('Hidden',0), sti; if (st) {sti = st.index;} else { sti = 'nf';} for ( var o = 0; o < obj.length; ++o ) { if ( obj.item(o).hidden && obj.item(o).styleIndex !== sti) { obj.item(o).hidden = false; obj.item(o).selected = false; }};
This is a limitation of the way the script palette works.
Dinos
From: Andrei Samardac
dinos, thank you.
From: Frenchy Pilou (PILOU)
Works fine for the "one line" but for the "commands" I see well the name of the Line of the Command but
A little problem!
Of course the command works when I make : Press TAB ...and type _vClone !
Idem if I take a direct native command like Blend!
From: dinos
Hi Frenhcy,
you have to leave a space between the command and the comment:
Blend /*!Blendo*/
Otherwise my script and/or Moi get confused.
Dinos
From: Frenchy Pilou (PILOU)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaah!!!!!!!!!!!!!!
All is fine now! Bravo!
From: Hans
Hi dino!
You use this sign "!" to pick the commands for your palette. In your script I have seen some of this sign.
Can i change this signs for example in to "?" or other?
Then copy and rename your script "Script Palette 2" to make different category of caommands.
I am not a programmer. May be this is a way.
Thanks for your work!!
Hopefully, Hans
From: dinos
Hi Hans!
I havent tried it, but yes it should work as you describe.
Just change the ! at line 22 in the second copy of the script to something else:
code:
title = line.match(/\/\*\!(.+)\*\//);
Its escaped so you should be fine with most symbols.
I wrote this script primarily for me, and released it in case someone else needed a relatively simple way to keep their scripts in a palette. The Shortcut Keys panel inside Options is hardcoded and cannot be altered so i used the ! sign to emulate a check box next to each command. In my mind the ! sign is actually a check box saying "include in the palette" ;-)
I could replace the ! with !1, !2 etc for multiple categories, but there a few issues that i'll have to think about such as naming the categories, passing parameters to the script etc.
If i can find some free time i might give it a shot.
In the meantime what you are describing is the best way to do it.
Dinos
From: Frenchy Pilou (PILOU)
Cool trick!
Excellent!
From: Frenchy Pilou (PILOU)
Nothing but as you can see above the button is not centered ! ;)
So does exist some code for resolve this very very very little disturb ? :)
From: Michael Gibson
Hi Pilou,
> Nothing but as you can see above the button is not centered ! ;)
That's normal that buttons on dialogs in MoI are not centered, that's because it looks weird on larger dialogs. See for example the Close button on Options dialog. This dialog is just using the same thing.
- Michael
From: Frenchy Pilou (PILOU)
Thx for the info!
From: Hans
dinos,
thank you for your adwise.
Pilou,
thank you for making the test.
Hans
From: Frenchy Pilou (PILOU)
The only default that I see is that you must create a different Shortcut for each item even you don't need it if you want just use the text palette!
use the same shortcut for different commands don't work! :(
an empty Left column don't work :(
Or does exist a little trick for avoid that ?
Curiouslly something like
Alt + 1 + 2 Cone /*?cona*/
Alt + 1 + 3 Rectangle /*? rectangla*/
Alt + 1 + 4 Lines /*?Ligna*/
...etc
Close Options Shortcut, Exit Moi
works only at the first re-launch of Moi! Cool... :)
...but not at the second re-launch! :(
And disapears from the Shortcut list!
(words following are just letters not real French words except "Tuber" = Sweep and "Fermer" = Close ! )
From: Hans
Hi Frenchy!
I had the same result.
But there are some more of "!". Replace all with "?" and the ":)" comes back.
Hans
From: Frenchy Pilou (PILOU)
Yes but the number of possible ShorCuts are dramatically decreasing if you want keep some ones for real typing ShortCuts !
Show messages:
1-20
21-40
41-44