[..] Fenêtre bloquant les Hotkey
Posté : jeu. 03 oct. 2013 21:55
Bonsoir,
Ça fait longtemps que je n'ai pas posté de sujet ici
En fait, comme taper des clés d'activation est très fastidieux, surtout quand on en a un grand nombre à taper, j'ai pensé à faire un programme simple pour automatiser tout ça.
Voici le code pas fini, $serial est la clé à entrer automatiquement, quand on appuie sur la touche CTRL de gauche, ça envoit le premier bloc, puis le deuxième et ainsi de suite...
Cela marche parfaitement sauf que j'ai essayé de rentrer le numéro d'activation pour l'extension The Warchiefs de Age of Empire III et pas moyen d'utiliser le Hotkey, la fonction n'est pas appelée (j'ai mis une MsgBox et rien n'est apparut), pourtant sur les autres fenêtres ça marche...
Avez-vous une idée de comment outrepasser ce problème ? (mon programme étant fait pour être universel, j'utilise Send et non les contrôles edit du programme on fonction)
Voici ce que me renvoi Autoit3Info à propos de la fenêtre en question :
Merci d'avance 
Ça fait longtemps que je n'ai pas posté de sujet ici
En fait, comme taper des clés d'activation est très fastidieux, surtout quand on en a un grand nombre à taper, j'ai pensé à faire un programme simple pour automatiser tout ça.
Voici le code pas fini, $serial est la clé à entrer automatiquement, quand on appuie sur la touche CTRL de gauche, ça envoit le premier bloc, puis le deuxième et ainsi de suite...
Code : Tout sélectionner
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: Le Solutionneur
Script Function:
Allows to easily input serials without manually copying them
#ce ----------------------------------------------------------------------------
$serial = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
$aSerialComponents = StringSplit($serial, "-", 3)
$currComponent = 0
HotKeySet("{LCTRL}", "InputCurrentComponent")
While 1
Sleep(100)
WEnd
Func InputCurrentComponent()
; If we have already have input all components
If UBound($aSerialComponents) <= $currComponent Then
EndInput()
EndIf
; Send the current component
Send($aSerialComponents[$currComponent])
; Go to next component
$currComponent += 1
; If we have already have input all components
If UBound($aSerialComponents) <= $currComponent Then
EndInput()
EndIf
EndFunc
Func EndInput()
MsgBox(64, "Success", "The serial has been fully input")
Exit
EndFunc
Avez-vous une idée de comment outrepasser ce problème ? (mon programme étant fait pour être universel, j'utilise Send et non les contrôles edit du programme on fonction)
Voici ce que me renvoi Autoit3Info à propos de la fenêtre en question :
Code : Tout sélectionner
>>>> Window <<<<
Title: Age of Empires III - The WarChiefs
Class: #32770
Position: 1069, 499
Size: 416, 200
Style: 0x94C808C4
ExStyle: 0x00010101
Handle: 0x000000000055054E
>>>> Control <<<<
Class: Static
Instance: 2
ClassnameNN: Static2
Name:
Advanced (Class): [CLASS:Static; INSTANCE:2]
ID: 1001
Text: In the boxes below, type your 25-character Product Key. You'll find this number on your Certificate of Authenticity on the back of the CD packaging.
Position: 11, 28
Size: 389, 39
ControlClick Coords: 143, 11
Style: 0x50000000
ExStyle: 0x00000004
Handle: 0x0000000000220446
>>>> Mouse <<<<
Position: 1226, 564
Cursor ID: 0
Color: 0xF0F0F0
>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
Please Enter your Product Key.
In the boxes below, type your 25-character Product Key. You'll find this number on your Certificate of Authenticity on the back of the CD packaging.
Product Key:
-
-
-
-
OK
Cancel
>>>> Hidden Text <<<<