Shell script not showing (or do I understand it all wrong?)

Use this forum for all posts and questions about the free QCAD Community Edition version 3

Moderator: andrew

Post Reply
eengebruiker
Newbie Member
Posts: 3
Joined: Sun Nov 23, 2025 6:18 pm

Shell script not showing (or do I understand it all wrong?)

Post by eengebruiker » Sun Nov 23, 2025 6:25 pm

Using Updated Windows 11 with the latest QCAD.

I am new to QCAD. I wanted to explore the script schell (ge) but after using the command the shell does not show. Where can it be? Do I have to install python first?

CVH
Premier Member
Posts: 4990
Joined: Wed Sep 27, 2017 4:17 pm

Re: Shell script not showing (or do I understand it all wrong?)

Post by CVH » Mon Nov 24, 2025 6:48 am

Hi, and welcome to the QCAD forum.

GE should display the ECMAScript Schell widget or warning dialog.
Note 'ECMAScript' in the above ... QCAD does not support scripting in Python. :wink:

The only reason for not displaying I can think of is that it is dragged outside the screen area.
This might be solved by: Resetting the QCAD Configuration
Note that this will remove all customization and reset persistent stored tool options.

Instead of deleting the config file you could rename it for later reference.
Instead of a full hard reset there is also a gentle reset method for only the appearance of the Widgets:
  • Close QCAD, open QCAD.ini/conf with a plain text editor.
    In the config file remove the line DockappWindows under the header [Appearance] completely.
    But don't change anything else :!:
    Save the config file and restart QCAD.
Otherwise it might be a bug in the latest Trial version converted to CE.
It doesn't seems to be deprecated for the latest release ...
I have no CE version of 3.32.4 installed at the moment to verify the behavior.

Perhaps something went wrong with installing or updating.
A last option is to restart from scratch by removing the QCAD installation completely.
This doesn't alter the config file.

Regards,
CVH

eengebruiker
Newbie Member
Posts: 3
Joined: Sun Nov 23, 2025 6:18 pm

Re: Shell script not showing (or do I understand it all wrong?)

Post by eengebruiker » Mon Nov 24, 2025 11:53 am

@CVH. Thanks for the extensive answer. Will come back on this as soon I find the time to try again.

eengebruiker
Newbie Member
Posts: 3
Joined: Sun Nov 23, 2025 6:18 pm

Re: Shell script not showing (or do I understand it all wrong?)

Post by eengebruiker » Mon Nov 24, 2025 8:57 pm

I do now understand that the ECMAscript is part of QCAD that allows me to run javascript.

Found the widget (after ge). I expected that a kind of terminal would be opened.

Also found the script examples in the QCAD directories.

Thanks.

CVH
Premier Member
Posts: 4990
Joined: Wed Sep 27, 2017 4:17 pm

Re: Shell script not showing (or do I understand it all wrong?)

Post by CVH » Tue Nov 25, 2025 5:24 am

Hi,

As said, GE typically opens a warning dialog.
The reason is obvious, read the warning carefully.

The list of dangers arising from incorrect use of the Shell is not exhaustive, it only includes a few examples.
The dialog lets you open the ECMAScript Shell or decline.

You can also opt to not show this warning dialog again.
Then GE would show the ECMAScript Shell widget directly without warning you about the dangers.

It is not really a terminal as you expect it to be.
The top section is a instruction history with replies, the bottom line is for entering instructions.
One can copy/paste several lines of code at once in the bottom line.
These are evaluated line by line, or better: block by block.
It may not act exactly the same as running a script with XC, see related topic 11844.

Scripts are written with a plain text editor, on windows I can advise Notepad++ (language JavaScript).
Saved as plain text with the file extension *.js and executed with XC.

It is also possible to show 'a kind of terminal' for debugging but you can't edit code in that.
Not functional for running code with GE or XC, intended for debugging addon scripts for example.
Include the switch -enable-script-debugger in your QCAD startup target.
In your script include debugger; to halt the execution where you want.

Running QCAD in debug mode might not be a stable environment.
The debugger is said to be deprecated under Qt6 ... In snapshots ...

Apart from the vast list of open source example scripts (QCAD CE) on Github ...
... You might also be interested in the Simple API or the full QCAD API.

Regards,
CVH

Post Reply

Return to “QCAD Community Edition”