| View previous topic :: View next topic |
| Author |
Message |
Lucyfer Newbie

Joined: 06 Apr 2002 Posts: 16 Location: Quebec/Canada
|
Posted: Sat Apr 06, 2002 4:26 pm Post subject: Coding instructions |
|
|
Hi,
One great thing featured in 4DOS/4NT scripting is the ability to create
variables out of other variables...
Ex.: the next code (for 4DOS)
| Code: | C:\>Set Test=4
C:\>Set Test2=6
C:\>Set MyVar[%Test]=First_line
C:\>Set [MyVar%Test][%Test2]=Second_line
C:\>Set
....
Test=4
MyVar4=First line
First_line6=Second_line
C:\>_
|
I could've had a better example, I know, but my sources are long gone..
It would be really nice to have such a possibility, as it would cut down code and some useless iterations (repeat/while/...).
Of course, as I've had the habit of using it I could look like the only one that would use this..
This could look like..
| Code: | %T = 1
%%File[%T] = Help.hlp
Variable '%%File1' would've been created, holding 'Help.hlp'
|
For this to work, []'s should remain invalid characters in a variable name, as it is already.
Someone else interested in this? Take your time...  |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Apr 12, 2002 11:07 pm Post subject: |
|
|
Hi Lucyfer,
I think you are refering to Variables that are actually Arrays. I have always used VDS List's in place of Arrays. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Lucyfer Newbie

Joined: 06 Apr 2002 Posts: 16 Location: Quebec/Canada
|
Posted: Sat Apr 13, 2002 2:42 pm Post subject: |
|
|
mindpower:
Arrays could well do it, but we are kind of limited in lists, you see...
I won't be using lists above 9 'till the debug window is fixed, 'cause right now we can't monitor lists 10 to 16 even is these are usable...
Of course, now that i've learned the existance of the second option of @item(), I will certainly give it a second thought and optimize some code...
Thanks, this was helpful! |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sun Apr 14, 2002 8:40 pm Post subject: |
|
|
Hi Lucyfer,
You can go above List 9 just by making hidden listboxes. If you add a listbox and hide it then you can call the list by name. Also there is a DLL called vdsaray.dll here on this forum. I think that Tommy has released a DLL that will give you unlimited number of list's as well. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Apr 14, 2002 9:42 pm Post subject: |
|
|
The point he mentions though is that with any of the alternatives, the
list contents cannot be shown in the debug window in the VDS IDE
Tommy |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Apr 14, 2002 10:00 pm Post subject: |
|
|
_____________________________________________________________
Have you tried adding lists like this instead of hiding them?
DIALOG ADD,LIST,L1,0,0,0,0
Cheers, Mac  _________________ 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 |
|
 |
Lucyfer Newbie

Joined: 06 Apr 2002 Posts: 16 Location: Quebec/Canada
|
Posted: Mon Apr 15, 2002 5:52 pm Post subject: |
|
|
Hi!
Tommy got it right, those can't be viewed . I used hidden Editboxes as arrays before (needed 6 locations..) and lists. It's a way of getting some intelligent variables names.
As every programming text/book are trying to teach, we must always use intelligent variables/labels/... it's a bit different with VDS I guess..
Tommy: What about a dll-gateway dll? I'd like to compress files with, say, info-Zip (so I can distribute it..) but I don't think I can access those kind of dlls using EXTERNAL zip.dll... You see? This would be cool!...
Bye |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Tue Apr 16, 2002 1:45 am Post subject: |
|
|
I tried, and couldn't manage to make one. I think it involves coding
pieces in assembler, which I'm not familiar with. Also even if some calls
could be made to work, others may not, as VDS for example doesn't
have the ability to create structured objects.
Maybe Mindpower's API calling DLL is something to wait for for you...
Best regards,
Tommy |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue May 07, 2002 1:13 pm Post subject: |
|
|
Hi All,
BTW Lucyfer yes you would be able to make a little debugger that could monitor VDS listboxes or editboxes everytime an item is added using my Gadget... I am going to release the freeware only version as soon as I get my webserver up and working so everyone will have a chance to play with my gadget dll. Since Mr. Garrett is going out of business and I was on his server
Actually Tommy and everyone else. I have been looking at making a DLL for both Info_Zip and MS *.cab's....I figured out how to handle callback functions in VDS DLL's when I built the messaging API piece of my gadget dll so I think it would be possible to do it. I am not going to make Info_Zip's or MS's Gab's compression a part of my gadget dll because then I would either have to wrap both of Info_Zip's zip32.dll/unzip32.dll and MS's cabinet.dll into my gadget dll or make people carry those dll's with my gadget dll. So I am going to build a seperate DLL for doing just that. My gadget dll will have some low level compression routines built into it but as purely beta/research functions and commands. One of them will be the Huffman encoding algorythm and the other one will be the LZ compression algorythm. This may allow for some smart VDS programmer out there to build our own compression/archiving system So who knows.... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|