Author Topic: plugin for launching scripts  (Read 7348 times)

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
plugin for launching scripts
« on: December 14, 2017, 18:27:57 pm »
It's a fork of the 'Custom Scripts' plugin (http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/CustomScript.html), but with a simplified scripts management.

Plugin scan special directory for scripts (*.py, *.js, *.vbs files). Shortcuts to any found scripts are
added to the Script menu. If there are any subdirectories, they are scanned too and added as submenus.
Click on entry will launch the script.

Special directory should be named 'scripts2' and reside in the CamBam system directory (Tools->Browse system folder).


« Last Edit: December 14, 2017, 18:30:53 pm by jk »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4847
    • View Profile
Re: plugin for launching scripts
« Reply #1 on: December 14, 2017, 19:06:11 pm »
Why can't the normal 'scripts' folder be used ?
Made in England

Offline jk

  • Wookie
  • ****
  • Posts: 265
    • View Profile
Re: plugin for launching scripts
« Reply #2 on: December 14, 2017, 19:36:08 pm »
I use 'scripts' folder as a place a to store libraries (modules), so they could be imported into the scripts.

Say, the stock Pulleys.py is a library. It is not an executable and shouldn't be called. But it could be imported into the 'executable' script to actually draw a pulley. I place this small script into the 'scripts2' folder.

Libraries from 'scripts' folder are on the default search path and accessible from other scripts.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: plugin for launching scripts
« Reply #3 on: December 14, 2017, 21:38:33 pm »
Hello

Nice job ! and easy to use compared to Banobi's version ... and it works on CamBam V1 (Banobi's version does not)

I think it's good idea to have a separate folder for scripts to add to menu, so we can choose what scripts we want to add, instead to have hundreds of them in the list.

Thanks !

++
David

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3184
    • View Profile
Re: plugin for launching scripts
« Reply #4 on: December 14, 2017, 21:46:56 pm »
I wish I could say the same David. Something is not right here..
Should I remove the BaNoBi's version?
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: plugin for launching scripts
« Reply #5 on: December 14, 2017, 21:54:16 pm »
Hello Bubba

Seems this plugin is not working with CB 0.98 but only with V1.0

++
David

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3184
    • View Profile
Re: plugin for launching scripts
« Reply #6 on: December 14, 2017, 22:05:26 pm »
Hello Bubba

Seems this plugin is not working with CB 0.98 but only with V1.0

++
David

Hi David.

That's the only version I have installed V1.0 r14
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: plugin for launching scripts
« Reply #7 on: December 14, 2017, 22:28:27 pm »
Re

I get exactly the same error as you on V1.0, but with banobi's plugin ; no problem with jk plugin.

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3184
    • View Profile
Re: plugin for launching scripts
« Reply #8 on: December 14, 2017, 23:21:02 pm »
I need to remove the Banobi plugin along with it's XML file?
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: plugin for launching scripts
« Reply #9 on: December 15, 2017, 01:05:41 am »
Yes it is not working with V1.0 ; then creates the 'scripts2' folder in your cambam system and copy (or move) a script file in it to test and run cambam. the script must appears in the script menu

++
David
« Last Edit: December 15, 2017, 01:07:16 am by dh42 »

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3184
    • View Profile
Re: plugin for launching scripts
« Reply #10 on: December 15, 2017, 01:08:10 am »
Yes, then creates the 'scripts2' folder in your cambam system and copy (or move) a script file in it.

++
David

Yes, I have done this first thing before installing the plugin  ;) :D.

My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3184
    • View Profile
Re: plugin for launching scripts
« Reply #11 on: December 15, 2017, 01:18:24 am »
Now, the new plugin is working nicely, all scripts are present for selection except for one thing... How can I enter the data required for the script to function? For example, I have a plugin 'Bottom_UP Internal Threading' that I use fairly often, written by Lloyd.
 http://www.cambam.co.uk/forum/index.php?topic=4751.0
It requires multiple entries based on the thread I want to cut. The plugin won't let me do that. Or. I'm I doing something wrong?

Personally, except for this and similar issues, I like this one lot better its than its predecessor  ;D

Forgot to add the jpg file
« Last Edit: December 15, 2017, 02:02:49 am by Bubba »
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: plugin for launching scripts
« Reply #12 on: December 15, 2017, 01:55:01 am »
I think that the script must be modified so it ask for the values (instead to change data in the code itself).
« Last Edit: December 15, 2017, 01:57:51 am by dh42 »

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3184
    • View Profile
Re: plugin for launching scripts
« Reply #13 on: December 15, 2017, 02:04:37 am »
I think that the script must be modified so it ask for the values (instead to change data in the code itself).

Hopefully Lloyd will read this and find the time and the will to do this ;) ;) ;) ;D
My 2¢

Win10 (64 bit, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, Endurance Laser.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 6680
    • View Profile
    • Cambam V1.0 French Doc
Re: plugin for launching scripts
« Reply #14 on: December 15, 2017, 02:16:27 am »
Is there many values that must be changed each time? (I count 10 values !) if there is many to change each time, it's not very easy with a script because we can ask for only one value at a time. Maybe the script can be turned in a plugin, so one can use a form to ask for values in a more comfortable way.