A quick (and dirty) Script Palette script
 1-11  12-31  32-44

Previous
Next
 From:  dinos
5993.32 In reply to 5993.31 
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5993.33 
Cool trick!

Excellent!

EDITED: 14 Feb 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5993.34 
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 ? :)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5993.35 In reply to 5993.34 
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5993.36 In reply to 5993.35 
Thx for the info!
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Hans
5993.37 
dinos,

thank you for your adwise.

Pilou,

thank you for making the test.

Hans
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5993.38 
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 ! )

EDITED: 16 Feb 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Hans
5993.39 
Hi Frenchy!

I had the same result.
But there are some more of "!". Replace all with "?" and the ":)" comes back.

Hans
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5993.40 In reply to 5993.39 
Yes but the number of possible ShorCuts are dramatically decreasing if you want keep some ones for real typing ShortCuts !

EDITED: 16 Feb 2014 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Mindset (IGNITER)
5993.41 
>> works only at the first re-launch of Moi! Cool... :)
>> ...but not at the second re-launch! :(
>> And disappears from the Shortcut list!

Found another little trick:
Create copies for each category. For example one for spirals, '../ui/ScriptSpirals.htm'
Change Line 22 to utilize a different character, unique for each category, as the '?' had been suggested: title = line.match(/\/\*\?(.+)\*\//);

[Shortcut Keys]
Alt+1=script: /*!Spirals...*/ moi.ui.createDialog( 'moi://ui/ScriptSpirals.htm' );
Alt+2=_ArchimedeanSpirals_ /*?ArchimedeanSpirals*/
Alt+3=Logarithmic2D /*?Logarithmic 2D*/
Alt+4=EulerSpiralSlider /*?Euler Spiral*/
Alt+5=EulerSpiral3 /*?Euler Spiral v3*/
Alt+6=FrenetClothoid3D_RK2_v1 /*?Frenet Clothoid 3D*/Alt+DownArrow=Nudge Down Small
A=Join /*!Join*/
Alt+S=IncrementalSave /*!Incremental Save*/
Ctrl+R=ReBuild /*!ReBuild*/
Ctrl+Shift+S=ScaleArray /*!ScaleArray*/
G=SpurGearProfile /*!Spur Gear*/
z=script:moi.ui.createDialog( 'moi://ui/ScriptPalette.htm' );




This way, items from the first list can 'createDialog' for other sub-categories:



And since each category file parses the ini file separately, the process remains repeatable!!
Even though, there are still yet a finite number of key-codes available for listing.

EDITED: 25 Apr 2015 by IGNITER

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Rogurt
5993.42 
Hello all,

I try to use that fine script with Moi 2.0 (Win7 64bit) but it just wont work. Giving me an error message (see attachment).
I made sure the ScriptPalette.htm is in ui folder NOT in Commands folder.

Can anyone help?

Regards
Rogurt


Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  dinos
5993.43 In reply to 5993.42 
Hi Rogurt,

unfortunately i don't think this script will work with Moi 2.0
I've never used Moi2.0 as i'm on a Mac, but there was a big change from Moi2.0, which was using Internet Explorer, to Moi 3.0 which is using webkit.


Dinos
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
5993.44 In reply to 5993.42 
Hi Rogurt, that script is using some new functions that were added in for v3, so it requires v3 to run and won't work on v2.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages:  1-11  12-31  32-44