Escolar Documentos
Profissional Documentos
Cultura Documentos
What is DP?
DP stands for Descriptive Programming
Many reasons
You have to
Functions & Recovery scenarios work with different actions
Different actions = Different ORs
Do I know you?
Cant be sure
You have to
Cant record certain objects
Auto-hide panels Objects with changing hierarchies Nested inner-objects, Sub menus
Even when you think you got it, all the properties turn out null
Simplicity
Why kill a fly with an atom bomb?
No need to use the OR for every one-time click button in the application
And,
You can do VERY cool things with DP
OK, bring it on
Well, yes, but under the hood, DP & the OR work the same way
To understand the OR, is to understand DP
=
How can I identify you?
=
Your height = 400 Your title = NotePad You are visible (=True)
OK, I get it, theres nothing more than properties and values Can we get on with it?
How do I
1
Throw the properties and values straight into a command
Its the good old syntax you know, except the string between the () is not the OR name. Its the property:=value identification string
No problem:
VBWindow(height:=400, title:=New Document).Maximize
All fine and well, but what if I want to use regular expressions?
No problem:
VBWindow(title:=.*Document.*).Maximize
ID strings are automatically interpreted as regular expressions
2
Throw the properties & values into a description object, and throw IT into the command
Here also, all the values are interpreted as regular expressions. To turn it off, use oDesc(Property1).RegularExpression = False
When you want to execute multiple commands on an object, method 2 is a better choice by far
(allows one-time definitions, multiple uses)
Right you are Well cover some of the more popular tricks and tips
These examples are only the tip of the iceberg. Play with them and see the true power of DP
DP has a magic property: index, which allows us to tell the double objects apart Index is a zero-based counter
All is well
I dont know who you are, or how many are you, but I want to mark all of you!
OK, this is indeed cool, but it only gets us the inner controls of a given window. Can we also get the applications top level windows?
Sure