1. Help with Opening and Saveing file data...
- Posted by Alex Ford <FFUltimateMaster at CS.COM> Aug 13, 2000
- 2622 views
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?
2. Re: Help with Opening and Saveing file data...
- Posted by Wayne Overman <euman at BELLSOUTH.NET> Aug 13, 2000
- 2602 views
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? >
3. Re: Help with Opening and Saveing file data...
- Posted by Alex Ford <FFUltimateMaster at CS.COM> Aug 13, 2000
- 2610 views
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~
4. Re: Help with Opening and Saveing file data...
- Posted by Bernie <xotron at PCOM.NET> Aug 13, 2000
- 2583 views
windows has a built-in file open/save dialog box
5. Re: Help with Opening and Saveing file data...
- Posted by wolfgang fritz <wolfritz at king.igs.net> Aug 13, 2000
- 2628 views
... 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 ... try ChildWindowFromPoint(), or ChildWindowFromPointEx() Maybe our latest *wizard*, Matt Lewis, can fix this up ? Wolf
6. Re: Help with Opening and Saveing file data...
- Posted by Wayne Overman <euman at BELLSOUTH.NET> Aug 13, 2000
- 2627 views
- Last edited Aug 14, 2000
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~ >
7. Re: Help with Opening and Saveing file data...
- Posted by Alex Ford <FFUltimateMaster at CS.COM> Aug 13, 2000
- 2614 views
- Last edited Aug 14, 2000
to euman: wow... cool! thanks! talk to ya later!
8. Re: Help with Opening and Saveing file data...
- Posted by Alex Ford <FFUltimateMaster at CS.COM> Aug 13, 2000
- 2623 views
- Last edited Aug 14, 2000
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!~