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 


Multi Therads in scripts.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Tue Apr 29, 2003 9:47 pm    Post subject: Multi Therads in scripts. Reply with quote

Im pretty new to VDS but I wish we could do more then one thing as once.
Like say something like open a file while at the same time browse the internet all at once, or something like make a dialog flash, while at the same time be sending text to notepad, whatever. Just multiple things.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Apr 29, 2003 9:51 pm    Post subject: Reply with quote

VDS is not and probably will never be multi-threaded. Quoted from the
site:

Quote:
It is not intended as a language for full-blown application development like C++ or Visual Basic(TM).


Personally I would really like to see VDS multi-threaded one day, but as
of now I don't really have a use for it.

BTW, if you use a browser element, just use the BROWSER SET (or
corresponding command) and that will only take milliseconds, if less, to
execute, then go on to open your file.

I think VDS is very fast for being an interpreted language. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Apr 29, 2003 9:53 pm    Post subject: Reply with quote

Also personally I feel that SADE should not put the following on their
site:

Quote:
It is not intended as a language for full-blown application development like C++ or Visual Basic(TM).


I think this because it will deter more advanced programmers from even
downloading it and/or purchasing it if they are told that. I think everyone
has to decide for themselves. I have created "full-blown applications" with
VDS and have enjoyed its rewards too. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Apr 29, 2003 10:17 pm    Post subject: Reply with quote

I think that's a legacy comment that probably needs to be changed now.

-Garrett
Back to top
View user's profile Send private message
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Tue Apr 29, 2003 10:47 pm    Post subject: Reply with quote

Im not using a browser eliment im just saying that as an example.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Apr 29, 2003 10:57 pm    Post subject: Reply with quote

I personally feel that some big-shot developers don't want to waste their
time if they see that and it is brought up several times.

I think VDS has turned out to be something amazingly better than what
it was originially intended to do. When it first came out it was made for
sending keystrokes etc. and having very simple dialog capabilities. Then
DLL authors came along and extended its functionality and are still doing
so. Look where VDS is getting to: being able to load non-VDS DLL's and
creating really useful applications for today's world. Without the development
of VDS, we wouldn't have the VDSWORLD Forum Checker, for example. Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team


Last edited by FreezingFire on Wed Apr 30, 2003 12:08 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
LOBO
Valued Contributor
Valued Contributor


Joined: 14 Mar 2002
Posts: 241
Location: Wilmington, Delaware, USA

PostPosted: Wed Apr 30, 2003 12:04 am    Post subject: Reply with quote

FF,
I do believe Garrett meant the comment you quoted from SADE's site was a legacy comment that probably needs to be changed.

-Mark
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Apr 30, 2003 12:07 am    Post subject: Reply with quote

Oops. Sorry, didn't understand. Embarassed
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Apr 30, 2003 1:58 pm    Post subject: Reply with quote

Hi All,
Here are my thoughts about VDS being multi-threaded. First of all when you use certian VDS DLL's they are being multi-threaded behind the scenes. Second to allow a VDS programmer to manipulate threads would not be very easy because of the nature of Threads and the nature of VDS in general.
It would be a nice feature but most of the VDS programmers panic at the site of using a VDS DLL never the less calling the Win32 API. I know where I speak because of the sales of Gadget are so low that they were not even enough to pay for the electricity to run the PC that I wrote the code on. If the VDS programmers out there want all this really cool and advanced stuff they should support the developers of VDS.
Anyway the truth be known you could actually have multiple Threads with Gadget by passing the beginthread function from the Visual C runtime DLL msvcrt.dll the address of one of Gadget's callback functions but that is only half of what a thread is. The primary problem with Threads and VDS is the fact that VDS is an interpreter that reads each line one at a time. Yes you can change the sequence of execution but it is still one line at a time and it will not continue execution until that line has finished and got a return. When you setup one of Gadget's callback functions it will fire events to the VDS program that your script can respond to so it returns execution to the script right away but you still need a better way to control starting and stopping of the callback function. The callbacks are still very beta and they have a few problems with Win 2000+ and returning large amounts of data mainly because VDS'es event process does not return a value to our VDS DLL's. If VDS had a way to tell our VDS DLL when it actually fired the event then we could have our functions wait for it. Maybe I should post this to the wish list on the DLL developers forum Idea
Lets just say it is possible but I am not going to make an example of it because too many things can go wrong with it and I cannot be certian that VDS programmers are ready for such an advanced topic as multi Threading and I am sure that the developers over at SADE are thinking the same thing. One step at a time guys/gals. Learn what is possible with the Win32 API and how to use it then move on to more advanced topics as this if you choose too Wink
Also this would be a good topic to be posted on the DLL developers forum Idea

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
DW
Contributor
Contributor


Joined: 21 Mar 2003
Posts: 175
Location: UK

PostPosted: Fri May 02, 2003 4:38 pm    Post subject: Reply with quote

I have to admit (after the long read Very Happy ) that you do make a good point.
What about just simple stuff like, when you have a dialog on screen called through 'INFO' the program in the back ground can still continue?
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri May 02, 2003 4:58 pm    Post subject: Reply with quote

You should emulate an info window. That way the old window can still be used...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri May 02, 2003 7:29 pm    Post subject: Reply with quote

There's also this approach:

Code:

if @equal(@substr(%1,1,5),/INFO)
    INFO %2
   exit
end

if @equal(@substr(%1,1,5),/WARN)
    WARN %2
   exit
end

REM -- Main program code --

  DIALOG CREATE,Info Test,-1,0,223,92,NOMIN
  DIALOG ADD,STYLE,BOLD,,,B,,
  DIALOG ADD,EDIT,Tip,8,6,210,38,NOTE: For this script to work well you must compile it first.,,MULTI,WRAP,SCROLL
  DIALOG ADD,BUTTON,Info,56,42,64,24,Info,,BOLD
  DIALOG ADD,BUTTON,Close,56,108,64,24,Close
  DIALOG SHOW
 :Evloop
 wait event
 goto @event()
 :InfoBUTTON
 REM -- You must put quotes around the text using @CHR(34) --
 shell open,%0,/INFO @chr(34)** You can put a variable or other function etc. here! **@chr(34)
 goto evloop
 :CloseBUTTON
 :Close
 exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Fri May 02, 2003 8:17 pm    Post subject: Reply with quote

I like that one FF... very creative. Very Happy
_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri May 02, 2003 8:19 pm    Post subject: Reply with quote

Thanks. Wink
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri May 02, 2003 8:22 pm    Post subject: Reply with quote

It's a good idea, but useless if you want to test it quick, cause you always need to compile it...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Wish List 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