1. Help with Opening and Saveing file data...

Operating System: Windows
Euphoria: Windows
Program Type: Role Playing Game

I need help opening and saveing data files... What i would like to do, is
have a menu come up to load a game file (save.mws). and i would like it so
when saveing you can save with any name, but the file extention is named
.mws... When loading the .mws how would it read the file? And how would i
make it so that the load option doesn't open anything else but .mws?

~thanks~
PS: This is gunna be tough, huh?

new topic     » topic index » view message » categorize

2. Re: Help with Opening and Saveing file data...

Hello Alex

I think that you should read alittle of the documentation
that comes with Euphoria. I find myself also asking
for help on a particular problem but, have found that if you try to figure a
problem out first you'll be better off.

I need help right now on useing  <TAB> inside of ComboBox in Windows but,
haven't had anyone give me pointers on the subject. I can look up how to
info in the MS SDK but dont know how to convert that into code useable with
win32lib.

For now, here's a few pointers I can share with you.

integer fn

1. fn = open("filename.mws", "w")
    write the info you want useing methods obtained from
    others or RDS (Euphoria) such as puts
2. fn = open("filename.mws", "r")
    read the info you just wrote.

I know, this may sound abit smartass but, it's for your own good to look at
the language documentation.

P.S I submitted an E-mail to the list just today that
writes to a .edb database file closes the file after saveing
then reads in the information.

The E-Mail titled:
Wayne Overman      Re: TreeView     8/13/00 5:29PM

----- Original Message -----
From: "Alex Ford" <FFUltimateMaster at CS.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, August 13, 2000 6:27 PM
Subject: Help with Opening and Saveing file data...


> Operating System: Windows
> Euphoria: Windows
> Program Type: Role Playing Game
>
> I need help opening and saveing data files... What i would like to do, is
> have a menu come up to load a game file (save.mws). and i would like it so
> when saveing you can save with any name, but the file extention is named
> .mws... When loading the .mws how would it read the file? And how would i
> make it so that the load option doesn't open anything else but .mws?
>
> ~thanks~
> PS: This is gunna be tough, huh?
>

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

3. Re: Help with Opening and Saveing file data...

oh no, any and all comments [helpful or other-wise] are always helpful...
i've already read the docs, it just that i don't think its was i'm looking
for, and most of the help docs euphoria comes with are meant for DOS...

but thanks for the fn

~later~

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

4. Re: Help with Opening and Saveing file data...

windows has a built-in file open/save dialog box

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

5. Re: Help with Opening and Saveing file data...

... good grief, not this again ..

> I need help right now on useing  <TAB> inside of ComboBox in Windows but,
> haven't had anyone give me pointers on the subject.

...sure, all you have to do is get the handle of the EditText child created
by the combo, and subclass it so the 'TAB' handler within Win32lib sees it,
I'm guessing   blink
... try ChildWindowFromPoint(), or ChildWindowFromPointEx()
Maybe our latest *wizard*, Matt Lewis, can fix this up ?

Wolf

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

6. Re: Help with Opening and Saveing file data...

The use of database.e from the dos version of euphoria will work in windows.
the example I pointed to earlier uses this.
Please dont get me wrong, I am trying to help.

Jacques Deschenes wrote Commdlg.e which is a wrapper for Open, Save file
Dialog etc.
I have just begun to become interested in writeing my programs like Jacques
but, have a lot to learn
I think that win32lib is probably the easiest way to get what your after.

>From Win32Lib:
getOpenFileName( window, file, filters ) --Open file Dialog
getSaveFileName( window, file, filters )  --Save file Dialog

useing:
open, puts and many other commands (NOT ALL)  from the DOS side of Euphoria
WILL work in Windows.

I will begin to write the code for what your after and share that with you.
be patient though, I'm not as good as some (Wolfgang).

for now, this will create a file in windows

       fn = open("newfile.mws", "w")
       puts(fn,"you see dos stuff does work in windows")
       close(fn)

by the way if wolfgang reads this......THANKS DUDE


----- Original Message -----
From: "Alex Ford" <FFUltimateMaster at CS.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, August 13, 2000 7:22 PM
Subject: Re: Help with Opening and Saveing file data...


> oh no, any and all comments [helpful or other-wise] are always helpful...
> i've already read the docs, it just that i don't think its was i'm looking
> for, and most of the help docs euphoria comes with are meant for DOS...
>
> but thanks for the fn
>
> ~later~
>

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

7. Re: Help with Opening and Saveing file data...

to euman:

wow... cool!
thanks! talk to ya later!

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

8. Re: Help with Opening and Saveing file data...

In a message dated 8/13/00 9:11:43 PM Eastern Daylight Time,
euman at BELLSOUTH.NET writes:

<< getOpenFileName( window, file, filters ) --Open file Dialog >>
uh... how would you get that to work in the menu?
ei: File > Load Game

procedure onMenu_loadgame()
    getOpenFileName( win, file, .mws ) --Open file Dialog
end procedure
onClick[ loadgame ] = routine_id( "onMenu_loadgame" )

doesn't seem to work... i can wait if you want... its nothing i need done
right away...
i used
fn = open("001.mws","w")
but its not what i wanted cuz it doesn't really allow you to choose the file
you want... Again, if you are still working out this your self, i can
deffinately wait...
=)
~Later and thanks for all your help!~

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

Search



Quick Links

User menu

Not signed in.

Misc Menu