forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Make a history file, show the history file in the file menu

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
HGsOFT
Newbie


Joined: 14 May 2003
Posts: 19
Location: Netherlands

PostPosted: Fri Aug 01, 2003 10:13 am    Post subject: Make a history file, show the history file in the file menu Reply with quote

Code:
rem -------------------------------------------------------------
rem Make a History file.
rem Show the history file in the file menu.
rem -------------------------------------------------------------

%%Dir = @CURDIR()
INIFILE OPEN,%%Dir\History.INI
%1 = @INIREAD(History,File1)

OPTION ERRORTRAP,History

Title History.
  DIALOG CREATE,History.,-1,0,240,160
REM *** Modified by Dialog Designer on 08-01-03 - 11:07 ***
  DIALOG ADD,MENU,File,Save|CTRL+S,Open|CTRL+O,-,Exit|CTRL+E,-,%1
  DIALOG ADD,EDIT,EDIT1,16,30,180,19,EDIT1
  DIALOG ADD,STATUS,STATUS1,Load last saved file
  DIALOG ADD,BUTTON,BUTTON1,106,164,64,24,Exit
  DIALOG SHOW
:Evloop
  wait event
  goto @event()

:BUTTON1BUTTON
  goto Close
   
:History
  Info Open the History file %1.txt
  goto evloop
 
:SaveMenu
    %%EDIT1 = @Dlgtext(EDIT1)
  IF @NULL(%%EDIT1)
      Warn The EDITBOX is empty.
    goto evloop
         End
       
  %%savefile = @filedlg("History (*.TXT)",Save file)
   
  INIFILE OPEN,%%DIR\History.INI
  INIFILE WRITE,History,File1,%%savefile
 
  INIFILE OPEN,%%savefile.TXT
  INIFILE WRITE,TEST,EDIT1,%%EDIT1
 
  INFO You must close the program"," and than open it to see the history file.

  DIALOG SET,STATUS1,Last saved file:%%savefile
   
  goto evloop
 
:OpenMENU
  INFO Open a saved file.
  goto evloop
 
:ExitMENU
  goto Close
 
:Close
  exit


Last edited by HGsOFT on Tue Sep 16, 2003 8:35 am; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Aug 01, 2003 10:20 am    Post subject: Reply with quote

Nice code & idea, but what happens if somebody clicks the history filename in the menu?

Btw. I have added [code] tags to your post, so it's looking more professional... Smile

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
HGsOFT
Newbie


Joined: 14 May 2003
Posts: 19
Location: Netherlands

PostPosted: Fri Aug 01, 2003 10:32 am    Post subject: Reply with quote

OPTION ERRORTRAP,History

if somebody clicks the history filename in the menu the program goes
to the label :History

Wat bedoel je hier mee?
I have added [code] tags to your post, so it's looking more professional...
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Aug 01, 2003 11:04 am    Post subject: Reply with quote

Oops, I have overlooked that... Embarassed

Nederlands/Dutch:
Ik bedoel daarmee dat ik [ code ] en [ /code ] heb tegevoegd aan uw bericht, zodat de code er niet zoals alle andere tekst uitziet, maar zoals in Kladblok, met letters en tekens die elk even lang zijn. Let op, in bovenstaand voorbeeld heb ik spaties neergezet, omdat het anders niet te zien is. Ze dienen uiteraard zonder spaties te worden gebruikt...

Voorbeeld zonder [ code ]:

info Hallo @input(Wat is uw naam?)

Voorbeeld met [ code ]:
Code:
info Hallo @input(Wat is uw naam?)

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group