1. Menu Program

Hey
Does anyone know if there is a program in the archive that displays a
simple text menu?  i.e.

1.) <some option>
2.) <some option>
3.) <some option>
4.) Exit

Press 1,2,3,4

Just wondering, wanted something to look at for an example.

Thanks!
Rich

new topic     » topic index » view message » categorize

2. Re: Menu Program

Rich Klender wrote:
> 
> Hey
> Does anyone know if there is a program in the archive that displays a
> simple text menu?  i.e.
> 
> 1.) <some option>
> 2.) <some option>
> 3.) <some option>
> 4.) Exit
> 
> Press 1,2,3,4
> 
> Just wondering, wanted something to look at for an example.

Try http://www.rapideuphoria.com/txt_dialogs.zip

That's for text mode interfacing... If you want Win32, you'll have to try
something else. :)

new topic     » goto parent     » topic index » view message » categorize

3. Re: Menu Program

Oops, never mind...I found menu by Daniel Berstein, I think that will
probably work for what I need!

Sorry
Rich

new topic     » goto parent     » topic index » view message » categorize

4. Re: Menu Program

On 1/27/07, Rich Klender <guest at rapideuphoria.com> wrote:
>
> Does anyone know if there is a program in the archive that displays a
> simple text menu?  i.e.

Here's a good example:

include get.e

function do_menu( sequence title, sequence options, sequence prompt )

    integer min, max, sel

    min = 1
    max = length( options )

    printf( 1, "%s\n\n", {title} )
    for i = min to max do
        printf( 1, "    %d) %s\n", {i, options[i]} )
    end for

    prompt = "\n    " & prompt
    sel = prompt_number( prompt, {min, max} )

    return sel
end function

sequence options
integer sel

    options = {"Chevy", "Ford", "Dodge"}

    sel = do_menu( "Car Menu", options, "Please select a car:" )

    printf( 1, "\nYou selected %s!\n", {options[sel]} )


new topic     » goto parent     » topic index » view message » categorize

5. Re: Menu Program

Thank you so much Mr. Haberek!!!  That was exactly what I was looking for,
your a genuis!!  Also, thanks for the education on the printf command, seeing
it in action is so much better then reading the manual!

I added a if/then to handle the return of sel, which then calls the appropriate
function to do the 1st item off the list, and it worked...so I have my 1st
program
that actually does something and works without any errors!

Probably not much of a milestone, but I was pretty proud!!

Thanks again!
Rich

new topic     » goto parent     » topic index » view message » categorize

6. Re: Menu Program

Rich Klender wrote:
> 
> ...so I have my 1st program
> that actually does something and works without any errors!
> 
> Probably not much of a milestone, but I was pretty proud!!

You should be proud. The hardest part about learning to program is breaking the
ice. Things begin to click quickly once you understand the basic principles.

Congratulations.


Chris Bensler
~ The difference between ordinary and extraordinary is that little extra ~
http://empire.iwireweb.com - Empire for Euphoria

new topic     » goto parent     » topic index » view message » categorize

7. Re: Menu Program

You're welcome!

On 1/31/07, Rich Klender <guest at rapideuphoria.com> wrote:
>
>
> posted by: Rich Klender <rklender at excite.com>
>
> Thank you so much Mr. Haberek!!!  That was exactly what I was looking for,
> your a genuis!!  Also, thanks for the education on the printf command, seeing
> it in action is so much better then reading the manual!
>
> I added a if/then to handle the return of sel, which then calls the
> appropriate
> function to do the 1st item off the list, and it worked...so I have my 1st
> program
> that actually does something and works without any errors!
>
> Probably not much of a milestone, but I was pretty proud!!
>
> Thanks again!
> Rich
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

8. Menu Program

I was informed I should use plain text for E-Mail=0D
This is try #2=0D
=0D
I down loaded the Euphoria package 4 days ago, so I'am very green.=0D
I'am trying to create a "main menu" program using tab that will execute
other programs.=0D
I modifiied some code Ifound in "EX05,EXW" to the procedure below=0D
=0D
=0D
global procedure onClick_MakeTable(integer self, integer event, sequence
parms)=0D
    shellExecute("open","work.exw",SW_NORMAL)=0D
  end procedure=0D
=0D
This works.=0D
QUESTION:=0D
=0D
Is there a way to execute a procedure by clicking on a tab??=0D
=0D
Thanks for any help.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu