Amiga.org
Amiga computer related discussion => General chat about Amiga topics => Topic started by: doctorq on February 11, 2025, 04:50:50 PM
-
I'm making an AmigaGuide format where I need to execute a command with a parameter with a space in it.
In the AmigaGuide 101 found here https://wiki.amigaos.net/wiki/AmigaGuide_101 the example is
@{"Picture of a Workbench Screen" SYSTEM sys:utilities/Display sys:Workbench.pic}
What to do if my filename is This is my workbench.pic?
-
just a informed guess , but put the image filename & path in quotes, like the text description with spaces at the beginning.
-
Thanks for the suggestion, but unfortunately no dice :(
-
For those interested, I seem to have found the solution myself...
@{"Picture of a Workbench Screen" SYSTEM "sys:utilities/Display \"sys:This is my Workbench.pic\""}
seems to do the trick for me.
-
Out of interest, does the former version work? I.e. are the double quotes around the whole argument to SYSTEM only necessary if the pathname given as argument to the displayer has spaces? If so, it smells strangely like a bug. And if not, it smells more like an error in the Wiki.
Either way, I'd like to know.
Best regards,
Niels
-
I will try and test tomorrow, but in my test file I actually set the double quotation marks after SYSTEM right away, so I don't know for sure. I'm guessing an error in the docs though.
-
Yeah, once those outer quotes are set, it makes good sense that quotes inside those have to be escaped.
So I'd also guess that it's a doc error - but look forward to hearing your test result.
(I could theoretically set up a test case myself, but it sounds like you already have a good one ready ;)).
Best regards,
Niels
-
I have tested today, and if you write the line as it is in the docs, it will only launch the Display utility and not parse the image filename to the utility. Putting double quotes around the whole command will execute the command properly, thus parsing the image filename to the utility. When using spaces in the filename, you will have to do as I posted earlier, so
@{"Picture of a Workbench Screen" SYSTEM "sys:utilities/Display \"sys:This is my Workbench.pic\""}
Testing was done on real hardware with OS3.9. Multiview version 45.9 (2002/01/18)
-
I have fixed the example at the wiki; unfortunately there is no way to fix the original Amiga Mail article :-(
-
Thanks, both of you.
Now it makes sense :-).
Best regards,
Niels