Auto show plugin window at startup
-
This is up to each plugin programmer.
Perhaps he exposed a module function ?
Yep.. it's
AE::Console::open
OH wait.. that may be a different console plugin. -
I think Alex uses
AS_RubyEditor::RubyEditor.new
, but it's been a while since I updated/used his console... -
Try Console+:
http://sketchucation.com/pluginstore?pln=ae_Console -
Sorry. I misread your first post. You were asking about an Editor. And I replied about a Console.
An Editor and a Console are two (2) different things. But they work together.
Sometimes a fancy editor will have a console window built-in. But Alex's editor does not.
This means you must use a separate console. You may choose to use either the simple console that comes with SketchUp, or one with more features like AE_Console+.
When you execute code from Alex's Editor, you should also have a console window open. It will display the text from
STDOUT
andSTDERR
. -
I am on Windows, so I use Notepad++ with a dark outer space theme. (I cannot stare at bright screen all day.)
It is extensible (plugins) has a tabbed interface (with dual side x side panes which I always use, and can be used with a Compare plugin.)
It supports all kinds of text encodings, 3 EOLs, hotkey namespace & block folding by levels (ALT+1,ALT+2, etc.)
[Info] Notepad++ : Tip, Tricks & Plugins
Also several users here made up auto complete file(s).
Notepad++ SU8 Ruby API Autocomplete
Thomas moved it to a BitBucket repo, and it may need some updates.Jim Foltz also hooked it into the SketchUp Debugger:
SketchUp Debugging for Notepad++ -
@sawdust...
are you still on v8, or is your profile out of date?
only ask because both the Ruby version and 'Ruby Console' have moved on quite a lot since....john
-
A few of us run modified versions of jf_RubyPanel to make life easier...
It quite easy to add items...I have a separate dev toolbar for turning Ruby on/off and re-starting...
e.g. one is re-starting SU with only su_plugins + the one I'm working on loading...john
-
@sawdust_online said:
It works, of course! But I have to paste each time I want my script to run. I tried to get that last command with Up key but nothing appears. It has gone.
That is weird,... the UP key should work if the Console window has focus. So you may need to click on the console's input box to give IT the focus, before using the UP or DOWN keys.
@sawdust_online said:
Do I have to paste [the whole path] each time, nothing shorter?
Oh no. In the console you are in SketchUp's Ruby environment.
It uses the$LOAD_PATH
array (aliased as$:
,) to search for scripts and extensions whenload
orrequire
is called.The USER Plugins path is already in
$:
.
You can see whats in the loading path array at the console:
pp $:
You can also push your own development paths into the array either by a script or a console command.
$: << ENV["USERPROFILE"]<<"/Documents/SketchUp/project"
.. so anyway ... in the Ruby environment, you only need to type a relative path from one of the Ruby load paths.
load "geartool/wormgear.rb"
.. assuming that "geartool" is some subdirectory under one of the load path directories.ADD: The
$LOAD_PATH
array (alias$:
,) is NOT an autoload feature of Ruby. It is SketchUp that autoloads scripts that are in the "Plugins" and "Tools" directories. -
@sawdust_online said:
Tell me, can we deal with sketchup API and another language than Ruby? ... is there any other way ?
You can write extensions in C & C++.
@sawdust_online said:
I use it for about a week but I'm not sure to go deeper. At first it looks as a strongly typed language easy to use for developers but this doesn't turn real. How a language could be easy if it requires two keys for commenting a single line? it's the first time I meet such odd thing!
It would be better to start a new topic about the Ruby language.
Or repost your thoughts to one of the old topics...
Advertisement