Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
89 user(s) are online (78 user(s) are browsing Forums)

Members: 0
Guests: 89

more...

Support us!

Headlines

 
  Register To Post  

Amiga dos script help
Home away from home
Home away from home


See User information
Hello to all amiga dos script experts.

I have a quick question

I run a loop which outputs some stuff, mostly the same except the file it is working on

So, e.g.
Working on something.txt
Working on something
-else.txt
etc
.


How could I change the output to NOT print everything to a new line?
Instead I'd like the "Working on" part to stay and only the file part to change?

I know it's possible, I've seen it in action, but don't know how to achieve it.

I really want to get rid of those mile long logs, when I could have one summary at the end of the script

Thank you very much in advance

Go to top
Re: Amiga dos script help
Not too shy to talk
Not too shy to talk


See User information
@Raziel

What are you using to print your output? If you are using Echo you can use the NOLINE switch.

https://wiki.amigaos.net/wiki/AmigaOS_ ... OS_Command_Reference#ECHO

Go to top
Re: Amiga dos script help
Home away from home
Home away from home


See User information
@Hypex

Right now SAY from Arexx.

But I can switch to whatever is needed.

Thank you for the hint

Go to top
Re: Amiga dos script help
Quite a regular
Quite a regular


See User information
@Raziel
Quote:
How could I change the output to NOT print everything to a new line?
Instead I'd like the "Working on" part to stay and only the file part to change?

Quote:
Right now SAY from Arexx.

Hmm...in the title you say this is an amigados script but your using SAY from Arexx??

In any case, if your using SAY you should be able to do it this way.

Put your file part in a variable (ie. FilePartVar) which I assume your changing within the loop. Then you can use the say dommand in this say:

SAY "Working on something"FilePartVar".txt"

Basically put quotes around your text you want printed and make sure the Filepart variable is not within the quotes.

AmigaOne X1000, A1222Plus, uA1
Go to top
Re: Amiga dos script help
Not too shy to talk
Not too shy to talk


See User information
@Raziel

If you're using AREXX, maybe write the initial line "Working on", and then append the first iteration. Then close the file. For subsequent iterations, open the file, seek to the 13th character and over-write. May need to pad in case the new data is shorter than the old. Then close the file, and repeat on further iterations.

Not sure I understand what you're doing, but it sounds like string manipulation and inserting rather than appending is your answer.

Go to top
Re: Amiga dos script help
Home away from home
Home away from home


See User information
@daveyw
@ktadd

I want to use the output from an arexx script (correct, string manipulation) in a shell, also correct

AREXX' SAY output is already done via looping and changing the output.

The problem is, that SAY doesn't overwrite output lines, rather it simply adds a new line everything, which cumulates to massive scrolling in the shell, which I want to avoid.

Go to top
Re: Amiga dos script help
Just can't stay away
Just can't stay away


See User information
@Raziel

https://wiki.amigaos.net/wiki/AmigaOS_Manual:_Control_Sequences

See if it helps somehow (Cursor Backward [N] Positions)

Go to top
Re: Amiga dos script help
Home away from home
Home away from home


See User information
@jabirulo

Got it


SAY '0b'x || '9b'x || '4a'x || 'Parsing file...etc



Thanks a lot for the hint


Edited by Raziel on 2022/10/25 12:09:17
Go to top
Re: Amiga dos script help
Not too shy to talk
Not too shy to talk


See User information
@Raziel

I found the answer last night bur forgot to post it. So SAY always adds a newline and cannot be changed. But, this is an old problem and I found the answer. The answer is CHAROUT which will print characters without a newline.

Somewhat quirky as it needs a comma like this:
CHAROUT ,'String"

https://groups.google.com/g/comp.os.os ... rammer.misc/c/U3cSXUFAWE4

Go to top
Re: Amiga dos script help
Home away from home
Home away from home


See User information
@Hypex

Will check that out too, thanks

Go to top
Re: Amiga dos script help
Not too shy to talk
Not too shy to talk


See User information
@Raziel

I may have spoken too soon. Just tested and only get errors. It may not exist in our ARexx so you may need the "lineup kludge" after all.

Go to top
Re: Amiga dos script help
Home away from home
Home away from home


See User information
@Hypex

I haven't had time to check yet, but I was alreafy wondering, since I never read about this command...then again, my arexx book is from '99

Still thank you for caring

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project