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 


A run-once code

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code
View previous topic :: View next topic  
Author Message
Skit3000
Admin Team


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

PostPosted: Sat Jul 06, 2002 7:26 pm    Post subject: A run-once code Reply with quote

Hello, here is a code to set your program to run once...

Put ,CLASS TDlgProgName after DIALOG CREATE
Code:

IF @EQUAL(@REGREAD(CURUSER,PROGRAMNAME,RUNONCE),1)
  IF @WINEXISTS(#TDlgProgName)
    WINDOW ACTIVATE,#TDlgProgName
    STOP
  END
END



Code:

:CLOSE
REGISTRY WRITE,CURUSER,PROGRAMNAME,RUNONCE,0
EXIT


Last edited by Skit3000 on Sun Jul 07, 2002 8:29 am; edited 1 time in total
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sat Jul 06, 2002 9:06 pm    Post subject: Reply with quote

Why not simply do the following?

Code:

IF @WINEXISTS(#TDlgProgName)
  WINDOW ACTIVATE,#TDlgProgName
  STOP
END



Code:

:CLOSE
  EXIT
 


Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Skit3000
Admin Team


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

PostPosted: Sun Jul 07, 2002 8:32 am    Post subject: Reply with quote

Well, if there is another program with the same class name, you can't start your own!
Now you can look if the #TDlgProgName is really your program... Smile
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 3 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