Autoclic - automatisation de windows

Description

Ce programme permet d'automatiser le fonctionnement d'un programme selon un script.
Il bouge la souris, clique et envoie des touches à votre place.

Fonctions abordées :
- connection directe à une DLL
- tray icon (création et changement dynamique)
- menu sur tray icon
- programme tournant en tâche de fond
- déplacement et clic de la souris
- simulation de touches clavier
- langage de script

Il faut copier une dll (autoclicdll.dll, contenue dans le zip avec les sources) qui permet de lancer et d'arréter le script par les touches Shift-F11 et Shift-F12.

Source / Exemple :


Liste des commandes et des touches :

COMMANDS : (not case sensitive)
-----------
REM text		: remark, ignore the line
STOP			: stop the script
REPEAT x		: repeat the script x time (default = never end)
MOUSEMOVE x y		: move the mouse pointer to (x,y) position of the screen
MOUSEMOVEREL x y	: move the mouse pointer, relative to the actual position
MOUSEMOVEWIN x y	: move the mouse pointer to (x,y) position of the current window
MOUSECLIC x		: clic left mouse button and wait x milliseconds (default is zero)
MOUSECLICRIGHT x	: clic right mouse button and wait x milliseconds (default is zero)
WAIT x			: wait x milli-seconds (x can be a variable)
KEYSEND text x		: send "text" to the keyboard (see below for special keys) and wait x milliseconds (default is zero)
WINDOWALLFIND text	: find all windows that begins with "text" (done only one time)
WINDOWNEXT		: select next window (found by WINDOWALLFIND)
WINDOWACTIVATE		: activate current window (after WINDOWNEXT)
IMAGELOAD name x	: load one bmp picture from "name" (ie c:\image.bmp) and save it with number x (done only one time)
LABEL name		: define a label (use by GOTO command)
GOTO name		: jump to the label
INCLUDE text		: include another script, text is the name of the script (ie c:\test2.txt), maximum 5 level of include

DECLARE var type value	: declare the variable "var" with type (num=numeric, string=string) initialize with "value",
			  if value is empty the variable is initialize with 0 or "", (done only one time)
SET var x		: set the value of variable "var" to "x"
ADD var x		: add "x" to numeric variable "var"
RANDOM var x y		: set the value of variable "var" to a random value between x and y (include)
			  "var" must be a numeric variable
IFEQGOTO var value label: if variable "var" equal "value" then goto "label"
IFLTGOTO var value label: if variable "var" is lower than "value" then goto "label"
IFGTGOTO var value label: if variable "var" is greater than "value" then goto "label"
IFERRORGOTO label	: if error then goto "label" (see commands that generate error)

"x" or "y" can be an integer variable or a number
"value" can be a string, a variable or a number

SPECIAL KEYS : (case sensitive)
--------------
%% = %
%_ or %SPACE% = space
%= or %ENTER% = return (enter)
%s or %SHIFT% = shift
%c or %CONTROL% = control
%a or %ALT% = alt
%e or %ESC% = esc
%! or %DELETE% = del
%u or %UP% = up arrow
%d or %DOWN% = down arrow
%l or %LEFT% = left arrow
%r or %RIGHT% = right arrow
%b or %BACKSPACE% = backspace
%t or %TAB% = tab
%p or %PAGEUP% = prior (page up)
%n or %PAGEDOWN% = next (page down)
%* or %END% = end
%h or %HOME% = home
%1 to %0 or %F1% to %F0% = F1 to F10
%, or %F11% = F11
%; or %F12% = F12

EXEMPLE DE SCRIPT:
-------------------
mousemove 585 465
mouseclic
wait 100
mousemove 710 505
mouseclic
wait 1500
keysend %a%l
wait 2000

Conclusion :


Le script boucle sans fin. A la dernière ligne, on recommence la première ligne.

Une icone (tray icon) à coté de l'horloge permet de charger un script, de le lancer, de l'arréter, de le modifier et de quitter.
Le script démarre deux secondes après le lancement.
Le script s'arrête lorsque la souris est sur la zone des icônes windows (tray icon) à coté de l'horloge.
(ou lorsqu'on l'arrête !)

Un exécutable est présent dans le zip (ex_).

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.