Thanks for the reply; I'll have to digest DOSBOX: I've
seen your example before counting down 5,4,3,2,1,0.
z-get brings up the standard Windows file selection dialog,
with a default directory, and you specify file types that will
show. When making a TURNKEY I'm not sure if there is not a
valid HWND and HINST put in the parameter block when not called
from a created parent window .
z-get is at
http://www.forth.com/archive/sftalk/1999/2409.html
Would a DOSBOX help with the printing? As I said before,=20
STARTER gives exactly the action I would like.
The rest of my trial prog follows.
Cheers! Anil
\ ONLY FORTH ALSO DEFINITIONS DECIMAL
variable ty variable qd
: tbl 14 * 19 + dtf + ; ( dtf is dbuffers in z-get )
: .n 10 .r ;
: titl cr 20 spaces ." Listing for "=20
dtf 1+ zcount type
cr 20 spaces=20
dtf c@ dup 73 =3D if ." Shape in inch units " cr then \ "I"
77 =3D if ." Shape in metric units" cr then ; \ "M"
: nos dtf 16 + dup c@
." End Slowdown is " . cr
1+ c@
." Shape has " . ." segments" cr cr=20
." Seg.No. Type Quad Data" cr
;
: segs dtf 17 + w@ 50 min
0 do cr I dup 1+ 6 .r ." . "
tbl dup w@ 1+ dup ty ! .n
2+ dup w@ dup qd ! .n
2+ dup w@ .n
ty @ 6 =3D
qd @ 3 < and
ty @ 4 =3D or
ty @ 6 > or
if 2+ dup w@ .n then
ty @ 6 > if 6 + w@ .n else drop then cr
loop ;=20
: shpr z-get
titl
nos
segs
;
PRINTING +ORDER
: Try ( -- )
WINPRINT OPEN-PERSONALITY
['] shpr CATCH ( *) \ Catch the app in case of error
CLOSE-PERSONALITY
IF ." error running application" THEN
bye ;
PRINTING -ORDER
---------------------------------------------------------------------
-----Original Message-----
From: Mike Ghan [mailto:MikeGhan_at_logix-controls.com]
Sent: Wednesday, March 16, 2005 10:20 AM
To: sftalk_at_forth.com
Subject: [sftalk] Re: turnkey w/ no window
I'm not familiar with z-get, but if a filename is interactively
retrieved from user input, you'll need some sort of console or window.
Here is an example console (aka DOS box):
REQUIRES DOSBOX
: ALL-DONE ( -- ) \ Proper cleanup
'ONSYSEXIT CALLS \ Execute System Exit Chain
0 ExitProcess ;
: GO ( -- )
DOS-CONSOLE OPEN-PERSONALITY
." The command line contains" CR
CMDLINE ARGC 0
?DO CMDLINE I ARGV TYPE CR
LOOP
CR ." Press any key to exit" KEY DROP
ALL-DONE ;
' GO 'MAIN !
-1 THRESHOLD \ No Xref file
PROGRAM CMDLINE
BYE
--------------------------------------
Hope this helps,
Mike
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Fri Mar 18 2005 - 08:23:39 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 08-Feb-2012. Archive updated nightly.