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 


Direct Connection??
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
Thomas233
Newbie


Joined: 12 Mar 2002
Posts: 11
Location: Villach ; Austria

PostPosted: Mon Mar 25, 2002 12:03 am    Post subject: Direct Connection?? Reply with quote

Hi!

Now i`ve some nice questions to you :

1) Can i connect directly to the Internet from VDS without opening the Browser?
(for example: When you have a list and like to merge items from a txt File at the Web ; http://www.myserver.com/data.txt -> local list)
2)Can i download a file from VDS without opening a download-dialog or browser?
(for example: When you have a file,that you would download with VDS Application from the Web,like a download-manager)

So,this questions aren`t really easy to answer,but i really need this features for my projects!

Good Night!!

_________________
Greetings Thomas
---------------------
@ http://www.bve-tools.at.tf
BVE Tools programmed with VDS
Back to top
View user's profile Send private message Visit poster's website
Henrik
Valued Newbie


Joined: 09 Jul 2000
Posts: 35
Location: Copenhagen, Denmark

PostPosted: Mon Mar 25, 2002 12:25 am    Post subject: Reply with quote

Hi Thomas !

Well, there are many options on this one.
Either use the VDSIPP DLL which has support for up to 99 threads and supports both HTTP and FTP and more and Tommy's VDSDLL also has this functionality, but I would suggest using the VDSIPP since you can download to an internal buffer (ie. not a file) in then process this buffer as a list

Hope this helps !

Henrik

_________________
Henrik Skov
Email: henrikskov@mail.dk
Back to top
View user's profile Send private message Send e-mail
Thomas233
Newbie


Joined: 12 Mar 2002
Posts: 11
Location: Villach ; Austria

PostPosted: Mon Mar 25, 2002 3:15 pm    Post subject: Reply with quote

Yes,thanks,that work very fine!
I`m the gladest men on the world...

_________________
Greetings Thomas
---------------------
@ http://www.bve-tools.at.tf
BVE Tools programmed with VDS
Back to top
View user's profile Send private message Visit poster's website
Thomas233
Newbie


Joined: 12 Mar 2002
Posts: 11
Location: Villach ; Austria

PostPosted: Mon Mar 25, 2002 3:30 pm    Post subject: Reply with quote

Another important question:
When you`ve loaded a list from a text file and want that an event occurs when you`ve selected an item.How can a do that best??
I think i can load a string from the header of the textfile that should not be showed in the list,can i do that(This is also the best way for my Programm)?

PS:It`s a dynamic list!

_________________
Greetings Thomas
---------------------
@ http://www.bve-tools.at.tf
BVE Tools programmed with VDS
Back to top
View user's profile Send private message Visit poster's website
Henrik
Valued Newbie


Joined: 09 Jul 2000
Posts: 35
Location: Copenhagen, Denmark

PostPosted: Mon Mar 25, 2002 4:33 pm    Post subject: Reply with quote

Hi Thomas !

Use the CLICK or DBLCLICK style on the list dialog element

and then add this event handler:

:LIST1CLICK
info @item(list1)
goto evloop

Is this what you want ?

Henrik

_________________
Henrik Skov
Email: henrikskov@mail.dk
Back to top
View user's profile Send private message Send e-mail
Thomas233
Newbie


Joined: 12 Mar 2002
Posts: 11
Location: Villach ; Austria

PostPosted: Mon Mar 25, 2002 8:21 pm    Post subject: Reply with quote

Henrik wrote:
Hi Thomas !

Use the CLICK or DBLCLICK style on the list dialog element

and then add this event handler:

:LIST1CLICK
info @item(list1)
goto evloop

Is this what you want ?

Henrik



Here a little example of that what i mean:
You have a list,wich is loaded from a textfile.In this list there are 4 items (1,2,3,4).When you have selected the item "3" then the VDS application should use
Code:
goto item3

This string/variable "goto item3" should be loaded from the textfile!
The textfile is written so:

1 ; goto item1
2 ; goto item2
3 ; goto item3
3 ; goto item4

Bold Text shouldn`t be shown in the list!!!
Ist this possible??

_________________
Greetings Thomas
---------------------
@ http://www.bve-tools.at.tf
BVE Tools programmed with VDS
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Mar 25, 2002 8:33 pm    Post subject: Reply with quote

If you add a CLICK style to your list like:
Code:

  DIALOG ADD,LIST,LIST1,10,28,180,144,,CLICK

Then you can use something like:
Code:

:List1CLICK
  goto @ITEM(List1)


The list item will have to be an event name, like evloop, I tried using @ITEM(1) like a command and it doesn't work, so you cant have your items as goto Item1, goto Item2, etc. They would have to just be Item1 and Item2.
Hope that makes sense.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Thomas233
Newbie


Joined: 12 Mar 2002
Posts: 11
Location: Villach ; Austria

PostPosted: Tue Mar 26, 2002 2:24 pm    Post subject: Reply with quote

Yes,that`s possible SnarlingSheep , but i need to read text from a textfile for this!
Is there any way?

_________________
Greetings Thomas
---------------------
@ http://www.bve-tools.at.tf
BVE Tools programmed with VDS
Back to top
View user's profile Send private message Visit poster's website
Henrik
Valued Newbie


Joined: 09 Jul 2000
Posts: 35
Location: Copenhagen, Denmark

PostPosted: Tue Mar 26, 2002 2:56 pm    Post subject: Reply with quote

Hi Thomas !

You could just parse the list item first:

Assuming your list item is ;goto item1
option fieldsep,"o "
parse ";%%ITEM",@item(list)
option fieldsep,
goto %%ITEM

Hope this helps

_________________
Henrik Skov
Email: henrikskov@mail.dk
Back to top
View user's profile Send private message Send e-mail
Thomas233
Newbie


Joined: 12 Mar 2002
Posts: 11
Location: Villach ; Austria

PostPosted: Tue Mar 26, 2002 3:36 pm    Post subject: Reply with quote

Yes Henrik,this is also a way but i really need to read text from a textfile(or Datafile) also for this,because it`s a dynamic list!
_________________
Greetings Thomas
---------------------
@ http://www.bve-tools.at.tf
BVE Tools programmed with VDS
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Tue Mar 26, 2002 6:11 pm    Post subject: Reply with quote

I thought you already knew how to read from a text file. You can use:
Code:

REM ** @PATH(%0) Gives you the path of your EXE. **
LIST LOADFILE,List1,@PATH(%0)Textfile.txt

This will load the list with the data in the text file, then you can use LIST SEEK and @ITEM() to find what you need in the list.

Then just Clear the list(List Clear,1) and use Loadfile when you need to reload the Textfile to look for changes.
I would reload the Textfile into the list everytime you access it if the file gets updated often.
Hope that helps.

_________________
-Sheep
My pockets hurt...
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: Tue Mar 26, 2002 10:00 pm    Post subject: Reply with quote

Hi Thomas233,

I noticed you mention "Dynamic List" several times. I wanted to ask you, is the content of the list dynamic while the number of items is static, or are both content and number of items dynamic?

You also mentioned that when you "select" an item from the list that you want something like a "goto item#". Looking at this I am assuming you mean you want this to go to a label called :item#. Is this assumption correct?

If the number of items in the list is dynamic then having labels of the ":item#" format could be a problem.. not really a problem, just more work. Here is one way I can think of to do this. You would probably need to find the max number of items you will ever get in that list and make a set of labels going from :item1 all the way to :item(max number). This would make your code(in VDS3.5) look something like this:

Code:

Title ActiveList
  DIALOG CREATE,New Dialog,-1,0,262,190
  DIALOG ADD,LIST,LIST1,4,8,180,144,CLICK
  DIALOG ADD,EDIT,EDIT1,161,9
  DIALOG ADD,BUTTON,Clear,161,193,,,Clear
  DIALOG SHOW
List loadfile,List1,c:\list.txt

:Evloop
  wait event
  goto @event()

:List1CLICK
rem  Get the what the item is
  %%Item = @item(List1)

rem  Get the item's item number
  %%ItemNumber = @index(List1)
rem  Above can also be %%ItemNumber = @succ(@index(List1))
rem  if you want your first item listed as 1 instead of 0

  goto Item%%ItemNumber

:ClearBUTTON
  Dialog clear,Edit1
  goto evloop

:Close
  exit

:Item0
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item1
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item2
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item3
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item4
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item5
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item(max number)
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop


This is of course IF my assumptions are correct. Are you sure you want to go through the headache? Confused

Why not do as Henrik and the Sheep suggested and just do something like this:

Code:

Title ActiveList
  DIALOG CREATE,New Dialog,-1,0,262,190
  DIALOG ADD,LIST,LIST1,4,8,180,144,CLICK
  DIALOG ADD,EDIT,EDIT1,161,9
  DIALOG ADD,BUTTON,Clear,161,193,,,Clear
  DIALOG SHOW
List loadfile,List1,c:\list.txt

:Evloop
  wait event
  goto @event()

:List1CLICK
rem  Get the what the item is
  %%Item = @item(List1)

rem  Get the item's item number
  %%ItemNumber = @index(List1)
rem  Above can also be %%ItemNumber = @succ(@index(List1))
rem  if you want your first item listed as 1 instead of 0

rem  In here do what you want to do using the info above
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber

  goto evloop

:ClearBUTTON
  Dialog clear,Edit1
  goto evloop

:Close
  exit


Of course, I could have misunderstood everything and am just sending you for a loop here. Like I mentioned above, this is based on my assumptions which may or may not even be correct.

In any case, good luck! Smile

I'll be quiet now and let the experts examine my head err.. I mean take over with the question answering. Razz

_________________
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
Thomas233
Newbie


Joined: 12 Mar 2002
Posts: 11
Location: Villach ; Austria

PostPosted: Tue Mar 26, 2002 10:33 pm    Post subject: Reply with quote

Code:


:Item0
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item1
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item2
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item3
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item4
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item5
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

:Item(max number)
  Dialog set,Edit1,Item= %%item  Item#= %%ItemNumber
  goto evloop

Yes,i mean this.But the code above must be loaded into VDS from a textfile so that i can ever modifiy the textfile,cause i can`t publish 1000 versions of this program to download.It`s an Exchange for files,so the database must be always actually and also the program!

_________________
Greetings Thomas
---------------------
@ http://www.bve-tools.at.tf
BVE Tools programmed with VDS
Back to top
View user's profile Send private message Visit poster's website
Sylvester
Valued Newbie


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

PostPosted: Wed Mar 27, 2002 4:47 pm    Post subject: Reply with quote

Hi Thomas233,

I could be wrong, but this almost sound like as if you want to create an app in VDS that will act like an interpreter or executer or something with the external file acting as a script. If I am right in this assumption then I am not sure how you can do it. I have never done it. I guess it's possible to build all your routines in the app and have them called from the external file using a system of tags or flags or something.

I am left with asking what is it are you trying to do that you need individual labels per list item? Will they be doing different things or can they be consolidated to one or a group of routines?

The only other thing I can think of is to go back to the original example I had in the earlier post where you try to anticipate what your max list item number will EVER be and build labels accordingly using @index() to move around.

I'm sorry I don't have anything else at the moment. If I come up with an idea, I'll let you know.

_________________
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
Henrik
Valued Newbie


Joined: 09 Jul 2000
Posts: 35
Location: Copenhagen, Denmark

PostPosted: Thu Mar 28, 2002 4:00 pm    Post subject: An example Reply with quote

Hi Thomas !

A long time ago I wrote a small interpreter in VDS to parse lists and offer mainly list manipulation but also with support for contrrol structures and more. I can email it to you if you like

_________________
Henrik Skov
Email: henrikskov@mail.dk
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