Visionary
Help

Contents

     I. Introduction
     II. For Casual Users
     III. For Advanced Users
     IV. Registration
     V. Disclaimer and License
     VI. Python License & Copyright
     VII. Contact Information
 

I. Introduction

Visionary is a little macro utility with a powerful punch. 

For some users, this punch means being able to use killer Visionary scripts such as the Instant Healer or Mana Refresher scripts in games like Blizzard's Diablo II in order to improve play and reaction time. The library of Visionary scripts will continually grow and be augmented by the Cleverdevs as well as others in the Internet community. If you are interested in simply using Visionary's scripts, see section II, "For Casual Users."

For other's Visionary will be the ultimate macro tool! Visionary incorporates a scripting engine known as Python to allow maximum customizability and programmability. Using Visionary's expanded version of Python, users can program simulated mouse clicks and keystrokes that react to visual stimuli on the computer screen. This is how Instant Healer works, it periodically "looks" to see if your health has fallen below a certain level, and if it has, it takes the necessary corrective action. This same principle can be applied to help you with almost any real time strategy game, and can help you automate tasks with business and office applications.

II. For Casual Users

The basic Visionary interface is quite simple, it consists of a combo box where you can pick a script to run, and a "Run" button to start execution of the script selected in the combo box. Below the combo box is a larger description box which will contain a detailed description of the currently selected script. 

To run a script, simply pick the one you want to run, and press the "Run" button!

Visionary makes available all of the Visionary script files (*.vsy) that exist in the same directory as the Visionary executable, so to add new scripts, simply place them in the same directory as Visionary.exe.

III. For Advanced Users

Advanced users will want to edit existing and create new Visionary scripts. You can do this by selection "edit" from the file menu. This will open a simple script editor that will allow you to edit or write Visionary scripts (vsy files are actually just text files, and you can edit them with different editor if you wish).

The scripting language, as mentioned earlier, is Python. A full tutorial in Python is beyond the scope of this document, however, it is an extremely powerful scripting language, and a very good Python tutorial can be found at http://www.python.org/doc/current/tut/tut.html. The Python web site, located at www.python.org is the authority on Python and also has extremely useful information for any Python programmer.

On the toolbar of the script editor are two useful buttons, the "run" button and the "output" button. The "run" button will run the current script that you are editing and is an easy way to test your script directly from the editor. The "output" button will bring up the Python console where output from your Python scripts will appear- for example, output from Python "print" statements will appear here.

Visionary extends Python in two important ways, they are tags and vision functions.

Visionary tags are pre-parsed when the script is selected in the main selection combo box, therefore, they are not executed as part of the script, they simply tell Vsionary something about how to behave as it loads the script. If you are familiar with classic programming compilers, you can think of these tags as being like "compiler directives"- as they serve a similar purpose.

The following tags are supported:

//SHORTDESC: text

The SHORTDESC tag makes Visionary place the text following the tag into the main selection combo box so the user will have a "nice" short description of the script. If the SHORTDESC tag is omitted in a script, the script file name is used in the combo box instead.

//LONGDESC:
  multiple line text block here
//ENDLONGDESC

The LONGDESC and ENDLONGDESC tags function as a pair. They tell Visionary to put the text block that occurs in between into the large description box when the user selects the script in the selection combo.

//BIND MAIN

The MAIN tag tells Visionary that the Python code block following the tag is to be executed immediately after the user presses the "Run" button (the MAIN script is only executed one time per run). For example:

   //BIND MAIN
  print "hello world"

will cause the words "hello world" to be printed in the output window when the "run" button is pressed.

//BIND KEY key

The KEY tag tells Visionary to bind the following Python code block to a certain key press. For example, if you say:

   //BIND KEY A
   print "hello"
   print "world"

Visionary will run the code block (the two print statements) every time the user presses the A key. Note that the key press is interpreted globally, no matter which Windows application has focus. This means you could  be playing Diablo 2 for instance, and the code block would still execute if the A key was pressed!

Control, alt, and shift combinations may be trapped by the KEY tag, like so:

   //BIND KEY CONTROL-A
   print "1"
   //BIND KEY CONTROL-ALT-A
   print "2"
   //BIND KEY CONTROL-ALT-SHIFT-A
   print "3"

Note that it is important to put the words CONTROL, ALT, and SHIFT in the order shown above (for example ALT-CONTROL-A won't work).

//BIND TIMER ms

The TIMER tag causes the code block following the tag  to be executed every ms milliseconds by Visionary. For example,

//BIND TIMER 5000
print "this message appears every 5 seconds"

causes the message in the print statement to be printed every 5000 milliseconds (5 seconds) in the output window.


A general note about tags to keep in mind, the script that follows each tag is considered by Visionary as independent of other tags, that is, variables and functions are local to tags, they are not global through-out tags. 

Vision functions are the second extension to Python that Visionary offers. These functions can be used like any built in Python function, as long as the script is prefixed by the statement:

import vision

Because scripts in tags are independent of each other, you must include the import statement after each tag if you plan to use vision functions within that tag block. You must also prefix any vision function calls with the "vision." qualifier. For example:

   //BIND KEY CONTROL-A
   import vision
   vision.PlayWav("sound1.wav")

   //BIND KEY CONTROL-ALT-A
   import vision
   vision.PlayWav("sound2.wav")

The above script is OK and will cause the sound files "sound1.wav" and "sound2.wav" to be played when the user presses control-a and control-alt-a respectively. The following script, however, contains errors:

   //BIND KEY CONTROL-A
   import vision
   PlayWav("sound1.wav")     # there is an error here because the vision. prefix is missing from the function call

   //BIND KEY CONTROL-ALT-A
   # there is an error here because we forgot to import the vision module!
   vision.PlayWav("sound2.wav")

Using the vision functions, you can simulate keystrokes, mouse movements and clicks, and get information about screen pixels, among other things. Below is a reference of the current functions within the vision module:

GetColor(x,y)
Able to detect generalized shades of colors, this function returns a string that contains "red", "blue", or "green" if the color of the pixel at x,y is close to any of those colors. If the color is not close to any of the primary colors, an empty string is returned.

GetRGB(x,y)
Returns a string that corresponds to the hexadecimal color values of the pixel at x,y. The string returned is formatted like so: "RRGGBB" where RR is the hex level of red, GG is the hex level of green, and BB is the hex level of blue. For example, if the pixel at x,y is white, then the string "FFFFFF" is returned.

MouseLeftClick()
Simulates a left mouse click at the current mouse x,y coordinate.

MouseRightClick()
Simulates a right mouse click at the current mouse x,y coordinate.

MouseMoveAbs(x,y)
Moves the mouse to the x,y coordinates given (an "absolute" move).

MouseMoveRel(x,y)
Moves the mouse relative to its current location. For example if the mouse is at 320,200 and you issue "MouseMoveRel(10,-5)" then the mouse would be moved to the coordinates 330,195.

MouseX()
Returns the X coordinate of the current mouse pointer position.

MouseY()
Returns the Y coordinate of the current mouse pointer position.

ScreenX()
Returns the width of the current screen resolution.

ScreenY()
Returns the height of the current screen resolution.

KeyDown(key)
Simulates the press of a the given key. "key" is a string that contains a single character, or one of the following special strings:

SPACE, TAB, SHIFT,ENTER, BS,ESC,ALT,F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,UP,DOWN,LEFT,RIGHT

(Note that these special strings work for KeyUp(), and KeySend() too)

This function does not simulate a full keystroke, only the "pressing" part of the keystroke. A call to KeyDown() should always be followed by a call to KeyUp(). The functions KeyDown() and KeyUp() are useful to simulate holding down a key, for example:

# hold the alt key down for 5 seconds
vision.KeyDown("ALT")
vision.Sleep(5000)
vision.KeyUp("ALT")

To send an entire key stroke with one call, use the KeySend() function.

KeyUp(key)
Simulates the release of a the given key.

KeySend(key)
Simulates a full keystroke of the given key- use this to send key strokes to the Windows application that currently has focus.

Sleep(ms)
Momentarily put the script to sleep for ms milliseconds- note that this will not affect scripts in other bind tags.

PlayWav(filename)
Play the wave file designated by the string filename. The wav file must be present in the directory where the Visionary executable is located.

SetBindGlobal(key, value)
GetBindGlobal(key)

It may be useful for scripts in different bind tags to have access to a global variable. To achieve this, use the functions SetBindGlobal and GetBindGlobal.

For example if you set the key "aaa" to the value "123" in one bind tag, you can retrieve the value in another bind tag:

//BIND KEY A
import vision
vision.SetBindGlobal("aaa","123")

//BIND KEY B
# prints "123" after you have pressed the A key!
import vision
print vision.GetBindGlobal("aaa")

 IV. Registration

Why Register?

Unregistered versions of are fully operational. However, unregistered versions of Visionary will stop working after 10 minutes.

NOTE: Registration of this product supports a single copy of this software on a single computer. If the hardware configuration of your computer is significantly modified, then you will have to purchase another registration.

To register, go to the Visionary product page found at www.cleverdevs.com. On the product page, there is a link to register. This link will take you to an electronic order page. At the order page fill out the electronic form. Be sure to enter your email address correctly as your registration code will be emailed to this address.

V. Disclaimer and License

This license does not constitute proof of your license to use the Visionary software. This license is subject to change
without notice.

PLEASE READ THIS LICENSE CAREFULLY BEFORE USING THIS SOFTWARE. BY USING USING
THE SOFTWARE (Visionary), YOU AGREE TO BECOME BOUND BY THE TERMS OF THIS LICENSE.
IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, DO NOT USE THIS SOFTWARE.

DEMO VERSION

Evaluation and Registration.
  
This is not free software. Subject to the terms below, you are hereby licensed to use Visionary for evaluation period
of 10 minutes before it terminates.  To use this software for more than the 10 minute evaluation period a registration
fee is required. Payment and Registration Information is available at:  http://www.cleverdevs.com
 
Unregistered use of Visionary after 10 minute evaluation period is in violation of U.S. and international copyright laws.

The computer program Visionary ("Software") is licensed, not sold, to you by The Clever Developments Group. Visionary
is for use only under the terms of this License, and The Clever Developments Group reserves any rights not expressly
granted to you. You own the media on which the Software is recorded or fixed, but EverCorp retains ownership of
the Software itself.

1. License. This License allows you to:
(a) Use the Software on one (1) computer or local workstation. To "use" the Software means that the Software is
either loaded in the memory (i.e., RAM) of a computer or installed on the permanent memory of a computer
(i.e., hard disk, etc.). One registered copy of Visionary may either be used by a single person who uses the software
personally on one computer, or installed on a single workstation used nonsimultaneously by multiple people, but not both.

(b) Make one copy of the Software in machine readable form solely for backup purposes. As an express condition of
this License, you must reproduce on each copy any copyright notice or other proprietary notice that is on the original
copy supplied by Visionary.

(c) Notwithstanding any other terms in this License, if the Software is licensed as an upgrade or update, then you may
only use the Software to replace previously validly licensed versions of the same software. You agree that the upgrade
or update does not constitute the granting of a second license to the Software (i.e., you may not use the upgrade or
update in addition to the software it is replacing, nor may you transfer the software which is being replaced to
a third party).

2. Restrictions. The Software contains trade secrets in its human perceivable form and, to protect them, you may not
REVERSE ENGINEER, DECOMPILE, DISASSEMBLE OR OTHERWISE REDUCE THE SOFTWARE TO
ANY HUMAN PERCEIVABLE FORM. YOU MAY NOT MODIFY, ADAPT, TRANSLATE, RENT, LEASE,
LOAN OR CREATE DERIVATIVE WORKS BASED UPON THE SOFTWARE OR ANY PART THEREOF.

3. Dual Media. Even if this Visionary product includes the Software on more than one medium (e.g., on a CD, on magnetic
disks, or as a file downloaded from the Internet), you are only licensed to use one copy of the Software as described
in Section 1(a). You may not use the Software stored on the other medium on another computer or common storage
device, nor may you rent, lease, loan or transfer it to another user.

4. Termination. This License is effective to all Registered users of Visionary until terminated. This License will terminate
immediately without notice from Visionary or judicial resolution if you fail to comply with any provision of this License.
Upon such termination you must destroy the Software, and all copies      thereof, and Sections 6, 7 and 8 will survive
any termination.

5. Export Law Assurances. You agree that neither the Software nor any direct product thereof is being or will be shipped,
transferred or re-exported, directly or indirectly, into any country prohibited by the United States Export Administration
Act and the regulations thereunder or will be used for any purpose prohibited by the Act.

6. Limited Warranty. THIS LIMITED WARRANTY IS THE ONLY WARRANTY PROVIDED BY The Clever Developments Group AND ITS LICENSORS EXPRESSLY DISCLAIM ALL OTHER WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE WITH REGARD TO THE SOFTWARE AND ACCOMPANYING WRITTEN MATERIALS. BECAUSE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

7. Limitation of Remedies and Damages. In no event will The Clever Developments Group, its directors, officers, employee or affiliates of any of the foregoing be liable to you for any consequential, incidental, indirect or special damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information and the like), whether foreseeable or unforeseeable, arising out of the use of or inability to use the Software or accompanying written materials, regardless of the basis of the claim and even if The Clever Developments Group or a Clever Developments Group representative has been advised of the possibility of such damage. The Clever Developments Group's liability to you for direct damages for any cause whatsoever, and regardless of the form of the action, will be limited to the the money paid for the Software that caused the damages.

THIS LIMITATION WILL NOT APPLY IN CASE OF PERSONAL INJURY ONLY WHERE AND TO THE EXTENT
THAT APPLICABLE LAW REQUIRES SUCH LIABILITY. BECAUSE SOME JURISDICTIONS DO NOT ALLOW
THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES,
THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

8. General. This License will be construed under the laws of the State of Tennessee, except for that body of law dealing with
conflicts of law. If any provision of this License shall be held by a court of competent jurisdiction to be contrary to law, that
provision will be enforced to the maximum extent permissible, and the remaining provisions of this License will remain in full
force and effect.

DISCLAIMER:

THIS PRODUCT (Visionary) IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND. TO THE MAXIMUM
EXTENT PERMITTED BY APPLICABLE LAW, THE CLEVER DEVELOPMENTS GROUP FURTHER DISCLAIMS ALL
WARRANTIES, INCLUDING WITHOUT LIMITATION ANY IMPLIED OR STATED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE ENTIRE
RISK ARISING OUT OF THE USE OR PERFORMANCE OF THIS PRODUCT AND DOCUMENTATION REMAINS
WITH RECIPIENT. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL
THE CLEVER DEVELOPMENTS GROUP OR ITS SUPPLIERS BE LIABLE FOR ANY CONSEQUENTIAL, INCIDENTAL,
DIRECT, INDIRECT, SPECIAL, PUNITIVE, RECURSIVE, OR OTHER DAMAGES WHATSOEVER (INCLUDING,
WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
BUSINESS INFORMATION, PERSONAL INJURY, DISRUPTION OF FAMILY LIFE, OR OTHER PECUNIARY LOSS)
ARISING OUT OF THIS AGREEMENT OR THE USE OF OR INABILITY TO USE THE PRODUCT, EVEN IF 
THE CLEVER DEVELOPMENTS GROUP HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR
CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO THE RECIPIENT.
 

VI. Python License & Copyright

Visionary makes use of and incorporates the Python scripting language and engine. Please visit the Python web site and let the Python group know what an excellent job they did:

http://www.python.org

Cleverdevs is required by the Python license to display this copyright information:

Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved.

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

VII. Contact Information

Send bug reports and comments to cleverdevs@hotmail.com. For the most up to date contact information, visit the CleverDevs home page at: http://www.cleverdevs.com. Updated versions of this document may be found at the CleverDevs home page.

Any comments, suggestions, or bug reports pertaining to this product are very welcome!