Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
0 crawler(s) on-line.
 88 guest(s) on-line.
 1 member(s) on-line.


 Hypex

You are an anonymous user.
Register Now!
 Hypex:  3 secs ago
 retrofaza:  8 mins ago
 redfox:  14 mins ago
 matthey:  22 mins ago
 Kronos:  26 mins ago
 AMIGASYSTEM:  42 mins ago
 geit:  53 mins ago
 DC_Edge:  1 hr 6 mins ago
 pixie:  1 hr 40 mins ago
 pavlor:  1 hr 57 mins ago

/  Forum Index
   /  Amiga OS4.x \ Workbench 4.x
      /  Using new CON window specifications
Register To Post

Goto page ( Previous Page 1 | 2 )
PosterThread
broadblues 
Re: Using new CON window specifications
Posted on 21-Jul-2009 15:54:08
#21 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4446
From: Portsmouth England

@thinkchip

The con: uses the system fixed point font as standard I think. Not sure if you can set the font independantly of that.

_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
AmigaPhil 
Re: Using new CON window specifications
Posted on 21-Jul-2009 18:57:15
#22 ]
Cult Member
Joined: 21-Jan-2005
Posts: 563
From: Earth (Belgium)

@Hypex

Quote:
Quote:
Not sure if this will work in your case, but... newshell "con:x/y/width/height/windows title/auto/close" "MyProg.launch"

I tried this, but it didn't work. And in actual fact I can run the program and redirect the output in the usual manner.

The sole purpose of the "MyProg.launch" script was to add a "wait" delay.
(What didn't work ? No output shown ??)

Quote:
Quote:
So you don't even need to redirect the output to a temp. file; the above example "launch" script should work for you.

Yes, it does. I just need to run the program in an external script if I want it to wait.

Indeed.

Quote:
I need the output of of necessit, not because I want it myself. I usually run my scripts "hidden" that only communicate with system and file requesters. I'd really prefer a neater solution to a simple CON window but AFAIK there is no new command that can be piped into, say the output of a comnmand, and display it's progress neatly in a window with a bar and cancel button.

So, how about this "YourProg.launch" script:


cd "Path/To/Your/Program"
YourProgram >T:YourProg.tmp
echo "*Ec" ; clear
type T:YourProg.tmp
wait 10
delete >NIL: T:YourProg.tmp
endshell

and execute it with (for example):
newshell "con:10/10///window title/auto/close/rows=20/columns=100" "YourProg.launch"


If you need the output for something else, you can redirect the tmp file before deleting it, like:
YourOtherProgram <T:YourProg.tmp


There is no progress bar tool for DOS supplied with the OS, there is at least requestchoice, as suggested. I don't know if requestchoice in OS4 allows to import a text file as body, it's not the case in OS3.5, and even if the file (prog output) has a single text line without any double-quote, it would still be tricky to format a proper requestchoice statement.
Again, ARexx and something like RxMui are more appropriate for what you wish to do.

 Status: Offline
Profile     Report this post  
AmigaPhil 
Re: Using new CON window specifications
Posted on 21-Jul-2009 19:14:30
#23 ]
Cult Member
Joined: 21-Jan-2005
Posts: 563
From: Earth (Belgium)

@thinkchip
Quote:
Just wondering if proportional fonts are allowed in console windows. That could have a big affect on the size of the windows.


@broadblues
Quote:
The con: uses the system fixed point font as standard I think. Not sure if you can set the font independantly of that.


Yes, you can change the font for the current shell with the setfont command.
If you try to use proportional font, be prepare for some visual mess where layout is important, when resizing window, when editing, ... etc
Even the AmigaDOS manual warn that the use of proportional font is not recommended.

 Status: Offline
Profile     Report this post  
Hypex 
Re: Using new CON window specifications
Posted on 22-Jul-2009 6:41:43
#24 ]
Elite Member
Joined: 6-May-2007
Posts: 11240
From: Greensborough, Australia

@broadblues

Quote:
No it does say that, it doesn't mention slashes at all in that context, it mentions whitespace.


Whoops I placed my own interpretation on it.

Quote:
Slashes sepaerate options, whitespace (and now an = sign) seperate options from their parameter. the section immediatly before that which you quoted starting "prior to version 51" gives the clue about that.


Yes, I see that.

Now, the clue is here:
Quote:
Use slashes to separate the parameters and options.


I note that although options come before a parameter, here it mentions parameters before options. So does that mean that it is only talking about how to seperate the parameter of an option with the option following it? That is the only sense I can make in this matter.

Quote:
The bit about x & y is definetely wrong though, you are right about that.


Thanks. Another thing is that when reading through the options is doesn't always specify what can seperate the options with their parameters. For the ones I am interested in, not a mention. I did another test and I can bunch the ROWS and COLUMNS together with their parameter, without any spaces, and that also works.

I worry about options like WINDOW. SCREEN was clean with specifying a name, but WINDOW taking a Window address just seems unclean and a bit too dangerous as well as inappropriate for what a con window specification should do.

 Status: Online!
Profile     Report this post  
Hypex 
Re: Using new CON window specifications
Posted on 22-Jul-2009 7:02:50
#25 ]
Elite Member
Joined: 6-May-2007
Posts: 11240
From: Greensborough, Australia

@AmigaPhil

Quote:
The sole purpose of the "MyProg.launch" script was to add a "wait" delay.


Yes, I understood that. Which I usually would do with a Execute.

Quote:
(What didn't work ? No output shown ??)


Sorry, I tested again, and this time it worked. The first time I think I just got a new shell window. Must have missed something. But the NewShell command gives no clue it can execute programs. FROM? That's a program?

Quote:
So, how about this "YourProg.launch" script:


That probaably would have worked nicely except the output of the command is more than a single line, it's ab unch if lines. And not easy to cache, as the program would be finished before the user saw any progress.

Quote:
There is no progress bar tool for DOS supplied with the OS, there is at least requestchoice, as suggested. I don't know if requestchoice in OS4 allows to import a text file as body, it's not the case in OS3.5, and even if the file (prog output) has a single text line without any double-quote, it would still be tricky to format a proper requestchoice statement.


Yes I use RequestChoice. And yes you can import a text file as a body! I just checked, and I send the output to ENV amd create an enviroment variable. I then use this and give it to RequestChoice!.

Quote:
Again, ARexx and something like RxMui are more appropriate for what you wish to do.


They probably are. At this stage a progress bar should be integrated into the program. Or at least the output formatted so a program could be used to pipe in the lines and work out a progress and update the screen with information form the lines.

 Status: Online!
Profile     Report this post  
Hypex 
Re: Using new CON window specifications
Posted on 22-Jul-2009 7:08:55
#26 ]
Elite Member
Joined: 6-May-2007
Posts: 11240
From: Greensborough, Australia

@AmigaPhil

Quote:
If you try to use proportional font, be prepare for some visual mess where layout is important, when resizing window, when editing, ... etcEven the AmigaDOS manual warn that the use of proportional font is not recommended.


According to SetFont it won't allow proportional font unless you give the PROP switch. Though I thought it would have opened them as fixed, since IIRC a font also has a fixed width for it's characters to allow for both.

 Status: Online!
Profile     Report this post  
tonyw 
Re: Using new CON window specifications
Posted on 22-Jul-2009 7:37:18
#27 ]
Elite Member
Joined: 8-Mar-2003
Posts: 3240
From: Sydney (of course)

@Hypex

I'll fix the docs to use the words "WIDTH" instead of "x" and "HEIGHT" instead of "y". It looks as though the "x" and "y" are left over from some earlier version.

In the current console (V53.1) you can choose a proportional font but it doesn't work well, the code is designed around mono-spaced characters. Don't hold your breath waiting for proportional font support.

_________________
cheers
tony

Hyperion Support Forum: http://forum.hyperion-entertainment.biz/index.php

 Status: Offline
Profile     Report this post  
abalaban 
Re: Using new CON window specifications
Posted on 22-Jul-2009 14:21:32
#28 ]
Super Member
Joined: 1-Oct-2004
Posts: 1114
From: France

@tonyw

If I would have to choose I'll prefer hold my breath to have tabbed support (i.e. ability to have multiple shell (or even any CON window) in one window with tabs), then to have completion from the PATH (i.e. not just the current directory or the manually entered path, but the full PATH currently set in the system : C:, SYS:Prefs, SYS:Utilities, etc. ) and last scroll support.

I wrote this "suggestions" just in case you would not be too much busy already and had some spare time without knowing what to do with

_________________
AOS 4.1 : I dream it, Hyperion did it !
Now dreaming AOS 4.2...
Thank you to all devs involved for this great job !

 Status: Offline
Profile     Report this post  
Hypex 
Re: Using new CON window specifications
Posted on 22-Jul-2009 15:27:45
#29 ]
Elite Member
Joined: 6-May-2007
Posts: 11240
From: Greensborough, Australia

@tonyw

Thanks. Also mentioning where it needs an "=" sign would help also.

Last edited by Hypex on 22-Jul-2009 at 03:28 PM.

 Status: Online!
Profile     Report this post  
AmigaPhil 
Re: Using new CON window specifications
Posted on 22-Jul-2009 20:18:56
#30 ]
Cult Member
Joined: 21-Jan-2005
Posts: 563
From: Earth (Belgium)

@Hypex

Quote:
But the NewShell command gives no clue it can execute programs. FROM? That's a program?


When started, NewShell looks for a "configuration" file to use. By default, it's S:Shell-Startup, but you can override that file with another one using the FROM parameter (the FROM keyword can be omitted).
Because the "configuration" file is in fact an AmigaDOS script that is executed, you can do things like customising the prompt or run some more complex tasks.

 Status: Offline
Profile     Report this post  
broadblues 
Re: Using new CON window specifications
Posted on 22-Jul-2009 22:08:50
#31 ]
Amiga Developer Team
Joined: 20-Jul-2004
Posts: 4446
From: Portsmouth England

@Hypex
Quote:

Also mentioning where it needs an "=" sign would help also


It is never "needed" the docs says and in your above comments you have verified:

Quote:

Starting with V51, any number of blank
spaces and exactly one '=' character can be used to separate
options and their parameters.



So if an option has a parameter you may use 0 or more blank spaces and and 0 or 1 "=" signs. The option that don't follow this rule specify the option format eg ALT

WRT to window address, there is no other way to identify a window and also remeber that a CON: maybe opened from a binary program that mat legitimately have opened a suitable window allready, seems like an option to use with extreme care though.



_________________
BroadBlues On Blues BroadBlues On Amiga Walker Broad

 Status: Offline
Profile     Report this post  
tonyw 
Re: Using new CON window specifications
Posted on 23-Jul-2009 0:28:40
#32 ]
Elite Member
Joined: 8-Mar-2003
Posts: 3240
From: Sydney (of course)

@broadblues

Quote:

WRT to window address, there is no other way to identify a window and also remember that a CON: may be opened from a binary program that might legitimately have opened a suitable window already, seems like an option to use with extreme care though.


There are some pretty stringent checks made on that address before it is used

_________________
cheers
tony

Hyperion Support Forum: http://forum.hyperion-entertainment.biz/index.php

 Status: Offline
Profile     Report this post  
Hypex 
Re: Using new CON window specifications
Posted on 23-Jul-2009 6:53:16
#33 ]
Elite Member
Joined: 6-May-2007
Posts: 11240
From: Greensborough, Australia

@AmigaPhil

Quote:
When started, NewShell looks for a "configuration" file to use. By default, it's S:Shell-Startup, but you can override that file with another one using the FROM parameter (the FROM keyword can be omitted).


I see why it works now. I of course knew all that but never thought of executing programs in the shell start script. Nice trick!

 Status: Online!
Profile     Report this post  
Hypex 
Re: Using new CON window specifications
Posted on 23-Jul-2009 7:02:32
#34 ]
Elite Member
Joined: 6-May-2007
Posts: 11240
From: Greensborough, Australia

@broadblues

Quote:
It is never "needed" the docs says and in your above comments you have verified:


Having a template to demonstrate this would help to show that is so.

Quote:
So if an option has a parameter you may use 0 or more blank spaces and and 0 or 1 "=" signs. The option that don't follow this rule specify the option format eg ALT


I think there is too much mention of these options and parameters without being more specific.

Quote:
WRT to window address, there is no other way to identify a window and also remeber that a CON: maybe opened from a binary program that mat legitimately have opened a suitable window allready, seems like an option to use with extreme care though.


AmigaOS has provided ways to attach a console to an intution window since the 1.3 days, perhaps eariler. Maybe it is just easier than using comsole.device or whatever else we can use, but it just seems messy using it from a high level language. And slightly unprofessional IMHO not to use the OS routines dedicated to the job.

 Status: Online!
Profile     Report this post  
Goto page ( Previous Page 1 | 2 )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle