English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   support.Other (http://eab.abime.net/forumdisplay.php?f=74)
-   -   Run NewCli and then commands afterwards (http://eab.abime.net/showthread.php?t=86322)

DamienD 09 March 2017 20:47

Run NewCli and then commands afterwards
 
Heya guys,

I have a script file that is as follows:

Code:

NewCli
Type Readme.txt

The NewCli opens but afterwards the file isn't typed in this :sad

What trick do I need to use so that the script continues after NewCli has been launched?

Akira 09 March 2017 20:48

Let's start from the basics: why do you need to open a new CLI to show a text file? Is it because you want it in a new window that you do "newcli" first?


If you do "run type readme.txt" that in itself will open a new CLI process, but on the same window.

[edit]
I just remembered newcli has a FROM parameter, so you can open a window from a script.

This is what I would do:
Get http://aminet.net/package/util/cli/mousewait

Then make a second script like this with the stuff you want to pop up in a new window:
Code:

type Readme.txt
mousewait
endcli

Then in your original script/sequence you do
Code:

newcli from script
Replace "script" with whatever name you used to save the script.

Keep in mind while this new CLI is open, whatever you have in the original script will keep running. So maybe this isn't exactly what you need (hard to tell without knowing what you want to do)

DamienD 09 March 2017 21:33

...would take me ages to try and explain the reasons.

Anyway, "newcli from script" was exactly what I needed and works great :bowdown

Now the next question, is there a way to make this newcli take up the full screen automatically?

On floppy disks in the startup-sequence I used a tool called "BigCLI" but it doesn't seem to work here...

DamienD 09 March 2017 21:45

Don't worry worked out how to have a nice full-screen CLI ;)

Had to use:

Code:

NEWCLI "CON://640/256" FROM SCRIPT
Final thing I think, is there a way to hide the text "New shell process 1" that first appears when the window opens?

Akira 09 March 2017 23:00

Yes, you can specify a window size, and title too if you want!

To hide that, maybe try adding a QUIET afterwards? I don't know if there is a chance to do that. It might also show "[CLI 2]" either way. Maybe another command is needed. Sorry, this is all I remember off the top of my head.

rare_j 09 March 2017 23:04

Quote:

Originally Posted by DamienD (Post 1145819)
Final thing I think, is there a way to hide the text "New shell process 1" that first appears when the window opens?

I dont know how you start with a blank screen, but you can try clearing the screen with ECHO "*ec" NOLINE as the first command.

DamienD 09 March 2017 23:41

Interesting, cheers guys :great

...will try your suggestions, muchos appreciated ; )

DamienD 10 March 2017 00:14

Quote:

Originally Posted by rare_j (Post 1145831)
I dont know how you start with a blank screen, but you can try clearing the screen with ECHO "*ec" NOLINE as the first command.

Legend!!! :bowdown :bowdown :bowdown

...this does exactky what I need ;)


All times are GMT +2. The time now is 22:22.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.

Page generated in 0.06558 seconds with 11 queries