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 


Templates for VDS 3

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


Joined: 07 Jun 2001
Posts: 10
Location: Canada

PostPosted: Thu Nov 13, 2003 5:13 am    Post subject: Templates for VDS 3 Reply with quote

Well, I've been doing some scripting for awhile and its been a long time since I have contributed to the form. One of my peeves about VDS 3 (Yes, still in 3 - does what I need it to and with MAC's vdsug - I'm happy) is the lack of a template to start from. I have seen a number of post on the site of what to include and of course like everybody else there's always the faves and then there's the stuff you somtimes would like. What I have done is created a template and and exe "Tool" to put it into an empty doc.
Heres the code. You can compile this and add it to your tools directory.
Code:

rem *********************************************************
rem *  Program Name:
rem *  Authors Name: B. Danino
rem *  Program Requirements:
rem *  Program Use: Template copier to create new template in a blank rem *                       editor
rem *  Date created: << YYYY-MM-DD >>
rem *  Last updated: << YYYY-MM-DD >> 
rem *********************************************************

rem ** Variables section
gosub options

TITLE %%AppTitle
   DIALOG CREATE,%%AppTitle,-1,0,0,0,ONTOP

gosub List1
wait .2

REM Copy back to editor
window SEND,%W,@CTRL(V)

rem End of script.
:Close
  Exit


rem ---begin gosub---
:options
option decimalsep,"."
option scale,96
option fieldsep,"|"
%P = @path(%0)
%%AppTitle = "Template Creator   .. by BD"
%%AppVer = 1.00
%%AppBuild = 001
%%Copyright = "Copyright (c) 2003"
 REM Grab ID of VDS editor window
%W = @winactive(I)
exit

:List1
  list create,1
  list loadfile,1,template.tm
  clipboard clear
  list copy,1
  list close,1
  exit 
 


and heres the template file which is obviously a text file for the above.

template.tm (needs to be in tools folder as well)

Code:
rem ********************************************************
rem *  Program Name:
rem *  Authors Name:
rem *  Program Requirements:
rem *  Program Use:
rem *  Date created: << YYYY-MM-DD >>
rem *  Last updated: << YYYY-MM-DD >> 
rem ********************************************************

rem ** Variables section
gosub options
gosub List1
TITLE %%AppTitle
   DIALOG CREATE,%%AppTitle,-1,0,0,0
   DIALOG ADD,TEXT,TEXT1,53,61,,,This is a test.
   
   DIALOG SHOW



:Evloop
   wait event 
   goto @event()





rem End of script.
:Close
  Exit


rem ---begin gosub---
:options
option decimalsep,"."
option scale,96
option fieldsep,"|"
%P = @path(%0)
%%AppTitle = "AppName goes here "
%%AppVer = 1.00
%%AppBuild = 001
%%Copyright = "Copyright (c) 2003"
exit

:List1
List Create,1
List loadfile,1,file.ext
List Seek,1,0
%%CItem = @item(1)
List Close,1

rem ---end gosub---


This way you can stick whatever into the template.tm file and a new template is just a click away.
Hope this works well for you. Wink


Last edited by BD on Sat Nov 22, 2003 2:15 am; edited 1 time in total
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Nov 13, 2003 11:10 pm    Post subject: Reply with quote

Nice code. Wink I think it will come in handy for those VDS 3 users. Smile
Welcome to the forums. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
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