Suite au message de @thomas , j'ai décidé de faire un programme pour automatiser l'automatisation d'une installation.
Le but du programme est d'enregistrer les actions lors d'une installation, pour ne plus avoir besoin de jouer avec AutoIt Window Info.
Utilisation :
1) Lancez le programme à installer
2) Lancez ce programme (s'il ne l'est pas déjà)
3) Installez le programme du 1)
4) Appuyez sur F1
5.1) Renseignez un nom de fichier pour enregistrer le script généré
5.2) Ne renseignez pas de fichier pour mettre le script généré dans le presse papier
6) Recommencez à partir de 1) ou appuyez sur F2 pour quitter
Et voilà ! Votre script est généré !
Le mieux reste de le tester pour vérifier que tout est bon (peut être qu'il faudra ajouter un Sleep ou 2 pour que tout se déroule bien)
Il faudra aussi penser à ajouter la ligne Run() pour lancer le l'installation du dit programme.
[Ex] Automatiser l'automatisation d'une installation
Règles du forum
- Merci de consulter la section "Règles du forum" et plus particulièrement "Règles et Mentions Légales du site autoitscript.fr" avant d'écrire un message.
- TommyDDR
- Modérateur
- Messages : 2086
- Enregistré le : mar. 22 juil. 2008 21:55
- Localisation : Nantes
- Status : Hors ligne
[Ex] Automatiser l'automatisation d'une installation
- Fichiers joints
-
- _IsPressedToString.au3
- (4.7 Kio) Téléchargé 1054 fois
-
- install.au3
- (4.98 Kio) Téléchargé 1067 fois
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
Re: [Ex] Automatiser l'automatisation d'une installation
Merci ^^
le programme généré retourne une erreur:
"Setup Was cancelled or ran into an unexpected error
La méthode DragMove ne peut être appelée que lorsque le bouton principal de la souris est enfoncé"
voici le programme généré:
le programme généré retourne une erreur:
"Setup Was cancelled or ran into an unexpected error
La méthode DragMove ne peut être appelée que lorsque le bouton principal de la souris est enfoncé"
voici le programme généré:
Code : Tout sélectionner
#include <AutoItConstants.au3>
#RequireAdmin
install()
Func install()
Local $hwnd
Local $selector
$hwnd = winWaitVisible("PDFCreator")
Sleep(250)
$selector = 0
winWaitVisible($hwnd, $selector)
ControlClick($hwnd, "", $selector, "left", 1, 841, 125)
ControlClick($hwnd, "", $selector, "left", 1, 583, 210)
ControlClick($hwnd, "", $selector, "left", 1, 727, 525)
ControlClick($hwnd, "", $selector, "left", 1, 652, 521)
$hwnd = winWaitVisible("PDFCreator")
Sleep(250)
$selector = 0
winWaitVisible($hwnd, $selector)
ControlClick($hwnd, "", $selector, "left", 1, 138, 514)
$hwnd = winWaitVisible("PdfCreator")
Sleep(250)
$selector = 0
winWaitVisible($hwnd, $selector)
ControlClick($hwnd, "", $selector, "left", 1, 843, 24)
EndFunc
Func winWaitVisible($hwnd, $ctrlId = Null)
Local $hwndCheck
While 1
$hwndCheck = $ctrlId == Null ? $hwnd : ControlGetHandle($hwnd, '', $ctrlId)
If(BitAND(WinGetState($hwnd), $WIN_STATE_VISIBLE) == $WIN_STATE_VISIBLE) Then ExitLoop
Sleep(10)
WEnd
Return WinGetHandle($hwnd)
EndFunc
Re: [Ex] Automatiser l'automatisation d'une installation
Bonjour.
Cela a l'air intéressant, mais je ne comprends pas les instructions à suivre ?
C'est quel programme qu'il faut lancer à l'étape 2 ?
Cela a l'air intéressant, mais je ne comprends pas les instructions à suivre ?
C'est quel programme qu'il faut lancer à l'étape 2 ?
- TommyDDR
- Modérateur
- Messages : 2086
- Enregistré le : mar. 22 juil. 2008 21:55
- Localisation : Nantes
- Status : Hors ligne
Re: [Ex] Automatiser l'automatisation d'une installation
Le programme à lancer est celui fourni dans le post 1 : install.au3
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
Re: [Ex] Automatiser l'automatisation d'une installation
TommyDDR or thomas do you already have a working script that I can use?
from Automate the automation of an installation ?
If so can I get an update of the script.
maybe with an example in it of the application.
Because I would like to have a starting script to make a setup of eg Foxit Reader, or VLC Player etc...
Greatz
from Automate the automation of an installation ?
If so can I get an update of the script.
maybe with an example in it of the application.
Because I would like to have a starting script to make a setup of eg Foxit Reader, or VLC Player etc...
Greatz
- TommyDDR
- Modérateur
- Messages : 2086
- Enregistré le : mar. 22 juil. 2008 21:55
- Localisation : Nantes
- Status : Hors ligne
Re: [Ex] Automatiser l'automatisation d'une installation
script works fine for me (just tested few minutes ago to be sure)
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679