#23706 - 2002-06-23 03:29 AM
DOS Menu
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
I'm working on a DOS-based application and I came a cross the PopupMenu function. Anyway, this one was almost exactly what I was looking for but I wanted something more.
Let's say you got 10 items in this menu, the first 5 items shows on the left, the next 5 on the side. And for selecting the items you use the arrows, just like in the function I mentioned above.
Does anyone know if this is possible at all, and if there's a function somewhere for this already?
//punkie
|
Top
|
|
|
|
#23707 - 2002-06-23 06:13 AM
Re: DOS Menu
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11625
Loc: CA
|
Hello Punkie and welcome to the board.
In order to assist others better (so that they may assist you better) Please try to provide a little more information in your posts.
Please include the link to what script you're talking about so others don't have to search for it. UDF: PopupMenu() - Windows-like popup menu for DOS console
and
PopupMenu() - Windows-like PopUp Menu for DOS Console
Also please let others know the following.
1. What version of KiXtart you're using. 2. What version of Windows for Server and Client 3. What DOS application you're using (in case some else uses it and knows more what you're talking about.)
I have not used this script before so I can not help you with it at this time (unless I write and test the code myself). Shawn (the author of the code) does visit the board daily and I'm sure he will soon see and respond to your post. If not perhaps someone else has used it and can help you further.
Thanks again for visiting the board...
|
Top
|
|
|
|
#23708 - 2002-06-23 06:48 AM
Re: DOS Menu
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
Oh thanks for clearing that up, I wasn't thinking.
The application I was talking about is designed for handling system and networks on the local computer, and I have hard to believe anyone has heard of it because it's for private use.
The whole thing is running through a batch file and that's when Kixtart comes in which has some really nice scripting features.
I don't remember what DOS version it is, but it's under Win2000 Pro and I guess that's v7 or v8 of DOS. And the latest version of kix (4.10).
And I have to say this is a really nice board
|
Top
|
|
|
|
#23710 - 2002-06-23 08:27 AM
Re: DOS Menu
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
I remember way back when.. I used to use a graphical menuing system from Neosoft called Quikmenu..
Shareware: $35
QuikMenu III for DOS Price: Full version: $35* Upgrade from previous DOS versions: $20* Site and Network licenses are also available. We also offer discounts for qualified educational institutions.
* Price does not include shipping and handling.
Summary: QuikMenu III provides an attractive and easy to use graphical desktop environment for DOS-based systems. The icon and button interface allows for quick and intuitive interaction with everyday computer tasks. A full set of desktop utilities are provided. Management and network compatible features are included for business and other multiple system installations. QuikMenu III is not a memory resident TSR.
Features: PROGRAM HANDLING: QuikMenu III can launch any DOS-based program with a single mouse click or keystroke. QuikMenu can automatically recognize and configure menus for many major software applications. Icons and buttons may also be configured to ask for a filename to load with the program being launched. And additional keystrokes may be stuffed into the keyboard, to be executed after the command is launched.
FILE MANAGEMENT: Files may be copied, moved, renamed, deleted, viewed, or have attributes displayed. DOS subdirectories may be created, renamed, deleted, copied or moved. Actions may be executed on single files/directories, or groups. Search for particular files or a group of files in a specific directory or across the entire disk. ASCII text files may be created, viewed and edited—handy to create or modify batch and other files.
CUSTOMIZATION: Elements placed on the desktop by the user may be arranged freeform. Icons may be selected from among 100 which are included. An integrated icon editor allows creation of custom icons, as well as import/export of Windows™ ICO format icons and PCX images. Buttons may be selected from a wide selection of 2 and 3-D styles. A variety of included screen fonts, styles and sizes may be used. Select and modify colors for any desktop element. PCX format graphic images or logos can be placed as background wallpaper. Users may define up to 68 buttons for each screen, with up to 50 menu screens available. Buttons may even be hidden for greater security. Icons or buttons may be included to jump to related menus.
UTILITIES: Calculator with paper tape; Multiple, colorful menu Screen Savers; Date/time display Appointment calendar with notepad; Phone/address book database; Telephone dialer (requires modem); Macro recorder (QuikMenu actions)
COMPUTER USAGE TRACKING: QuikMenu can track which programs are being used on the computer. This is useful for verifying business use for tax purposes, for billing clients, management oversight, etc. Summary and detail reports may be generated. These may be sorted by date, program or user and searches for usage of specific programs may be conducted.
PASSWORD PROTECTION: Passwords may be applied to program launching buttons/icons, menu modification, QuikMenu command buttons, and access to other menu screens.
NETWORKS: Multi-user. Runs on all DOS-based networks, including Novell® and LANtastic™. An E-Mail utility allows users to send and receive mail from other QuikMenu III users on the network. Master Password override allows administrators to access to all systems. Computer usage tracking by user is also supported. Administrators can password lock access to DOS or other features. Affordable Site License pricing is offered for installations of 5 or more users.
OTHER FEATURES: Works with or without a mouse; Automatic installation; On-line, context sensitive Help; Shell to DOS; Optional hidden command buttons; Dialing icons and buttons; Sound effects (on/off) Speed keys (on/off); Use icons, buttons or icons on buttons; Hypertext style page links; Calendar templates; User defined page titles Export Phonebook database and Time log data to ASCII format.
System Requirements:
- IBM PC, XT, AT, PS/1, PS/2, 286, 386, 486, Pentium™-based, or 100% compatible computer.
- CGA, EGA, VGA, Hercules monochrome, or compatible graphics card and monitor. (See “Supported Video Cards” below.)
- 512K minimum system RAM. EMS, XMS and virtual Disk memory are also supported.
A hard disk. - MS DOS versions 3.1 (or higher).
- Options: Microsoft, Logitech, or compatible mouse/pointing device; Hayes compatible modem; any DOS-based network.
Supported Video Cards:QuikMenu III will run on computer systems equipped with a Hercules monochrome, CGA, EGA, VGA or 100% compatible graphics card and monitor. Note: In 16 color mode, CGA video cards display at 320x200. This mode has too few pixels to build a useful menu screen, or to display utilities. Therefore, QuikMenu must be run on CGA in high resolution, 640x200, 2 color mode.
HTH,
Kent
|
Top
|
|
|
|
#23711 - 2002-06-23 09:30 AM
Re: DOS Menu
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
Shawn, I'm not sure how to really explain it, I can't think of any program that has this except windows explorer where you have bunch of files and folders.
When you scroll down to end of the screen, it goes up scrolling to the next colum. I'm going to try to draw something here... lol
code:
+----------------------+ col1 col2 +----------------------+ item1 item6 item2 item7 ... ... item5 item10 +----------------------+
Now when you scroll down you get first to the bottom on colum 1 (item5), if you continue to scroll it starts on item6 to item10.
I hope this make some sense, but what I would like if it works is to be able to set a limit number for each colum, like in this case 5 items per colum.
Another idea I had was that you could scroll to the side on the PopupMenu function, but that isn't so important for me at the moment. Just a suggestion in case you decide to work on it.
Kent, I have looked at different menu systems for DOS but all I could find was boot menus and similar, that mostly just worked in full screen. But when I saw what Shawn had made then I started looking for more but couldn't find anything, I didn't think it was even possible to do that just with a scripting system as Kix.
Thanks for all comments, I appreciate it
|
Top
|
|
|
|
#23713 - 2002-06-24 11:19 AM
Re: DOS Menu
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
JackLothian, I've looked around at different DOS sites, including some forums without any luck. And Kix has been the best scripting system for what i'm trying to do, the problem is i'm still a bit new at it.
What I meant about the PopupMenu, is the function Shawn wrote. Located here. I know DOS don't support real "popups" but if you look at Shawn's function, it does give you a nice menu-like interface. And that's exactly what I wanted with some modifications.
The reason I don't like the current DOS menus, is because they only work in full screen, usually is slow and takes space compare to a Kix script. This is going to operate in the Command-prompt window.
Does any know any other scripting system that maybe could do this kind of things?
|
Top
|
|
|
|
#23715 - 2002-06-24 09:10 PM
Re: DOS Menu
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Agreed, definitely possible, but straight-forward - hmmmm. I think I know what punkie is after here. If PopupMenu is described as a single-column listbox, then what punkie is after is a multi-column listbox. Think he drew a pretty good picture of what is required, up above.
But, modifying PopupMenu to support n number of columns, plus all the things that go along with that (tabbing from bottom of column one to top of column two, support for tabbing across columns, layout calculations and maybe having to deal with truncated columns) ... figured that would be a little tricky. Unless one created a highly specialized version of the UDF, one that was more specialized for multi-column support - maybe one that provided limited layout options ( to ease development) ?
If this sounds like an open-ended challenge for the other members of this board, consider it as such. I would be the first to offer congrats to anyone that successfully got this going !
-Shawn
|
Top
|
|
|
|
#23716 - 2002-06-24 10:57 PM
Re: DOS Menu
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
It makes me really happy to hear it's possible Then I know i'm at least on right track here, and yes I'm going to run some utilities from the command-line and using a menu like this would make it alot easier.
I think you understood exactly what I meant Shawn, but are there anyone willing to try to write this code? Is it anything I can do to help? I'm guessing it's easier for you that are more familiar with the Kix scripting than me even though it sounds a little complicated.
Thanks in advance for any help you can give me I'm actually surprised no one has asked for this before.
|
Top
|
|
|
|
#23719 - 2002-06-26 07:00 PM
Re: DOS Menu
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
Wow that's amazing! You're fast I really appreciate all this, just wish I knew more about Kix scripting but I will with time.
Thanks Dean.
|
Top
|
|
|
|
#23721 - 2002-06-27 10:03 AM
Re: DOS Menu
|
punkie
Getting the hang of it
Registered: 2002-06-23
Posts: 67
|
It sounds pretty good, but i'm not sure what you mean with cursor. I didn't think it was possible for mouse support just with a kix script. As long as you can scroll with the key arrows then i'm happy
I was thinking of having keyword support too, like using F1-F12 for the items but I probably could add that myself sometime later.
|
Top
|
|
|
|
#23723 - 2002-06-28 04:30 AM
Re: DOS Menu
|
Dean B.
Fresh Scripter
Registered: 2002-02-04
Posts: 46
Loc: Allegan, MI USA
|
punkie -
Okay, here is my first attempt. Hopefully I have eradicated all the bugs. I have included a sample of how you would use the function. Have fun!
Shawn (or anyone else), I would appreciate any helpful suggestions you would have for improving this function.
code:
$menu = "Dir %systemdrive%", "Dir %windir%", "Type c:\autoexec.bat", "Type c:\config.sys", "Dir %userprofile%", "Dir %Temp%" $pick = kixmenu ($menu,5,"Menu")
select case $pick = 0 shell "%comspec% /c dir %systemdrive%" case $pick = 1 shell "%comspec% /c dir %windir%" case $pick = 2 shell "%comspec% /c type c:\autoexec.bat" case $pick = 3 shell "%comspec% /c type c:\config.sys" case $pick = 4 shell '%comspec% /c dir "%userprofile%"' case $pick = 5 shell '%comspec% /c dir "%temp%"' endselect
; KixMenu.kix ; version 1.0 for Kix2001 ; written by Dean E. Behrman ; created 06.25.2002
function kixmenu ($_array,$_maxrows,optional $_title) ;$_array: Items to display in tabular format ;$_maxrows: Specify the maximum number of rows in the table ;$_title: Optional title for the window
cls if val(@kix) <> 4 ? "Requires Kixtart 2001" $kixmenu = -1 exit 1 endif
dim $_width,$_acount,$_cols,$_rows,$_currow,$_curcol,$_curitem,$_colitems[1],$_rowitems[1],$_x,$_key $_rc = setoption("HideCursor","ON") $_width = 0 $_currow = 0 $_curcol = 0 $_curitem = 0 if $_maxrows <= 0 $_maxrows = 24 endif
$_acount = ubound($_array) for $_x = 0 to $_acount $_item = $_array[$_x] if len($_item) > $_width $_width = len($_item) endif next
$_maxcols = 78 / ($_width + 1) if $_maxcols < 1 or $_acount > ($_maxcols * $_maxrows) $kixmenu = -1 goto end endif if $_acount / $_cols > $_maxrows $kixmenu = -1 goto end endif $_cols = ($_acount / $_maxrows) + 1 $_rows = ($_acount + 1) / $_cols gosub drawscreen gosub buildmenu gosub pickitem :end $rc = setoption("HideCursor","OFF") cls return
:drawscreen Color w+/b Box (0,0,$_maxrows+1,79,"SINGLE") if $_title <> "" and $_title <> 0 at (0,1) $_title endif return
:buildmenu $_curitem = 0 redim $_colitems[$_cols], $_rowitems[$_rows] for $_curcol = 0 to $_cols for $_currow = 0 to $_rows - 1 if $_curitem <= $_acount at ($_currow + 1,$_curcol * ($_width + 1) + 1) $_array[$_curitem] $_colitems[$_curcol] = $_currow $_rowitems[$_currow] = $_curcol endif $_curitem = $_curitem + 1
next next return
:pickitem $_currow = 0 $_curcol = 0 $_curitem = 0 gosub showcursor at (0,0) do get $_key if asc($_key) = 224 ; Extended Key get $_key if asc($_key) = 80 ; Down Arrow gosub hidecursor $_currow = $_currow + 1 $_curitem = $_curitem + 1 if $_currow > $_colitems[$_curcol] $_currow = 0 $_curitem = $_curitem - $_colitems[$_curcol] - 1 endif gosub showcursor endif if asc($_key) = 72 ; Up Arrow gosub hidecursor $_currow = $_currow - 1 $_curitem = $_curitem - 1 if $_currow < 0 $_currow = $_colitems[$_curcol] $_curitem = $_curitem + $_colitems[$_curcol] + 1 endif gosub showcursor endif if asc($_key) = 75 ; Left Arrow gosub hidecursor $_curcol = $_curcol - 1 if $_curcol < 0 $_curcol = $_rowitems[$_currow] $_curitem = $_curitem + $_rowitems[$_currow] * $_rows else $_curitem = $_curitem - $_colitems[$_curcol] - 1 endif gosub showcursor endif if asc($_key) = 77 ; Right Arrow gosub hidecursor $_prev = $_curcol $_curcol = $_curcol + 1 if $_curcol > $_rowitems[$_currow] $_curcol = 0 $_curitem = $_curitem - $_rowitems[$_currow] * $_rows else $_curitem = $_curitem + $_colitems[$_prev] + 1 endif gosub showcursor endif endif until asc($_key) = 13 or asc($_key) = 27 ; ENTER or ESC
if asc($_key) = 13 $kixmenu = $_curitem else $kixmenu = -2 endif return
:showcursor color b/w+ at ($_currow + 1,$_curcol * ($_width + 1) + 1) $_array[$_curitem] color w/n at (0,0) return
:hidecursor color w+/b at ($_currow + 1,$_curcol * ($_width + 1) + 1) $_array[$_curitem] color w/n at (0,0) return
endfunction
Estimated scripting time: 2 hours
_________________________
Dean
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 710 anonymous users online.
|
|
|