| View previous topic :: View next topic |
| Author |
Message |
SgtBadass Newbie
Joined: 23 Aug 2004 Posts: 1
|
Posted: Mon Aug 23, 2004 7:28 pm Post subject: VDS capabilities |
|
|
Hi guys/gals,
I've been out of the VDS scene for years now. I used to use version 2, upgraded to 3 and barely used it since. However, I've now got a need for something and I'm wondering whether to get Version 5.
What I need to do is insert a certain bit of text in the top of a bunch of files selected via a file dialog - is this easy enough to do in VDS? I seem to remember loking at something similar in VD3, but as I said - haven't used it in years!
If anyone can point me in the direction of an example, I might just splash out and upgrade. In the meantime I'll have a look around. |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Aug 23, 2004 9:42 pm Post subject: |
|
|
Hi there! Welcome to the VDSWORLD Forums
First off, let me say that VDS 5 is so much better than VDS 2 and 3,
and is now comparable to the capabilities of, for example, Visual Basic.
I highly recommend purchasing VDS 5 as you will find that you will use
it all the time!
I made an example for you; you should use VDS 5 to execute this script,
mainly because of the updated commentation style.
If you would like to get a copy of VDS 5 (in case you haven't already),
please visit http://www.dialogscript.com/vds.html
| Code: | # Insert Text at Top of File example
# by FreezingFire
title Insert Text at Top of File example by FreezingFire
DIALOG CREATE,Example Dialog Box,-1,0,240,110
DIALOG ADD,TEXT,TEXT1,14,13,,,This example shows how to select a file and@cr()insert text at the top of it.
DIALOG ADD,BUTTON,Select,71,80,74,24,Select File
DIALOG SHOW
:Evloop
wait event
goto @event()
:SelectBUTTON
warn Warning: This demo will modify contents of the selected file. Please select a test file only.
%%file = @filedlg("All Files (*.*)|*.*",Select a File)
if @both(@ok(),@file(%%file))
%%text = @input(Enter text to insert:)
# I use lists in this example because it is much simpler to show
# however BINFILE may be preferred if the files being edited are
# very large.
list create,1
list loadfile,1,%%file
# seek to the first line in the list
if @text(1)
list seek,1,0
end
list insert,1,%%text
list savefile,1,%%file
list close,1
end
goto evloop
:Close
info End of demo.
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Aug 24, 2004 8:40 am Post subject: |
|
|
Yes, this would be a doddle in VDS as FF's example shows.
FWIW, I generate my entire website using VDS to build the pages using a template into which is inserted the content of each page. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Aug 24, 2004 5:15 pm Post subject: |
|
|
http://www.pricelessware.org/ is also generated by a VDS program with
a few templates for the html, and VDS inserting all the content. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Aug 24, 2004 5:17 pm Post subject: |
|
|
I stand corrected.... It doesn't insert anything actually. It takes the
templates and the data and just makes new web pages out of it. _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
|
|
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
|
|