Git Product home page Git Product logo

vbs's Introduction

vbs

Visul basic script module for python

allows python to:

synthesize keyboard input, create visual basic style alerts and use text-to-speech

Windows only


useage:

Text to Speech

import vbs
vbs.tts("words to speak")

Alerts

import vbs
vbs.alert("alert body", boxtype="yesno", title="title text")

Synthesize keyboard input

import vbs
vbs.sendkeys("keys to send")

Other infomation:

all functions are blocking

vbs.sendkeys:

acts as if all keys in string are pressed in order near instantly.
script contiunes once all keys are sent.
sending special keys such as backspace ({bs}) or enter (~) can be found by referencing
KEY CODE
BACKSPACE {BACKSPACE} or {BS}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
CLEAR {CLEAR}
DELETE {DELETE} or {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER (numeric keypad) {ENTER}
ENTER ~
ESC {ESCAPE} or {ESC}
HELP {HELP}
HOME {HOME}
INS {INSERT}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
RETURN {RETURN}
RIGHT ARROW {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW {UP}
F1 through F15 {F1} through {F15}

vbs.alert:

alert times out by default after 100 minutes.
this can be changed by passing a different value to the timeout optional argument.
which is passed as an integer number of secounds.

you can change the type of alert by a value to the optional argument boxtype.
possible values are
"okay", "cancel", "cancelable", "retry", "yesnocancel", "yesno", "warning", "critical", "info"

this function then returns one of the following strings:
"ok", "cancel", "abort", "retry", "ignore", "yes", "no"

you can change the title of the alert by passing a string to the option title argument

vbs.tts:

calling tts freezes execution path untill entire messege is spoken
then returns "done" as a string

vbs's People

Contributors

paulfears avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.