News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Add Script IO Window

Started by BlueHazzard, September 25, 2013, 04:47:30 PM

Previous topic - Next topic

BlueHazzard

Hi,
i'm planing to add a IO window for scripting purpose. The layout will be a simple wxTextCtrl, but editable from the squirrel code, so you can delete the content, or print a coloured text. Also i plan to add a Input handling, so you can call in squirrel a function like
iowindow.GetString()
and the window will wait for a user input in the TextCtrl, like the normal cmd... This would allow to make easily interactive scripts with menus etc.

The questions are:
* Is there a interest to add such a feature to c::b?
if yes:
* I think the source of this window should be placed in scripts/binding or?
* Should it be a modal dialogue, or a (what i would prefer) window to dock it somewhere like the script-console?
* Should the script console be modified to satisfy this requirements (but i think the script-console has complete separate tasks)

greetings

oBFusCATed

Have you tried the global function wxGetTextFromUser?
As far as I know it does the same thing.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

LETARTARE

CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

BlueHazzard

Quote from: oBFusCATed on September 25, 2013, 07:18:51 PM
Have you tried the global function wxGetTextFromUser?
As far as I know it does the same thing.
no, it asks the user for a input, with a dialog, but you can't make interactive menus (or at least not as neat as with a cmd window)

a quick and ditry example:

1) Set Frequency
2) Set Fusebit
3) Set Programmer
Enter Menu Number: |

and also progress-bars like in wget etc...
it is a easy and quick way to make scripts more user-friendly and interactive.

greetings

oBFusCATed

Quote from: BlueHazzard on September 25, 2013, 08:44:34 PM
a quick and ditry example:
This would have been a good user interface in a console program, but not in a GUI one.
So, I don't think I like the idea of putting such function in the core...
A better option is to provide a way to make scriptable wx XRC dialogs.
Or start porting some parts of wx to squirrel.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]