What Commands Can be Pasted into the command line?

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

John Hyslop
Premier Member
Posts: 474
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

What Commands Can be Pasted into the command line?

Post by John Hyslop » Sun Jul 26, 2020 6:10 am

Hi All

I'm working on a little project and need some help...
QCad Version:
3.24.3.0 (3.24.3)
Windows10

Is there any documentation on what can be pasted into the command line in Qcad? Everything below works except for the
CP command "Copy To Clipboard" if I type this manually it works
but it doesn't from pasted text below... any Ideas? I've tried extra carriage returns... Also if I use MV " Move/Copy Command " is there a way to stop the dialog from poping up?

This works except the last part? Copy and paste below text into command line ;-)

QQ
LINE
5,0
95,0
QQ
LINE
100,5
100,95
QQ
LINE
95,100
5,100
QQ
LINE
0,95
0,5
QQ
AR
5,5
5
180
270
95,5
5
270
0
95,95
5
0
90
5,95
5
90
180
QQ
CIRCLE
25,25
10
CIRCLE
50,25
10
CIRCLE
75,25
10
QQ
RECTANGLE
15,50
85,80
QQ
ZA
QQ
SELECTALL
CP



Cheers
John Hyslop
Oops Forgot screenshot...
Attachments
Pasted Result.jpg
Pasted Result.jpg (256.76 KiB) Viewed 11160 times
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

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

Re: What Commands Can be Pasted into the command line?

Post by CVH » Sun Jul 26, 2020 9:30 am

Hi, John,
Nice to hear from you.

It works to some extend.
Here is Andrews reply:
https://qcad.org/rsforum/viewtopic.php? ... 17&p=26924

The way to do this is to drop a script.

Regards,
CVH

John Hyslop
Premier Member
Posts: 474
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

Re: What Commands Can be Pasted into the command line?

Post by John Hyslop » Mon Jul 27, 2020 7:26 am

Thanks CVH

It was a little help but it still would be nice to know what can and
can't be read into the command line.. I purchased the ebook a while
back hoping it would have all this info but it doesn't :-(

Again Thanks for the Help.. hope you're well, take care..

Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

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

Re: What Commands Can be Pasted into the command line?

Post by CVH » Mon Jul 27, 2020 8:20 am

I think that it does fairly everything that we can do with the keyboard.
What we came up with is that it fails for the final commands of a list.
Or doubles them.
The multi-line entry capebility was not ment for the use with marco lists.
There is also a thing with Windows.
In case the list is made in a Win app then we send windows style EOLs.(end off line)
With a round trip passing by Notepad or NPP, converting the EOL, the results may differ.

So, in the end we dropped it.
Simple scripting is the way.

Recording and playing macro's could be a nice feature. 8)

Regards,
CVH
Last edited by CVH on Tue Jul 28, 2020 8:39 am, edited 1 time in total.

riverbuoy
Senior Member
Posts: 121
Joined: Thu Oct 03, 2013 5:37 pm

Re: What Commands Can be Pasted into the command line?

Post by riverbuoy » Mon Jul 27, 2020 12:55 pm

Hi John,

I have learned something new today! Thank you.
John Hyslop wrote:
Sun Jul 26, 2020 6:10 am
Everything below works except for the
CP command "Copy To Clipboard" if I type this manually it works
Intrigued by this, I copied your list of commands into a text file named 'macro.txt'. I then copied everything in the file and pasted it in to the command line of QCAD. Everything worked, including CP. What you need is an 'end of line' character after the CP. So you need a blank line at the end of the text file. When you copy everything be sure to include the last empty line.
This is a manual way of creating macros. If you want to change or test your commands, having them in a simple text file is the best way.
I changed the end of the text file to the following, in order to confirm that it worked

...
CP
QQ
PASTE
210,50

QQ
ZA

...

Note the blank line at the end (after ZA). Also there is a blank line after the PASTE co-ordinate which terminates the paste command. ZA then makes the whole drawing visible. (Ignore the ellipsis (---), they are not added to the text file).

John Hyslop wrote:
Sun Jul 26, 2020 6:10 am
Also if I use MV " Move/Copy Command " is there a way to stop the dialog from poping up?
I don't know of any way to stop the dialogue box from popping up. Any command that pops up a dialogue box is probably not suitable for this method.
(There might be a setting in QCAD to switch off the display of dialogue boxes.)

I hope you find this helpful.

(Note: I tested this in Linux, but it should work the same way under Windows and Mac OS.)


Regards

riverbuoy

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

Re: What Commands Can be Pasted into the command line?

Post by CVH » Mon Jul 27, 2020 1:23 pm

riverbuoy wrote:
Mon Jul 27, 2020 12:55 pm
Everything worked
OS!!? Under Win we exhausted the options.
It just isn't stable on when & why it flaws.
riverbuoy wrote:
Mon Jul 27, 2020 12:55 pm
I don't know of any way to stop the dialogue box from popping up.
Sure one can, but do you really want this?
App.Prefs .. Modify .. Move/Copy .. Use dialog

Regards,
CVH
Last edited by CVH on Tue Jul 28, 2020 8:41 am, edited 1 time in total.

John Hyslop
Premier Member
Posts: 474
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

Re: What Commands Can be Pasted into the command line?

Post by John Hyslop » Tue Jul 28, 2020 4:53 am

Thanks Riverbuoy
I'm glad to hear you learned something new :-)
Thanks for your post.

CVH Thanks for confirming this only works in Linux
Saves me pulling my hair out :-)
Also good to know you can switch the dialogs off...

Scratches head..... I wonder if there is a way of duplicating
the Linux character that's used for a carriage return in windows???
Maybe a hidden character??
Alt + Something Something Something Something...??

Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

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

Re: What Commands Can be Pasted into the command line?

Post by CVH » Tue Jul 28, 2020 8:36 am

John Hyslop wrote:
Tue Jul 28, 2020 4:53 am
I wonder if there is a way of duplicating
the Linux character that's used for a carriage return in windows???
Win uses CR LF as EOL the others use LF as EOL.
You can't fool this without changing OS.
NPP lets you convert this for use in a file but as soon you grab this text in a Win App you end up with Win EOLs.

I don't think there is a solution on the user side.
I addressed this EOL thing in an other topic and Andrew knows about it.

Regards,
CVH

John Hyslop
Premier Member
Posts: 474
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

Re: What Commands Can be Pasted into the command line?

Post by John Hyslop » Tue Jul 28, 2020 10:51 am

Thanks CVH

I found this... not tested yet though...we both have this editor "Notepad++" ... checking it out now.. :-)
I'm probably flogging a dead horse though... lol

https://support.nesi.org.nz/hc/en-gb/ar ... ne-endings

Unless I'm missing something... It didn't work :-(

Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

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

Re: What Commands Can be Pasted into the command line?

Post by CVH » Tue Jul 28, 2020 11:08 am

Indeed NPP = Notepad++
The solution is for file transfer.
Copying a line or lines under Win induces win style EOLs.
They flaw for the last.
CVH

John Hyslop
Premier Member
Posts: 474
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

Re: What Commands Can be Pasted into the command line?

Post by John Hyslop » Tue Jul 28, 2020 11:21 am

I Did it :-)

Try Alt+010 in notepad++

Txt file attached
Attachments
Qcad Run Commands.txt
(274 Bytes) Downloaded 454 times
Done.jpg
Done.jpg (346.76 KiB) Viewed 10716 times
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

John Hyslop
Premier Member
Posts: 474
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

Re: What Commands Can be Pasted into the command line?

Post by John Hyslop » Tue Jul 28, 2020 11:33 am

Now I'm having trouble getting it to work again? :oops:
You can clearly see in screenshot CP did work and paste.. I'm baffled.. :roll:
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

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

Re: What Commands Can be Pasted into the command line?

Post by CVH » Tue Jul 28, 2020 11:38 am

In the topic mentioned above.
Read up on the strange outcomes when repeated.
CVH

John Hyslop
Premier Member
Posts: 474
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

Re: What Commands Can be Pasted into the command line?

Post by John Hyslop » Tue Jul 28, 2020 11:50 am

CVH wrote:
Tue Jul 28, 2020 11:38 am
In the topic mentioned above.
Read up on the strange outcomes when repeated.
CVH
Hi CVH
The one I posted? I can't see any text on strange outcomes?
Or is it in the topic posted on here a while ago?
I thought I'd nailed it when it copied and Pasted :-( ahh well..

Back to the drawing board..

Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

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

Re: What Commands Can be Pasted into the command line?

Post by CVH » Tue Jul 28, 2020 11:55 am

Topic 7017
https://qcad.org/rsforum/viewtopic.php? ... 17&p=26924
It worked because I used the sequence a second time.
It din't on a first run.

I question:
- End with QQ to terminate might do the trick but I think I tried that.
- Could a series of dummies at the end work out.
Thinking out loud: A simple space: = shortcut to command line;
or a move to nowhere ... a rotate zero ...
or any command that won't hurt when not fully interpreted.

Like I said, we/I dropped it as being unreliable.
Regards
CVH

Post Reply

Return to “QCAD 'How Do I' Questions”