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 


Javascript VDS interpreter
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements
View previous topic :: View next topic  
Author Message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Mon Oct 30, 2006 4:28 pm    Post subject: Reply with quote

jules wrote

Quote:
I agree. But if he says no when you do ask him, won't it have been to some extent a wasted effort?


i was thinking the same thing ... not wishing to be a wet blanket, but how likely is it that CR would approve of it as it uses the exact same commands and functions as VDS ... mind you, if they gave the go ahead, then it would be fantastic and, as pointed out earlier, it would be a great boost for VDS as folks would be able to write their own online applications Very Happy Very Happy Very Happy

if they don't give the go ahead, could a work around be that you change the @ to something else? would that be enough to make it 'legal'?

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1537

PostPosted: Mon Oct 30, 2006 5:52 pm    Post subject: Reply with quote

I'd recommend changing the code slightly and using slightly different command/function names. You would be completely legal at that point if there really is anything illegal to begin with. My opinion is using a syntax is not illegal, each and every command/function would need to be trademarked which not even a single command/function has nor has the term 'visual dialogscript' have a registered trademark.

You could always later on create a converter from SkitSkript to VDS and back if needed.
Back to top
View user's profile Send private message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Mon Oct 30, 2006 6:52 pm    Post subject: Reply with quote

I get an error when I try the example. The bottom of my browser (IE) says "error on page". Any ideas?
_________________
Joe Floyd
Back to top
View user's profile Send private message
Skit3000
Admin Team


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

PostPosted: Mon Oct 30, 2006 7:02 pm    Post subject: Reply with quote

Dr. Dread wrote:
Sounds interesting. I get an "access denied" error in MSIE7, though. Line 1194, char 6.


Dr. Dread, it has to do with the security settings of IE 7. The first time you open a local HTML page with javascript, you will get that yellow information bar which asks you if you want to enable or disable "local intranet" scripts. I believe that HTML pages with javascript which reside on a web server don't have this problem. Otherwise, you can try another browser like Firefox or Opera just to see the script in action Smile

SnarlingSheep wrote:
This might be something to check out:
http://www.winlike.com/


Thanks for the link, I'll take it with me to make a decision Smile By the way, together with a friend I created a much better looking window script-library, which can emulate real Windows windows and applications.

jules wrote:
I think the commands and functions should be as compatible as possible with existing VDS code, so that people can copy and paste stuff from existing scripts.


I'm afraid the copy and paste part will be a bit difficult. My interpreter always sees a single % as the start of a variable of unknown length (until an invalid character appears). Also, the % and %% variables of VDS are in my eyes the most odd things of the whole language.

Serge wrote:
if they don't give the go ahead, could a work around be that you change the @ to something else? would that be enough to make it 'legal'?


Well, old fellow Mac once made a VDS interpreter with C, but he changed @ into # and changed a few function names. I don't really know if this was because CR/SADE told him he wasn't allowed to use @ for functions or if it had any other reason. But if it was the first case, his interpreter was a competitive product since it could do exactly the same things as VDS itself. My interpreter has got a whole other target group and it can not do a lot of things which the real VDS cn do, like editing the registry, binary editing files, etc. Although I might be able to implement those things through the use of system objects (like XMLHTTP for sending POST and GET HTTP calls)... Twisted Evil

jwfv wrote:
I get an error when I try the example. The bottom of my browser (IE) says "error on page". Any ideas?


Joe, I think it might have to do something with your local security settings. When you double click on the error icon in the IE statusbar and you get an error on or around line 1194 saying "access denied", try using another browser. I might upload an online example next week which should solve these problems.

_________________
[ 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
Dr. Dread
Professional Member
Professional Member


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

PostPosted: Tue Oct 31, 2006 6:14 am    Post subject: Reply with quote

Skit3000 wrote:

Dr. Dread, it has to do with the security settings of IE 7. The first time you open a local HTML page with javascript, you will get that yellow information bar which asks you if you want to enable or disable "local intranet" scripts. I believe that HTML pages with javascript which reside on a web server don't have this problem. Otherwise, you can try another browser like Firefox or Opera just to see the script in action Smile


You're right - dunno why I didn't think of it right then. I've run into similar things lotsa times. However, I put
the files on a web server, and it runs fine now. Impressive.

Greetz
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
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Oct 31, 2006 9:07 am    Post subject: Reply with quote

Skit3000 wrote:
I'm afraid the copy and paste part will be a bit difficult. My interpreter always sees a single % as the start of a variable of unknown length (until an invalid character appears). Also, the % and %% variables of VDS are in my eyes the most odd things of the whole language.

A pity. Some people will have libraries of code they want to use. And since you don't have a real debugger, it would be nice to be able to debug code in the real VDS IDE.
There are good reasons for the variable naming being done the way it is. For a start, with VDS being a string substitution interpreter, there are (and there is no need for) string concatenation commands. So in the example:

%L = LION
%T = %LS

%T will be LIONS, where in your interpreter it will be an uninitialized variable.

Another reason is that it is a clear way to distinguish between variabble names that are local to a user defined command or function, and those that are global.

The other principal reason for doing it this way was speed and efficiency. When the interpreter encounters a "%", it knows that the next character it encounters is a variable name, the ASCII value of which converts directly to an index to the array where the value is kept, unless the next character is another "%", in which case it has to scan along the line to find the end of the variable name, and then do some conversion to find out the address. Newer versions of VDS "compile" variable names to something that is close to a direct index anyway, but the earlier ones didn't.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Tue Oct 31, 2006 1:20 pm    Post subject: Reply with quote

This looks very promising! Keep up the good work!
_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


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

PostPosted: Tue Oct 31, 2006 5:11 pm    Post subject: Reply with quote

jules wrote:
%L = LION
%T = %LS

%T will be LIONS, where in your interpreter it will be an uninitialized variable.


With my interpreter, this can be done like %T = %L"S" or %T = %L""S. Also, if I am going to add user defined VDS commands and functions, I think I will get of %1 to %9 and replace them with @param(1 to 99999xxxx), just to give the developers a way to use more then 9 parameters.

For the debugging functions, the interpreter already has got the ability to run code line by line. Also, when there is an error in a command or function, the line number, error number, error message nd the command or function name in which the error occurred are displayed. The only things which aren't in, are breakpoints, but to be honest I never did like those anyway Razz

I'll update the example this week to make use of the debugging functions Smile

_________________
[ 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
Skit3000
Admin Team


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

PostPosted: Sun Nov 05, 2006 2:09 pm    Post subject: Reply with quote

Here it is, a little IDE for editing and executing VDS scripts from your webbrowser. Please note that the Save and Load buttons only work with Internet Explorer and Firefox, because these two are the only browsers which can access files on the local disk (but you do need to accept the security warning).

When editing code, a light bar will follow your caret. Also, when you run code, the IDE will show you the line which is being executed. At the bottom of the screen you can get information about the current state of the script (running, waiting or stopped) and see info about the current line number, last event and the value of variables.

You can stop an application at any time by pressing the Stop button. Please note that it will also close all dialogs created by the script.

I also did a little work on the interpreter. I didn't add new commands or functions, but I did solve some minor problems and prevented continuous loops.

A few example scripts come with this latest version. You can find them in the Scripts directory. The "dialogs.vds" example is a converted version of the "wizard.dsc" script which comes with VDS 5.



Interpreter.zip
 Description:
Third upload, fixed the If-Else-End bug

Download
 Filename:  Interpreter.zip
 Filesize:  38.17 KB
 Downloaded:  783 Time(s)


_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!


Last edited by Skit3000 on Mon Nov 06, 2006 6:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
Garrett
Moderator Team


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

PostPosted: Sun Nov 05, 2006 11:13 pm    Post subject: Reply with quote

Now since this is web based, are there any web specific new features you
can add that we don't or can't have in VDS itself? Like connecting to MySQL
etc.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


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

PostPosted: Sun Nov 05, 2006 11:17 pm    Post subject: Reply with quote

Yeah, that would be great. This is so cool. Very Happy
_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Garrett
Moderator Team


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

PostPosted: Mon Nov 06, 2006 12:12 am    Post subject: Reply with quote

Also, what about STYLES? Can that be implemented? I've decided to make
a little project that you can include with your interpreter, but will need some
sort of STYLES support.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
Garrett
Moderator Team


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

PostPosted: Mon Nov 06, 2006 12:19 am    Post subject: Reply with quote

In FireFox 2.0, the popup windows are being allowed to resize, which if we
stick to the context here, they shouldn't be resizable unless we add that
param to the dialog create line.

In MSIE 6, this is does not happen.

And of course the RESIZABLE param has no affect with either browser.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
Garrett
Moderator Team


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

PostPosted: Mon Nov 06, 2006 12:48 am    Post subject: Reply with quote

My ancient HTML stripping example seems to cause your interpreter to
choke and cough up blood:

Code:
REM    _____________________________________________________
REM   |\___________________________________________________/|
REM   | |                                                 | |
REM   | | SOURCE TITLE:    GT-HtmlStrip                   | |
REM   | | ------------                                    | |
REM   | | SOURCE AUTHOR:   Garrett R. Hylltun             | |
REM   | | -------------                                   | |
REM   | | DATE:            20 April, 2001                 | |
REM   | | ----                                            | |
REM   | | REQUIREMENTS:    VDS 2.x, 3.x, 4.x, 5.x         | |
REM   | | ------------                                    | |
REM   | | SOURCE STATUS:   Public Domain                  | |
REM   | | -------------                                   | |
REM   | | SOURCE DESCRIPTION:                             | |
REM   | | ------------------                              | |
REM   | |   This is an example which shows you how to     | |
REM   | | strip html tags from a single line.             | |
REM   | |_________________________________________________| |
REM   |/___________________________________________________\|

REM   --- |-------------------------------------------------| ---
REM   --- |   %A is the variable holding the string input.  | ---
REM   --- |-------------------------------------------------| ---

  %A = <FONT face=Verdana>If <B>you</B> see any html <I>tags</I> in this message <U>then</U> this example obviously has failed you.</font>

  repeat
    if @greater(@pos(<,%A),0)
      %B = @pos(<,%A)
      %C = @pos(>,%A)
        If @equal(%B,1)
          %D =
        Else
          %D = @substr(%A,1,@fsub(%B,1))
        End
      %E = @substr(%A,@sum(%C,1),@len(%A))
      %A = %D%E
    end
  until @not(@greater(@pos(<,%A),0))

  INFO %A


-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
kOt
Contributor
Contributor


Joined: 19 Jan 2004
Posts: 89
Location: Fyffe, AL

PostPosted: Mon Nov 06, 2006 1:01 pm    Post subject: Reply with quote

as well as one of my scripts that uses string functions. @len() wouldn't return anything but zero and @substr() wouldn't do anything at all
But it wouldn't pop up any errors

_________________
Visual Dialogscript 5
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
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