![]() |
![]() |
#1 |
Registered User
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 298
|
IconX, Ask and Workbench 1.3
Got this little script shell named test
echo "Hello world" ask "continue ?" if WARN echo "you are OK to continue" else echo "All right, I do nothing" endif echo "Have an nice day" wait 10 I set protect test +s On a CLI, no problem, correct execution in 1.3 or 3.1 and upper. I add a project icon, set C:IconX as default tool With 3.1 and upper, no problem, the script acts like a charm as under CLI but with 1.3, the script ends on the ask line... Is a there a way to workaround this ![]() Thanks in advance. |
![]() |
![]() |
#2 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,145
|
I think you will benefit from the adding of a line in your script, like this :
Code:
.key dummy/k echo "Hello world" ask "continue ?" if WARN echo "you are OK to continue" else echo "All right, I do nothing" endif echo "Have an nice day" wait 10 ![]() |
![]() |
![]() |
#3 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,490
|
Yes. Use kickstart 2.0 or better. This cannot possibly work under 1.3. The problem is due to a design issue of the BCPL shell and the dos Execute() function.
Problem is that for ask to work, it needs an input stream to read data from. Problem is that the only way how to start a shell (and that is the method IconX uses) is the Execute() function call. You can surely provide an input stream to Execute. However, if you do, the shell started by Execute() will continue reading from this input stream as soon as the command string has been operated on. Simply put, if IconX would provide an input stream, it would start a new shell and would continue waiting for command input after the script has been worked through. Under 2.0, the shell, shell startup and dos.library were completey reworked, and the System() function call allows running a shell that returns if the command stream is exhausted, even if an input stream is present. PS: Note that dos/Execute() has (almost nothing) to do with the Execute command. The latter does something very different (and, in particular, does not start a shell, just redirects its input). |
![]() |
![]() |
#4 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,270
|
Hi Thomas Richter, for OS 1.3 is there also Xicon, start the Shell but seems not to work with that script ?
http://aminet.net/package/util/batch/Xicon |
![]() |
![]() |
#5 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,490
|
...and there is CLICon, which offers even more options, but again, see above. The trouble is not "how you do it". It is really a limitation of a shell. As soon as the 1.3 shell receives a standard input, and its command stream runs dry, it will continue pulling commands from CIS and hence will turn into an interactive shell. Actually, the "only" thing endcli does is to remove this standard input, and thus terminate the shell.
|
![]() |
![]() |
#6 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,145
|
And there is also just plain 1.3.3 Workbench (fresh install, air, sun - no OGM, no add-ons
![]() ![]() ![]() |
![]() |
![]() |
#7 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,270
|
I had suspected that there was a missing option in Tooltypes.
|
![]() |
![]() |
#8 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,145
|
^ why do you think there was a missing option in ToolType ?
Because I used the same icon (thus ToolTypes) for the original and the modified version. Only the position of the windows is different. |
![]() |
![]() |
#9 | |
Global Moderator
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,524
|
Quote:
![]() |
|
![]() |
![]() |
#10 | ||
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,145
|
Quote:
![]() Quote:
In the big lines I understood that it was "simply" the 1.3 NEWCON: that was integrated in the usual CON: (not to have like as with 1.3 CON: & NEWCON: ). |
||
![]() |
![]() |
#11 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,270
|
|
![]() |
![]() |
#12 |
Global Moderator
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,524
|
|
![]() |
![]() |
#13 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,047
|
Quote:
It's rather l:shell-seg which was reworked/integrated into Kickstart. |
|
![]() |
![]() |
#14 | |
Registered User
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 298
|
Quote:
with 34.20 the .key seems to be mandatory to make the script work correctly with IconX Many thanks for your help. |
|
![]() |
![]() |
#15 | |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,145
|
Quote:
You are welcome. |
|
![]() |
![]() |
#16 |
Registered User
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 298
|
@malko
A small question that has nothing to do with the subject "IconX, Ask and WB1.3" How you have captured the WinUAE output and transform it in a simple .gif ? I thought we could only release it in .avi |
![]() |
![]() |
#17 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,145
|
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
IconX - read tool types from script? | Sim085 | support.Apps | 15 | 26 August 2020 10:37 |
IconSet (IconX?) how to add new icon sets? | Sim085 | support.Other | 3 | 06 March 2015 13:37 |
IconX Error on Startup | kratam | support.Apps | 1 | 11 August 2012 02:02 |
How to redirect the output of IconX to a file | tygre | support.Apps | 8 | 10 July 2011 05:29 |
Execute script works but not after adding an icon with IconX as Default Tool. | e5frog | support.Other | 19 | 27 July 2010 10:23 |
|
|