scripting try

Features wanted...
Post Reply
graham
Posts: 457
Joined: 24 Aug 2007 22:08
Location: Isle of Man

scripting try

Post by graham »

When testing a script in the try window it would be good to be able to select stepping from this window. It is easy to enter a script only to find stepping is not set.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: scripting try

Post by serendipity »

graham wrote:When testing a script in the try window it would be good to be able to select stepping from this window. It is easy to enter a script only to find stepping is not set.
True, I hate this also. But one can always add ::step; in the first line and stepping starts.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: scripting try

Post by admin »

Don't see a good way to handle this. Maybe always auto-enable step mode when going through try???

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: scripting try

Post by serendipity »

admin wrote:Don't see a good way to handle this. Maybe always auto-enable step mode when going through try???
or a checkbox inside try?

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: scripting try

Post by admin »

serendipity wrote:
admin wrote:Don't see a good way to handle this. Maybe always auto-enable step mode when going through try???
or a checkbox inside try?
A way, but not a good one IMO.

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Re: scripting try

Post by Muroph »

i prefer the checkbox.
you might want to paste or write a script in the try window and run it without stepping (i do it a lot).
besides, some scripts work when stepping is on, but not when it's off.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: scripting try

Post by jacky »

Checkbox sounds good to me, too.

The important thing being : is it the same as menu Scripting|Step Through Scripts, both as in it is the actual option, or just works the same but doesn't affect the option; or does it only means step through this script (i.e. not others from sub/load) ?
Proud XYplorer Fanatic

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: scripting try

Post by TheQwerty »

I can understand Don's hesitation, it means customizing this dialog instead of using the generic multi-line input. Maybe the OK button could have a right click menu, and add the keyboard shortcuts Shift+Enter/Shift+Ctrl+Enter to do Run with Stepping.

This should keep the dialog from really needing to be customized into its own.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: scripting try

Post by admin »

TheQwerty wrote:I can understand Don's hesitation, it means customizing this dialog instead of using the generic multi-line input. Maybe the OK button could have a right click menu, and add the keyboard shortcuts Shift+Enter/Shift+Ctrl+Enter to do Run with Stepping.

This should keep the dialog from really needing to be customized into its own.
After a weekend's meditation ( :wink: ) I think the best way is to always auto-enable step mode (if not enabled anyway) when running scripts from try window (and restore previous state when done). If you don't like stepping simply press Ctrl+Enter in the first step dialog and no more stepping.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: scripting try

Post by serendipity »

admin wrote:
TheQwerty wrote:I can understand Don's hesitation, it means customizing this dialog instead of using the generic multi-line input. Maybe the OK button could have a right click menu, and add the keyboard shortcuts Shift+Enter/Shift+Ctrl+Enter to do Run with Stepping.

This should keep the dialog from really needing to be customized into its own.
After a weekend's meditation ( :wink: ) I think the best way is to always auto-enable step mode (if not enabled anyway) when running scripts from try window (and restore previous state when done). If you don't like stepping simply press Ctrl+Enter in the first step dialog and no more stepping.
I like that solution. :)

graham
Posts: 457
Joined: 24 Aug 2007 22:08
Location: Isle of Man

Re: scripting try

Post by graham »

Yes, so do I very elegant. Could you also make it so that the toolbar button changes colour as a visual indicator that stepping is on.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: scripting try

Post by admin »

graham wrote:Yes, so do I very elegant. Could you also make it so that the toolbar button changes colour as a visual indicator that stepping is on.
Sure, already done! 8)

Post Reply