View previous topic :: View next topic |
Author |
Message |
DW Contributor
Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Tue Apr 29, 2003 9:47 pm Post subject: Multi Therads in scripts. |
|
|
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 |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Apr 29, 2003 9:51 pm Post subject: |
|
|
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. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Apr 29, 2003 9:53 pm Post subject: |
|
|
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. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Apr 29, 2003 10:17 pm Post subject: |
|
|
I think that's a legacy comment that probably needs to be changed now.
-Garrett |
|
Back to top |
|
|
DW Contributor
Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Tue Apr 29, 2003 10:47 pm Post subject: |
|
|
Im not using a browser eliment im just saying that as an example. |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Apr 29, 2003 10:57 pm Post subject: |
|
|
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. _________________ 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 |
|
|
LOBO Valued Contributor
Joined: 14 Mar 2002 Posts: 241 Location: Wilmington, Delaware, USA
|
Posted: Wed Apr 30, 2003 12:04 am Post subject: |
|
|
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 |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Apr 30, 2003 12:07 am Post subject: |
|
|
Oops. Sorry, didn't understand. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Apr 30, 2003 1:58 pm Post subject: |
|
|
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
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
Also this would be a good topic to be posted on the DLL developers forum _________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
DW Contributor
Joined: 21 Mar 2003 Posts: 175 Location: UK
|
Posted: Fri May 02, 2003 4:38 pm Post subject: |
|
|
I have to admit (after the long read ) 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 |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri May 02, 2003 7:29 pm Post subject: |
|
|
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 |
|
|
Hortalonus Valued Contributor
Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Fri May 02, 2003 8:17 pm Post subject: |
|
|
I like that one FF... very creative. _________________ "ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player... |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri May 02, 2003 8:19 pm Post subject: |
|
|
Thanks. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
|