Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Hollywood MAL AMIStore App Store A600 Memory

AuthorTopic: Want to make a CLI Menu  (Read 1801 times)

0 Members and 1 Guest are viewing this topic.

Offline tft666

Want to make a CLI Menu
« on: November 02, 2011, 04:35:51 PM »
I'm gonna have a demoshow at kindergarden this weekend.
And I want to come prepaired with a clean boot and all demos ready to run by just entering numbers 1-N.  Also want to make a menu where it says all the demo names

f.i

1. Spaceballs - Hog

2. CNCD - Closer

etc

I used to make tool and intro packs with menus like this  back in the 90ies, but I can't remember a single cli command now :/

Could someone help me out with this?

I want to display the menu, and when I choose a number, the screen blanks out, and only shows the demo name(or whatever text I want it to say on the screen), waits 2 sek, and then starts/loads.

Really appreciate if someone could get me started on this. Im sure I'll remember more as soon as I get started. Remember doing color codes and logos and stuff on thoose menus back in the day.  Fooling around in CED for hours just to get it just right....
A1200TOWER . Apollo1260-66Mhz 32Mb
====================================
www.po-rno.fi -  wcgraff.blogspot.com - blog.darklite.org
 

Offline CSixx

Re: Want to make a CLI Menu
« Reply #1 on: November 02, 2011, 04:50:40 PM »
For something simple, you can simply rename the demos to the numbers they will be in the menu.

So on your floppy you would have the following:

S (directory)
   startup-sequence (inside S)

1 (demo renamed to 1)
2
3

Then edit the startup sequence to something like:

echo " "
echo "           My fantastic startup menu"
echo " "
echo " "
echo " Type the number of your selection:"
echo ""
echo "1 - Spaceballs"
echo "2 - CNCD"
echo "3 - etc."
echo ""

Not fancy tho...
 

Offline Duce

  • Off to greener pastures
  • Hero Member
  • *****
  • Join Date: Jul 2009
  • Posts: 1699
  • Total likes: 0
    • http://amigabbs.blogspot.com/
Re: Want to make a CLI Menu
« Reply #2 on: November 02, 2011, 05:01:45 PM »
Can include ANSI codes to spice it up visually.
 

Offline Brian

Re: Want to make a CLI Menu
« Reply #3 on: November 02, 2011, 06:35:35 PM »
Unless it's for a Kickstart1.3 system use Alias

Alias 1 "c:execute game:folder/script"
Alias 2 "game:folder2/game.exe"

Offline Joloo

Re: Want to make a CLI Menu
« Reply #4 on: November 02, 2011, 07:28:38 PM »
Sounds easy if the "ENV:" directory is available as well as ordinary CLI commands,

Code: [Select]

LAB main

CLEAR

ECHO "Enter a value: " NOLINE
ECHO >NIL: TO ENV:pvalue ?

IF VAL $pvalue EQ 1
 ECHO "Starting program 1"
 WAIT 2 SECS
 SKIP main BACK
ENDIF

IF VAL $pvalue EQ 2
 ECHO "Starting program 2"
 WAIT 2 SECS
 SKIP main BACK
ENDIF

IF VAL $pvalue EQ 999
 ECHO "Quitting"
 SKIP finish
ENDIF

ECHO "Incorrect value, try again."
WAIT 5 SECS
SKIP main BACK

LAB finish


Regards
 

Offline Daedalus

Re: Want to make a CLI Menu
« Reply #5 on: November 02, 2011, 07:37:15 PM »
That looks about right - if ENV: isn't available simply add the following to the top of Joloo's script:

Makedir RAM:ENV
Assign ENV: RAM:ENV
Engineers do it with precision
--
http://www.robthenerd.com
 

Offline tft666

Re: Want to make a CLI Menu
« Reply #6 on: November 03, 2011, 09:13:24 AM »
This ENV thing method seems interesting. I never did that.
But can you explain abit more what to enter in the code below. And more how this works.

Say I have 2 dirs, "Demo1" & "Demo2", and inside those dirs, there is "demo1.exe" and "demo2.exe"  (and some other filese needed for the demo, so the dirs has to be there, I can not put all the .exe files in the root.)

How would you put that in to the code below.


Quote from: Joloo;666273
Sounds easy if the "ENV:" directory is available as well as ordinary CLI commands,

Code: [Select]
LAB main

CLEAR

ECHO "Enter a value: " NOLINE
ECHO >NIL: TO ENV:pvalue ?

IF VAL $pvalue EQ 1
 ECHO "Starting program 1"
 WAIT 2 SECS
 SKIP main BACK
ENDIF

IF VAL $pvalue EQ 2
 ECHO "Starting program 2"
 WAIT 2 SECS
 SKIP main BACK
ENDIF

IF VAL $pvalue EQ 999
 ECHO "Quitting"
 SKIP finish
ENDIF

ECHO "Incorrect value, try again."
WAIT 5 SECS
SKIP main BACK

LAB finish

Regards
A1200TOWER . Apollo1260-66Mhz 32Mb
====================================
www.po-rno.fi -  wcgraff.blogspot.com - blog.darklite.org
 

Offline Daedalus

Re: Want to make a CLI Menu
« Reply #7 on: November 03, 2011, 10:20:15 AM »
Quote from: tft666;666336
This ENV thing method seems interesting. I never did that.
But can you explain abit more what to enter in the code below. And more how this works.

Say I have 2 dirs, "Demo1" & "Demo2", and inside those dirs, there is "demo1.exe" and "demo2.exe"  (and some other filese needed for the demo, so the dirs has to be there, I can not put all the .exe files in the root.)

How would you put that in to the code below.


Okay, the ECHO "Starting program 1" line is basically just showing the action taken when a choice is made. You can keep that line and add your exe after it, or replace it entirely with the path to your exe. So, something like this:

Code: [Select]

IF VAL $pvalue EQ 1
 ECHO "Starting program 1"
 Work:Demo1/demo1.exe
 WAIT 2 SECS
 SKIP main BACK
ENDIF


And repeat for each step.
Engineers do it with precision
--
http://www.robthenerd.com
 

Offline bbond007

Re: Want to make a CLI Menu
« Reply #8 on: November 03, 2011, 10:45:19 AM »
Quote from: tft666;666336
This ENV thing method seems interesting. I never did that.
But can you explain abit more what to enter in the code below. And more how this works.

Say I have 2 dirs, "Demo1" & "Demo2", and inside those dirs, there is "demo1.exe" and "demo2.exe"  (and some other filese needed for the demo, so the dirs has to be there, I can not put all the .exe files in the root.)

How would you put that in to the code below.


Now that you got the scripting out of the way, what demos will you be showing?

With because you have an 060 and AGA, I suggest Little Nell.
 

Offline tft666

Re: Want to make a CLI Menu
« Reply #9 on: November 03, 2011, 12:34:23 PM »
The Demoshow will be via winUAE. Would've liked to use the real thing, but since I have to travel by plane to get to the party, its not that practical to bring the Amiga.
Plus its more practical for the organizers of the party when it comes to getting the beamer to work and stuff.

I will show some of the demos from this years REVISION and Datastorm.
Plus will find some classics and old hidden gems from the golden era of the late 90ies/early 2000.

Can share the playlist after the party :)

Last year I was so drunk, so can't remember what I showed ;) And never got to it to write it down.

In 2009 I showed theese:

#01 ELUDE - Step By Stem (2009)
#02 ACCESSION - Speedlimit (2009)
#03 EPHIDRENA - Fake Electronic Lightshow (2003)
#04 FUNKTION - No Bonus (2004)
#05 UNIQUE - Cathode (2009)
#06 SUPERGROUP - Superkewl (2009)[64k intro]
#07 FUNKTION vs RNO - Pornofunk (2005)
#08 LOONIES - Multiverse (2005)
#09 TULOU - Budleigh Salterton (2007)
#10 POTION - Gift (Gush 2) (2000)[64k intro]

#EXTRA 1
Demand from Lug00ber: SPACEBALLS - Dark Helmets

#EXTRA 2
Demand from Kusma: TRAKTOR & NATURE - JesusChristMotocross

So because of last years drunkeness, things didn't go so well, so this year its gonna be Drunk-proof. My only job is to push a number and watch :)
A1200TOWER . Apollo1260-66Mhz 32Mb
====================================
www.po-rno.fi -  wcgraff.blogspot.com - blog.darklite.org
 

Offline tft666

Re: Want to make a CLI Menu
« Reply #10 on: November 08, 2011, 02:33:02 PM »
Fhaaakk, I never got to complete my wonderfull Cli Menu presentation thing at the party, wasted my time too much so I never managed to finish it :(
Oh well, next year perhaps.

Anyway, for those who are interested, here are the demos I showed:

01 - Iris "Kilofix" (Breakpoint 2006)
02 - Loonies & Ghostown "Human Traffic (Revision 2011)
03 - Elude "Shake off the dust (Revision 2011)
04 - Ephidrena,RNO,Kvasigen "Software make the dance foam oil"(Datastorm 2011)
05 - Mankind "New world child" (Euskal 2001)
06 - Embassy "Myster & tremor" (Dreamhack 1998)
07 - Dekadence "Chaotic" (Assembly 2011)
08 - Furryboys "Darker" (The Gathering 2001)
09 - Mystic "Megademo" (Assembly 1999)
10 - Spaceballs "Norwegian Kindness" (Datastorm 2011)
11 - Dekadence "Swansong" (Revision 2011)

Get them all at pouet.net
A1200TOWER . Apollo1260-66Mhz 32Mb
====================================
www.po-rno.fi -  wcgraff.blogspot.com - blog.darklite.org