Write Your Own Tools and Utilities - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Write Your Own Tools and Utilities

Description:

Create GUIs on top of console-based apps. Automated testing utilities. Application ... Create GUIs for editing elements (replace the built-in dialog boxes) ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 25
Provided by: fwer
Category:
Tags: guis | tools | utilities | write

less

Transcript and Presenter's Notes

Title: Write Your Own Tools and Utilities


1
Write Your Own Tools and Utilities
Fred Wersan MAK Technologies fwersan_at_mak.com
2
Session Outline
  • Intro
  • Demonstration
  • Guidelines
  • String replacement
  • Macros
  • Scripts with AutoIt
  • Framescript (non-Framers think Visual Basic)
  • Brainstorming
  • Q A

3
Why Write Your Own Tools?
  • Repetitive, boring work procedures
  • Commercial apps dont do everything
  • 3rd party plug-ins dont cover all gaps
  • Quick response to local need
  • Extend skills add value
  • Sense of accomplishment
  • Its fun

4
Demonstrations
  • Being a demonstration of button bars and tools
    for automating frequent and not-so-frequent
    procedures

5
General Guidelines
  • Any procedure that requires a repeatable set of
    keystrokes is a candidate for a script.
  • A procedure that requires a repeatable mix of
    keystrokes and mouse movement might be a
    candidate for a script.
  • Procedures that are mostly mouse-based are
    hardest to script.

6
Another Guideline
  • Procedures that require assessing the state of an
    application or reading the contents of windows or
    dialog boxes can be difficult to script with
    generic scripting applications, but may be
    accessible using specialized scripting programs,
    e.g., FrameScript, VB for Applications.

7
String Replacement
  • A short string gets replaced by a long string

8
Macros
  • Repeat a series of common menu commands/keystrokes
  • Can manipulate menus and dialog boxes
  • Might include mouse control
  • Might include variables and logic

9
Good Tasks for Macros
  • Indexing
  • Invert entries
  • Add formatting codes
  • Text formatting

10
Mechanics
  • Record as you do the task
  • Timing issues
  • Errors
  • Type a series of commands in a macro editor

11
Demonstration
  • Macro Express

12
Scripting with AutoIt
  • Simple scripting language
  • Variables
  • Conditional logic
  • Loops
  • Functions (subroutines)
  • Function libraries (include)
  • GUI library

13
Script Ideas
  • Button bars for common tasks
  • Control panels for running applications or
    special scripts
  • Automate UI tasks
  • Create GUIs on top of console-based apps
  • Automated testing utilities
  • Application configuration

14
Basic Syntax
  • Activating windows
  • Getting values from a window
  • Sending commands to the GUI
  • Variables
  • Looping
  • Functions

15
GUI Functions
  • Windows
  • Tabs
  • Input boxes

16
Demonstration
  • Find/Wrap code
  • Getting data from Notepad
  • Create Control Objects test in VR-Forces

17
Framescript
  • Scripting language on top of FrameMaker SDK.
  • Doc is hard to use, but good user community.
  • Scripts run fast.

18
FrameScript Demonstration
  • Save files to particular format
  • Compare chapter TOCs to headings
  • Delete conditional text
  • Change formatting
  • Color code comments

19
Framescript Demos 2
  • Split up elements
  • Event scripts
  • Create GUIs for editing elements (replace the
    built-in dialog boxes)

20
Brainstorm Tech Writer Utilities
  • What utilities do you wish you had?

21
Questions?
  • Q. I want to automate a process that references a
    menu, but the menu commands might change. How can
    I tell whats on the menu?
  • There may be cases where a portion of a procedure
    isnt predictable enough or your scripting tool
    isnt smart enough to figure things out. However,
    if your scripting tool lets you pause a script
    (Macro Express and AutoIt support pausing), you
    can stop at the place that requires an injection
    of intelligence, do the right thing, then
    continue the script. The PDF utility I showed
    demonstrated this. When I added chapter numbers
    to the chapter titles in the bookmarks, the
    script asked how many chapters there were,
    automatically inserted numbers, then asked how
    many appendices there were and then inserted the
    letters. There is no way to figure that out
    automatically, but scripting the boring
    repetitious stuff still saves a lot of time.

22
Resources
  • Leximation http//www.leximation.com/toolsearch/.
  • Zillions of scripting languages
  • Perl
  • Javascript
  • Python
  • Visual Basic for Windows

23
Sources
  • Macro Express http//www.wintools.com/automation.
    htm
  • AutoIt http//www.autoitscript.com/
  • Framescript http//www.framescript.com/
  • XN Resource Editor (for editing DLLs so you can
    make the FrameMaker Marker dbx bigger (edit
    fmdlg.dll, the Ins_marker dialog be sure to
    save a backup)) http//www.wilsonc.demon.co.uk/del
    phi.htm

24
  • Fred WersanMAK Technologiesfwersan_at_mak.com
Write a Comment
User Comments (0)
About PowerShow.com