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 


Visual DialogScript DOM DSU

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript Open Source Projects
View previous topic :: View next topic  
Author Message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sat Apr 09, 2011 7:16 pm    Post subject: Visual DialogScript DOM DSU Reply with quote

4/20/2011. No further updates forthcoming (from cnodnarb). Please continue the project or use the project if it matches what you need.

Please see new control at http://www.vdsworld.com/forum/viewtopic.php?p=36248 based on http://www.vdsworld.com/forum/viewtopic.php?p=36237.

UPDATED 4/12/2011: createfocused, setfocus and @getelementcount added.
UPDATED 4/11/2011: inserthtml added. update 2 in the PM @browsergetid added. Eliminated use of global variables, only %1 - %9 are used. Eliminated errortraps within DSU.
UPDATED 4/10/2011: @getlargeattribute and execcommand added.

UPDATE: Encountered a less is more situation. Majority of commands and functions have been replaced with @getattribute and setattribute.

Please be aware that HTML attributes are case sensitive: innerHTML

PLEASE feel free to extend and correct this project. If you create new commands/functions you must include an updated vdsdom50.txt document.

vdsdom50.txt (technical documentation)

Limitations: Causes bad behavior in @dlgtext(<browser control>) function.
Cannot access @getattribute() in unsaved browser document.
@getlargeattribute() deletes all but text clipboard content. No workaround.

Workarounds
Code:

rem @dlgtext(browser1) workaround
%x = @getlargeattribute(browser1,tag,html,outerHTML,0)
rem had used other vdsdom.dsu commands/functions in unsaved html, have to save the browser before using @getattribute()
dialog set,browser1,%x
browser savefile,@path(%0)temp.html
dialog set,browser1,@path(%0)temp.html
%x = @getattribute(browser1,tag,font,name,0)


VDSDOM50.TXT
Code:
@GETATTRIBUTE
 
Syntax:

 @GETATTRIBUTE(<control name>,<HTML DOM type>,<HTML DOM value>,<attribute>,<HTML DOM array>)

Description:
 The purpose of this function is to return the value of HTML tag attribute.

 The <HTML DOM type> argument may be ID, Tag or Name.

 The <HTML DOM value> argument is the pointer to the <HTML DOM type>.

 The <HTML DOM array> agrument specifies which HTML document element occurence (not needed when <HTML DOM type> is equal to ID).

OK:
 Unchanged.

Example:

   %x = @GETATTRIBUTE(BROWSER1,TAG,DIV,ID,0)

Notes:
   Max size ~<4096 bytes.

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
@GETLARGEATTRIBUTE
 
Syntax:

 @GETLARGEATTRIBUTE(<control name>,<HTML DOM type>,<HTML DOM value>,<attribute>,<HTML DOM array>)

Description:
 The purpose of this function is to return the value of HTML tag attribute.

 The <HTML DOM type> argument may be ID, Tag or Name.

 The <HTML DOM value> argument is the pointer to the <HTML DOM type>.

 The <HTML DOM array> agrument specifies which HTML document element occurence (not needed when <HTML DOM type> is equal to ID).

OK:
 Unchanged.

Example:

   %x = @GETLARGEATTRIBUTE(BROWSER1,TAG,DIV,ID,0)
Notes:
   Deletes all clipboard data types except 'Text'. Size limit clipboard text size.

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
@GETBROWSERID
 
Syntax:

 @GETBROWSERID()

Description:
  The purpose of this function is to return the window identifier of the first browser control on a window dialog.

OK:
 Unchanged.

Example:
   WINDOW SEND,@GETBROWSERID(),"An example would be <HR></HR>, which does not create a horizontal rule, but sends the text."

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
@GETELEMENTCOUNT
 
Syntax:

 @GETELEMENTCOUNT(<control name>,<HTML DOM type>,<HTML DOM value>)

Description:
  The purpose of this function is to return the count of HTML elements.

OK:
 Unchanged.

Example:
   %x = @GETELEMENTCOUNT(BROWSER1,TAG,INPUT)
See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
SETATTRIBUTE
 
Syntax:

SETATTRIBUTE <control name>,<HTML DOM type>,<HTML DOM value>,<attribute>,<string>,<HTML DOM array>

Description:
  The purpose of this command is to set the value of HTML tag attribute.

 The <HTML DOM type> argument may be ID, Tag or Name.

 The <HTML DOM value> argument is the pointer to the <HTML DOM type>.

 The <HTML DOM array> agrument specifies which HTML document element occurence (not needed when <HTML DOM type> is equal to ID).


OK:
 Unchanged.

Example:

   SETATRRIBUTE BROWSER1,TAG,DIV,TITLE,Mouseover DIV0,0

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
SELECTADDOPTION
 
Syntax:

SELECTADDOPTION <control name>,<HTML DOM type>,<HTML DOM value>,<string>,<HTML DOM array>

Description:
  The purpose of this command is to add a new option to a form select document element. 

 The <HTML DOM type> argument may be ID, Tag or Name.

 The <HTML DOM value> argument is the pointer to the <HTML DOM type>.

 The <HTML DOM array> agrument specifies which HTML document element occurence (not needed when <HTML DOM type> is equal to ID).


OK:
 Unchanged.

Example:

   SELECTADDOPTION BROWSER1,ID,myselect,Item 11

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
SELECTREMOVEOPTION
 
Syntax:

SELECTREMOVEOPTION <control name>,<HTML DOM type>,<HTML DOM value>,<INDEX>,<HTML DOM array>

Description:
  The purpose of this command is to remove an option from a form select document element. 

 The <HTML DOM type> argument may be ID, Tag or Name.

 The <HTML DOM value> argument is the pointer to the <HTML DOM type>.

 The <HTML DOM array> agrument specifies which HTML document element occurence (not needed when <HTML DOM type> is equal to ID).


OK:
 Unchanged.

Example:

   SELECTREMOVEOPTION BROWSER1,TAG,SELECT,5,1
rem removes the 6th item in the 2nd select in the document

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
BROWSERNOSCROLL
 
Syntax:

BROWSERNOSCROLL <control name>

Description:
  The purpose of this command is to remove scrollbars from a BROWSER control.

OK:
 Unchanged.

Example:

   BROWSERNOSCROLL BROWSER1

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
BROWSERNORCLICK
 
Syntax:

BROWSERNORCLICK <control name>

Description:
  The purpose of this command is to dissallow the right click context menu in an browser control.

OK:
 Unchanged.

Example:

   BROWSERNORCLICK BROWSER1

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
MAKEFLAT
 
Syntax:

MAKEFLAT <control name>

Description:
  The purpose of this command is to flatten the border of a control.

OK:
 Unchanged.

Example:

   MAKEFLAT BROWSER1
   MAKEFLAT BUTTON1

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
BROWSERZOOM
 
Syntax:

BROWSERZOOM <control name>,<integer>

Description:
  The purpose of this command is to set the zoom level of a BROWSER control.

OK:
 Unchanged.

Example:

   BROWSERZOOM BROWSER1,75
rem zoom to 75%

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
EXECCOMMAND
 
Syntax:

EXECCOMMAND <control name>,"'<execcommand>',boolean,'<parameter>'"

Description:
  The purpose of this command is to excecute a command in the HTML document.

OK:
 Unchanged.

Example:
   EXECCOMMAND BROWSER1,"'ForeColor',false,'#FF0033'"

See also:

@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
INSERTHTML
 
Syntax:

INSERTHTML <control name>,<HTML>

Description:
  The purpose of this command is to insert HTML into the selected range (creates a new range if none selected) of an HTML document.

OK:
 Unchanged.

Example:
   INSERTHTML BROWSER1,<HR></HR>

See also:
@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
CREATEFOCUSED
 
Syntax:

CREATEFOCUSED <control name>

Description:
  The purpose of this command is to create the focused attribute on all elements within an HTML document.
After initializing, focused attribute can be retrieved using the @getattribute() function.

OK:
 Unchanged.

Example:
   CREATEFOCUSED BROWSER1

See also:
@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS
========================================================================================================================================
SETFOCUS
 
Syntax:

SETFOCUS <control name>,<HTML DOM type>,<HTML DOM value>,<HTML DOM array>

Description:
  The purpose of this command is to set focus of an HTML Document element.

OK:
 Unchanged.

Example:
   SETFOCUS BROWSER1,TAG,INPUT,0

See also:
@GETATTRIBUTE   @GETLARGEATTRIBUTE   @GETBROWSERID   @GETELEMENTCOUNT   SETATTRIBUTE   SELECTADDOPTION   SELECTREMOVEOPTION
BROWSERNOSCROLL   BROWSERNORCLICK   MAKEFLAT   BROWSERZOOM   EXECCOMMAND   INSERTHTML   CREATEFOCUSED   SETFOCUS



vdsdom50.dsc
 Description:
Source code for vdsdom.dsu

Download
 Filename:  vdsdom50.dsc
 Filesize:  6.54 KB
 Downloaded:  1543 Time(s)


vdsdom50.dsu
 Description:
vdsdom.dsu BINARY

Download
 Filename:  vdsdom50.dsu
 Filesize:  6.32 KB
 Downloaded:  1498 Time(s)


vdsdom50.txt
 Description:
Technical Documentation

Download
 Filename:  vdsdom50.txt
 Filesize:  10.84 KB
 Downloaded:  2995 Time(s)

Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript Open Source Projects All times are GMT
Page 1 of 1

 
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