Discussion:
[notepad-plus - Plugin Development] Simple Script 1.07 released - dockable
(too old to reply)
SourceForge.net
2007-12-28 05:57:55 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4692864
By: fidvo

I started making a quick change to SimpleScript so that I could use it
to automatically compile the chapters of a book into a single document, then
got carried away and made some more substantial changes.

As it turns out, creating a dockable form isn't as hard as I had expected.
So I changed the modal form to a dockable form instead. Since this was the
most requested feature, I decided to upload it now rather than wait to finish
all of the functions I had planned for version 1.1.

Version 1.07 also includes the following new features:

Run
SourceForge.net
2007-12-28 08:34:30 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4692944
By: nobody

I downloaded Simple Script 1.07 and am having trouble when undocking the Script
Writer. The Plug-In just seems to hang when I return from another application.

I think the Simple Script submenu option could have a better name than the same
as the Plug-In menu item itself.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 08:40:36 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4692949
By: nobody

If I dock the Script Writer (why not name the menu option like that?) at the
bottom of N++, this is not very convenient. I will only have the script edit
pane, without any buttons to push.

When I hit the Run button on an empty script, this results in the current document
getting a "changed" status, while in fact nothing has changed.

It's not very informative to get some error message on Validate Script on Clipboard
(I suggest: in/from Clipboard) when the Script Writer is not visible. I wanted
to suggest to show the Script Writer then, but where will the Clipboard contents
be shown? Perhaps you could add a tab for that, to share with the current edit
pane.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 15:29:30 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693327
By: fidvo

In response to some of the above questions:

1) The Plug-In just seems to hang when I return from another application.

Could you list the exact steps that you perform when you get this error? I
haven't been able to duplicate this error.

I did notice there are some ugly issues if you undock the Script Writer and
then select Simple Script from the menu again. Maybe this is related?

2) I think the Simple Script submenu option could have a better name than the
same as the Plug-In menu item itself.

I named it this because I want it to be the most obvious choice on the menu,
since it will be the one you use most. I used to call it "Run Script" for the
same reason. I'm willing to consider other possibilities if you have any
suggestions. (As the other poster suggested, "Script Writer" has potential,
but I don't think it's quite as obvious)

3) If I dock the Script Writer ... at the bottom of N++, ... I will only have
the script edit pane, without any buttons to push.

I know, and I plan to eventually fix it. I just wanted to get something uploaded
quickly since people have been asking for a dockable Script Writer window.
I had to make a judgment call about where to place the controls on the form,
and I decided a vertical arrangement was the most appropriate. For now you'll
just have to dock it on either the left or the right. Technically, you could
also expand the bottom pane so it's tall enough to fit the whole Script Writer
window, but that requires over half the screen.

3) When I hit the Run button on an empty script, this results in the current
document getting a "changed" status, while in fact nothing has changed.

While the document is identical to the way it was before, technically it has
changed. It's like if you type in some text and then delete it. You have performed
some actions on it even if those actions resulted in the same document
as before.

In most cases I would leave it at that and not worry about it, but since the
programming to make sure the script isn't empty before running it is simple
enough, I'll go ahead and fix it.

4) It's not very informative to get some error message on Validate Script on
Clipboard (I suggest: in/from Clipboard) when the Script Writer is not visible.

I'm assuming the usual way you're going to get a script onto the clipboard is
by designing it in another tab in Notepad++, so in most cases you'll have the
script only one click away. This will especially be the case when Validating
the script, because you'll most likely be using this option during the design
stage.

If you can explain how you might get a script onto the clipboard without having
that script available to view somewhere else, I'll consider displaying
it somewhere.

That gives me another idea: Maybe I'll add a Validate Script in Document option.
I won't include a Run Script in Document, because that would run the script
on itself.

Thanks for your comments and suggestions.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 20:16:31 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693670
By: nobody

1) The Plug-In just seems to hang when I return from another application.
Could you list the exact steps that you perform when you get this error? I
haven't been
able to duplicate this error.
No special steps needed. I just open the Script Writer, undock it, leave N++
and return. Performing any action inside the Script Writer made it hang.


2) I think the Simple Script submenu option could have a better name than the
same as the Plug-In menu item itself.
I named it this because I want it to be the most obvious choice on the menu,
since it
will be the one you use most. I used to call it "Run Script" for the same
reason. I'm
willing to consider other possibilities if you have any suggestions.
(As the other poster suggested, "Script Writer" has potential, but I don't
think it's
quite as obvious)
I believe he suggested "Script Composer" with some comment on the word
Writer...


3) When I hit the Run button on an empty script, this results in the current
document getting a "changed" status, while in fact nothing has changed.
but since the programming to make sure the script isn't empty before running
it is
simple enough, I'll go ahead and fix it.
Will you consider scripts containing only empty lines?


4) It's not very informative to get some error message on Validate Script on
Clipboard (I suggest: in/from Clipboard) when the Script Writer is not visible.
If you can explain how you might get a script onto the clipboard without having
that
script available to view somewhere else, I'll consider displaying it
somewhere.
That gives me another idea: Maybe I'll add a Validate Script in Document option.
I won't
include a Run Script in Document, because that would run the script on
itself.

Well, not necessarily will the script still be available somewhere. If it was
copied "some time before" and now results in an error... What would a user (have
to) do? Paste it in a document or in the Script Writer anyway, to be able to
check it.

It think it would be most transparent to run scripts only from the visible Script
Writer editor pane. Isn't that were the favourites or loaded scripts end up
as well? I think you may agree that running a script from the Clipboard at some
time may result in unexpected behavior or errors.

What would the added value of the Validate Script in Document option be? I think
it's the same way around the same "problem". If you want to run the script,
you have to copy it to the clipboard and possibly paste it in the Script Writer
anyway...


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 20:25:31 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693677
By: fidvo

I made a quick change to the plugin to fix an obvious bug that I didn't catch
until after uploading version 1.07. Now if you undock the Script Writer and
then select Simple Script from the menu again, it doesn't leave a "shadow" form
behind. (If you want to see what I mean, try it in version 1.07)

While it didn't really hurt anything, it was pretty ugly.

If you already downloaded version 1.07, I highly recommend that you download
version 1.08 right away.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 20:42:54 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693696
By: fidvo

1) No special steps needed. I just open the Script Writer, undock it, leave
N++ and return. Performing any action inside the Script Writer made it hang.

I still couldn't get the problem to happen. Try downloading version 1.08 and
see if it fixes it. If not, let me know and I'll look into it some more.

2) I believe he suggested "Script Composer" with some comment on the word
Writer...

I'm still considering it. I'm really not satisfied with any of the choices;
they all have drawbacks. The truth is that I'm kind of hoping to have a sudden
stroke of genius and come up with the perfect label for the menu option.

3) Will you consider scripts containing only empty lines?

I think eventually I'll make it so that it ignores scripts that (a) have no
lines, (b) have only blank lines, or (c) have only comments on the lines that
aren't blank. That takes a little more programming, but it should be doable.

4) It think it would be most transparent to run scripts only from the visible
Script Writer editor pane.

I already paste the clipboard contents into the Script Writer window with "Run
SourceForge.net
2007-12-28 20:58:02 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693707
By: nobody

Perhaps you could create a new thread for the message above, about version
1.08.

I just downloaded it, ran N++, opened the Script Writer, undocked it...
and N++ stopped functioning alltogether.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 21:32:23 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693751
By: nobody

I would like to suggest to enter the fully typed variant of your sourceforge.net
email address in the About box of the Simple Script Plug-In.
This would be consistent with the address listed on your Developer Profile on
sourceforge.net.
That's why the About box got me confused.

I really wonder which of the two addresses I would see in a reply to the email
I tried to send... I guess this would have been the extended version, too.

But since my mail is rejected, I wonder... What's the use of mentioning the
email address anyway?


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 21:32:48 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693752
By: fidvo

I finally got the problem to happen. Apparently, if you click on any of the
buttons when the form is undocked, it locks up Notepad++. It doesn't happen
if the form is docked, which is strange. And it doesn't matter what the button
does; I created a button that did nothing at all, and it still locked it up.

It happens in version 1.08 too, so until I can figure out what's going on, leave
the Script Writer window docked.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 21:43:48 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693766
By: nobody

2) I believe he suggested "Script Composer" with some comment on the word Writer...
I'm still considering it. I'm really not satisfied with any of the choices;
they all
have drawbacks. The truth is that I'm kind of hoping to have a sudden stroke
of genius
and come up with the perfect label for the menu option.
Perhaps "Script Engine (Dialog)..." would be a good choice. I suggest adding
the dots, indicating that a (docked) form will show.


3) Will you consider scripts containing only empty lines?
I think eventually I'll make it so that it ignores scripts that (a) have no
lines,
(b) have only blank lines, or (c) have only comments on the lines that aren't
blank.
That takes a little more programming, but it should be doable.
Alternatively, you could check if any real action is performed during execution
and only then decide to paste back the changed contents afterwards.

4) It think it would be most transparent to run scripts only from the visible
Script Writer editor pane.
4b) What would the added value of the Validate Script in Document option be?

I would suggest to add some uniform behavior which would simply copy the selection
(or the complete document) into the Script Writer's editor pane and show the
Script Writer, both for Running and Validating.
If the Clipboard's contents are assumed to be visible somewhere anyhow, you
would also skip the step requiring the user to copy these lines manually.

Perhaps some kind of a window list would be an outcome, allowing you to select
a window to perform the current document's script (or selection) to, or allowing
you to select the script to perform on the current document('s selection).


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 22:17:09 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693810
By: nobody

One more suggestion: perhaps you could add string qualifiers to the hints in
the Functions pane. I had to find out which character I had to use to get rid
of the "Error 2: malformed string" message. Alternatively, you might mention
the type of each value (string or text), but then again it would be nice to
know what character is used to identify that type.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781
SourceForge.net
2007-12-28 22:42:26 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4693842
By: nobody

The HOME and END keys don't seem to have any effect in the Script Writer.


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=482781

Continue reading on narkive:
Loading...