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 


undocument features of VDS
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Fri Apr 12, 2002 10:01 am    Post subject: undocument features of VDS Reply with quote

I remember going through the VDS 3.5 manual and finding that there were bits of information missing ie. commands switches missing, . . . Some of which I later found out and found to be very useful.

Following on from that observation, does anybody know of undocumented features of VDS eg. commands, commands switches, functions, dialog elements, . . . anything at all!!!

It would be great if these could be compiled into a text file or a web page...

Thanks for your time,

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Fri Apr 12, 2002 12:06 pm    Post subject: Reply with quote

The only ones that I know of are:

In the dialog create line, use the DESIGN parameter and you
can create a dialog editor. The commands along with that are
Attach and Detach. You'll have to play around with it.

Also You can use an index number with the command List PUT

List Put, List1, Some Text Here, 1

This will put "Some Text Here" in position 1 of list1.

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Lucyfer
Newbie


Joined: 06 Apr 2002
Posts: 16
Location: Quebec/Canada

PostPosted: Fri Apr 12, 2002 5:22 pm    Post subject: Reply with quote

Hi,

As I post in another thread, there's an undocumented option with @datetime() which is used to seed the RANDOM function.

Code:
Random @datetime(snd)


Bye
Back to top
View user's profile Send private message Send e-mail
Tommy
Admin Team


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

PostPosted: Fri Apr 12, 2002 5:45 pm    Post subject: Reply with quote

@datetime(snd) returns the number of seconds, minutes and days appended after eachother.

Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Fri Apr 12, 2002 5:47 pm    Post subject: Reply with quote

Lucyfer wrote:
Hi,

As I post in another thread, there's an undocumented option with @datetime() which is used to seed the RANDOM function.

Code:
Random @datetime(snd)


Bye


I'm afraid that this is no undocumented option for @datetime() - it simply returns a number
consisting of second+minute+date. Try this:

Code:
info @datetime(snd)@cr()sec = @datetime(s)@cr()min = @datetime(n)@cr()date = @datetime(d)


You may use @datetime() in many other ways to obtain a number for seeding your random number
generator. For instance, @ext(@datetime()) or @prod(@datetime(s),@datetime(m)).

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Lucyfer
Newbie


Joined: 06 Apr 2002
Posts: 16
Location: Quebec/Canada

PostPosted: Fri Apr 12, 2002 6:21 pm    Post subject: Reply with quote

Oops! Embarassed

Well, uh... Ok then it's another undocumented feature.

The option 'n' for @datetime() is not listed, only 'nn' is.. Wink

See ya!
Back to top
View user's profile Send private message Send e-mail
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Fri Apr 12, 2002 9:58 pm    Post subject: Reply with quote

Don't forget about the de-duplicating
feature/bug when you create a list sorted!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Lucyfer
Newbie


Joined: 06 Apr 2002
Posts: 16
Location: Quebec/Canada

PostPosted: Sat Apr 13, 2002 2:09 pm    Post subject: Reply with quote

MarkTurbo: Wow! What a bug! Surprised Exclamation

Assign/append/add to a sorted list remove all duplicates.. wow!

Do you know when(version) this one appeared ?

Bye
Back to top
View user's profile Send private message Send e-mail
Sylvester
Valued Newbie


Joined: 31 Jul 2000
Posts: 43
Location: Boston, MA USA

PostPosted: Sat Apr 13, 2002 2:48 pm    Post subject: Reply with quote

Lucyfer wrote:
MarkTurbo: Wow! What a bug! Surprised Exclamation

Assign/append/add to a sorted list remove all duplicates.. wow!

Do you know when(version) this one appeared ?

Bye


Hi guys, Smile

Mac and I discussed this thing a while back. He convinced me that maybe, just maybe, this was intentional. Mac prefers to think of it as a feature. Me, I think it's just strange. But then there a lot of things that I think are strange, so that doesn't really mean much. Razz


Take look at this code to see how this works. I used it on the following directory with the items listed below.

c:\BogusDir
log.txt
names.txt
testfile.txt
testfile.tx1
testfile.tx2
testfile.tx3
testfile.tx4
Copy of testfile.tst
Copy of testfile.txt
Copy of testfile.tx2
log.tx1
log.tx2

Code:

TITLE Sorted Lists
  DIALOG CREATE,Different Lists,-1,0,764,259
  DIALOG ADD,TEXT,LISTS,5,5,,,Results with different LIST types.
  DIALOG ADD,TEXT,OrigFileList,30,5,,,Original FileList
  DIALOG ADD,LIST,FileList,50,5,180,200
  DIALOG ADD,TEXT,ComboElement,30,205,,,Sorted Combo Element
  DIALOG ADD,COMBO,SortedCOMBOElement,50,205,180,21,,SORTED
  DIALOG ADD,TEXT,ListElement,30,390,,,Sorted List Element
  DIALOG ADD,LIST,SortedLISTElement,50,390,180,200,SORTED
  DIALOG ADD,TEXT,SortedList,30,575,,,Sorted List Result
  DIALOG ADD,LIST,SortedLISTResult,50,575,180,200
  DIALOG SHOW
  LIST CREATE,1
  LIST CREATE,2,SORTED
  LIST FILELIST,1,c:\BogusDir\*.*
  %X = 0
  REPEAT
    rem *** Adds to the SORTED COMBO ELEMENT
    LIST ADD,SortedCOMBOElement,@name(@item(1,%X))
    rem *** Adds to the SORTED LIST ELEMENT
    LIST ADD,SortedLISTElement,@name(@item(1,%X))
    rem *** Adds to the Created SORTED LIST
    LIST ADD,2,@name(@item(1,%X))
    %X = @succ(%X)
  UNTIL @equal(%X,@count(1))
  rem *** This displays the contents of the ORIGINAL File List
  LIST ASSIGN,FileList,1
  rem *** This displays the contents of the SORTED List
  LIST ASSIGN,SortedListResult,2
:EVLOOP
  WAIT event
  GOTO @event()
:CLOSE
  LIST SAVEFILE,FileList,c:\list.txt
  LIST CLOSE,1
  LIST CLOSE,2
  EXIT


As you can see, if you are using SORTED DIALOG elements (list, combo), it retains the duplicate items. However if you use a regular SORTED list, all duplicates are removed from the list. None of these are mentioned in the documents.

So use a dialog element if you want to hang on to duplicates in your list.

P.S. This only in reference to VDS 3.5. I do not have v4 yet so I haven't tested it on that.

_________________
Sylvester

In the immortal words of the great philosopher, Homer ... "D'OH!!!" 8O
Back to top
View user's profile Send private message Send e-mail MSN Messenger
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Sat Apr 13, 2002 11:47 pm    Post subject: Reply with quote

I think the de-dupr thing is a feature too -- I just called it a bug since it was not documented. We use it as a feature in a number of our office programs. Much easier than looping through with each item!!!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Apr 14, 2002 2:05 am    Post subject: Reply with quote

Thanks for your replies. That sorted list one is certainly news to me!

Another one i didn't know until i looked at a script example: it is possible to have the progress bar in a colour other than blue and that it can be continuous - does it say anything about that in the help file? I certainly couldn't find it when i looked at it.

It says that the progress bar can have styles, but what are those styles?

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Sun Apr 14, 2002 2:11 am    Post subject: Reply with quote

Liquidcode, can i have a simple example (not to take up too much of your time) on the DESIGN thingy - i don't get it! Embarassed

Thanks,

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Apr 14, 2002 3:59 am    Post subject: Reply with quote

__________________________________________________________________________________________________________________________
Here ya go Serge (thanks to LiquidCode for this info).
Click and drag the button.
Code:

rem -- VDS3 & VDS4 compatible --
rem -- Move elements using the undocumented DESIGN style --
OPTION SCALE, 96
Title By Mac
DIALOG CREATE,Design Style,-1,0,300,200,DESIGN
  DIALOG ADD,BUTTON,B1,5,5,60,20,"Button"
DIALOG SHOW

:CLICK
:EVLOOP
  WAIT EVENT
  goto @event()

:B1CLICK
  DIALOG ATTACH, B1
:B1CHANGE
  goto EVLOOP
 
:CLOSE
  EXIT

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361


Last edited by Mac on Sun Apr 14, 2002 5:29 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sun Apr 14, 2002 4:03 am    Post subject: Reply with quote

Not as simple as Mac's, but lets you add a button to move around and is for VDS 4. Thought it might be of some help.
Mac: Looks like you don't need the CLICK style when using the DESIGN style. Maybe that's just VDS 4?

Code:

TITLE Design Test
DIALOG CREATE,Design Test,-1,0,300,200,DESIGN
DIALOG ADD,BUTTON,Add,130,115,75,25,Add Button
DIALOG SHOW
:evloop
  wait event
  %%Event = @event()
  REM Check for Add Button.
  if @GREATER(@POS(Add,%%Event),0)
    gosub AddCLICK
   goto evloop
  end
  REM Check for plain CLICK event.
  if @EQUAL(%%Event,Click)
    DIALOG DETACH,%%Name
   goto evloop
  end
  REM Check to see if added button was clicked.
  if @GREATER(@POS(Click,%%Event),0)
    %%Name = @STRDEL(%%Event,@DIFF(@LEN(%%Event),4),@LEN(%%Event))
   DIALOG ATTACH,%%Name
    goto evloop
  end
  REM Check for Change event(Happens after dragging an attached element)
  if @EQUAL(@SUBSTR(%%Event,@DIFF(@LEN(%%Event),5),@LEN(%%Event)),Change)
    goto evloop
  end
  REM Go to any other event.
  goto %%Event
:AddCLICK
  %%ButtonName = @INPUT(Enter Name of Button)
  DIALOG ADD,Button,%%ButtonName,5,5,75,25,%%ButtonName
  exit
:Close
  exit

_________________
-Sheep
My pockets hurt...


Last edited by SnarlingSheep on Sun Apr 14, 2002 5:57 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Apr 14, 2002 5:21 am    Post subject: Reply with quote

Hey Sheep, Smile

It was to release the button once ya grabbed it
(I think... it's been a while since I wrote this).

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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