Bonjour,
Je suis entièrement novice au script et à AHK mais après avoir passé une journée entière sur google je n'arrive pas a trouver mon bonheur
J'ai le même soucis que cette personne : https://autohotkey.com/board/topic/7183 ... ackground/
Pour résumer, je cherche à faire un script qui envoie des touches clavier dans une application seulement en background, opur que je puisse utiliser mon ordinateur normalement. J'ai une macro clavier corsair mais si je la lance, je ne peux plus rien faire d'autre.
Dans le post en haut quelqu'un a suggéré un script mais je n'y comprends pas grand chose ; ou trouver l'id de l'application, etc...
Si quelqu'un pourrait m'aider je lui en serai éternellement reconnaissant
Script pour application en background Topic is solved
Re: Script pour application en background
ControlSend
Ca c’est définitivement ce qu’on a besoin ici.
Mais tout d’abord, c’est quoi le non de l’application en arrière-plan?
Ca c’est définitivement ce qu’on a besoin ici.
Mais tout d’abord, c’est quoi le non de l’application en arrière-plan?
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Script pour application en background
La nom de l'application serai archeage sur ce task maanger, mais qu'une seule fenetre/client, pas les deux
https://gyazo.com/8a48c3835c9d160884c3e867c9c351ff
Est-ce possible ? Merci de votre réponse
https://gyazo.com/8a48c3835c9d160884c3e867c9c351ff
Est-ce possible ? Merci de votre réponse
Re: Script pour application en background
C'est un jeu? :0
quelque chose comme ca?
quelque chose comme ca?
Code: Select all
ControlSend, , {Enter}, ahk_exe ArcheAge.exe
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Script pour application en background
Oui
Comment marche cette commande, est-ce qu'elle affecte du coup tout les clients ? Si elle affecte tout les clients d'une machine, cela me va aussi
Vu que je ne sais pas écrire en script, comment transcrire une loop infinie de :
clavier layout azerty
Press "ALT"
wait 90ms
Press "é" (ou 2)
wait 160ms
Release "é" (ou 2)
wait 40ms
Release "ALT"
wait 1000ms
HOLD "&" (ou 1) pendant 15500ms
Release "&"
wait 1000ms
Press "F"
wait 170ms
Release "F"
wait 100ms
Press ' (apostrophe, ou 4)
wait 200ms
Release ' (apostrophe ou 4)
wait 3500ms
Press "S"
wait 10ms
Release "S"
répéter à l'infini
Merci beaucoup, je ne sais pas écrire pour AHK ou en aucun langage :s
Comment marche cette commande, est-ce qu'elle affecte du coup tout les clients ? Si elle affecte tout les clients d'une machine, cela me va aussi
Vu que je ne sais pas écrire en script, comment transcrire une loop infinie de :
clavier layout azerty
Press "ALT"
wait 90ms
Press "é" (ou 2)
wait 160ms
Release "é" (ou 2)
wait 40ms
Release "ALT"
wait 1000ms
HOLD "&" (ou 1) pendant 15500ms
Release "&"
wait 1000ms
Press "F"
wait 170ms
Release "F"
wait 100ms
Press ' (apostrophe, ou 4)
wait 200ms
Release ' (apostrophe ou 4)
wait 3500ms
Press "S"
wait 10ms
Release "S"
répéter à l'infini
Merci beaucoup, je ne sais pas écrire pour AHK ou en aucun langage :s
Re: Script pour application en background
Remplace "wait 2000ms" par Sleep, 2000
"hold R" par ControlSend, , {R down}, ahk_exe ArcheAge.exe
"release R" par ControlSend, , {R up}, ahk_exe ArcheAge.exe
"press S" par ControlSend, , S, ahk_exe ArcheAge.exe
"hold R" par ControlSend, , {R down}, ahk_exe ArcheAge.exe
"release R" par ControlSend, , {R up}, ahk_exe ArcheAge.exe
"press S" par ControlSend, , S, ahk_exe ArcheAge.exe
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Script pour application en background
Code: Select all
ControlSend, , {Alt down}, ahk_exe ArcheAge.exe
Sleep, 90
ControlSend, , {2 down}, ahk_exe ArcheAge.exe
Sleep, 160
ControlSend, , {2 up}, ahk_exe ArcheAge.exe
Sleep, 40
ControlSend, , {Alt up}, ahk_exe ArcheAge.exe
Sleep, 1000
ControlSend, , {1 down}, ahk_exe ArcheAge.exe
Sleep 15500
ControlSend, , {1 up}, ahk_exe ArcheAge.exe
Sleep 1000
ControlSend, , {F down}, ahk_exe ArcheAge.exe
Sleep, 170
ControlSend, , {F up}, ahk_exe ArcheAge.exe
Sleep 100
ControlSend, , {4 down}, ahk_exe ArcheAge.exe
Sleep 200
ControlSend, , {4 up}, ahk_exe ArcheAge.exe
Sleep 3500
ControlSend, , {S down}, ahk_exe ArcheAge.exe
Sleep 10
ControlSend, , {S up}, ahk_exe ArcheAge.exe
Est-ce que cela semble correct ? Comment le faire tourner en boucle a l'infini ? S'appliquera-t-il a tout les clients ou seulement a un seul ? (Je ne peux pas tester aujourd'hui)
Merci bcp de ton aide
Re: Script pour application en background
Encore une chose, est-il possible d'utiliser le PID de l'application pour cibler quelle fenêtre recevra la commande ? Et ainsa dédoubler le scirpt a plusieurs clients désirés ? par exemple :
etc... ?
Code: Select all
ControlSend, , {2 down}, ahk_exe ArcheAge.exe//pid-x1
ControlSend, , {2 down}, ahk_exe ArcheAge.exe//pid-x2
Sleep, 160
ControlSend, , {2 up}, ahk_exe ArcheAge.exe//pid-x1
ControlSend, , {2 up}, ahk_exe ArcheAge.exe//pid-x2
Sleep, 40
Re: Script pour application en background
Des boucles ce fais comme-ci
ca c 6 fois, mets pas de chiffre pour infini
mais je recommende de mettre un hotkey d'urgence pour arreter le script nimporte quand
Esc::ExitApp
Code: Select all
Loop 6 {
controlsend,, k, ahk_exe ArchAge.exe
}
mais je recommende de mettre un hotkey d'urgence pour arreter le script nimporte quand
Esc::ExitApp
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Script pour application en background
Peux-tu me montrer comment écrire le control send pour le PID d'une application spécifique ? Comme je l'ai formulé plus haut
Re: Script pour application en background
Tu dois déterminer le pid.... mais disons que tu le sais...
controlsend, , K, ahk_pid 173728
controlsend, , K, ahk_pid 173728
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Script pour application en background
Oui je le sais, merci beaucoup de ton aide je vais voir si j'arrive a faire marcher le bazar je te tiens au courant , Merci énormément !
Re: Script pour application en background
pas de problemes!
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Script pour application en background
Hmm rien ne se passe ,même en mode fenêtré/DX9
Code: Select all
#NoEnv
F10::ExitApp
Loop {
ControlSend, , {Alt down}, ahk_pid 12912 ArcheAge.exe
Sleep, 90
ControlSend, , {2 down}, ahk_pid 12912 ArcheAge.exe
Sleep, 160
ControlSend, , {2 up}, ahk_pid 12912 ArcheAge.exe
Sleep, 40
ControlSend, , {Alt up}, ahk_pid 12912 ArcheAge.exe
Sleep, 1000
ControlSend, , {1 down}, ahk_pid 12912 ArcheAge.exe
Sleep 15500
ControlSend, , {1 up}, ahk_pid 12912 ArcheAge.exe
Sleep 1000
ControlSend, , {F down}, ahk_pid 12912 ArcheAge.exe
Sleep, 170
ControlSend, , {F up}, ahk_pid 12912 ArcheAge.exe
Sleep 100
ControlSend, , {4 down}, ahk_pid 12912 ArcheAge.exe
Sleep 200
ControlSend, , {4 up}, ahk_pid 12912 ArcheAge.exe
Sleep 3500
ControlSend, , {S down}, ahk_pid 12912 ArcheAge.exe
Sleep 10
ControlSend, , {S up}, ahk_pid 12912 ArcheAge.exe
}
Re: Script pour application en background
Essaye avec ca?
SendMode InputThenPlay
defois les jeux sont tenaces :/
SendMode InputThenPlay
defois les jeux sont tenaces :/
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Script pour application en background
Ton loop n'est jamais exécuté dans la mesure où:
Par ailleurs, es-tu certain de la valeur du process ID? Quoi qu'il en soit, tu peux retrouver cette valeur programmatically avec WinGet (cmd PID):
source: The top of the script (the Auto-excecute section) [je souligne]After the script has been loaded, it begins executing at the top line, continuing until a Return, Exit, hotkey/hotstring label, or the physical end of the script is encountered (whichever comes first).
Par ailleurs, es-tu certain de la valeur du process ID? Quoi qu'il en soit, tu peux retrouver cette valeur programmatically avec WinGet (cmd PID):
Code: Select all
WinGet, PID, PID, ahk_exe ArcheAge.exe
AHKPID := "ahk_pid " . PID
MsgBox % AHKPID
param := AHKPID . A_Space . "ahk_exe ArcheAge.exe"
ControlSend, , {ALt Down}, % param
Sleep, 160
ControlSend, , {ALt Up}, % param
; ...
Re: Script pour application en background
Toujours, rien, cependant je n'ai pas très bien compris ton message, qu'est-ce que cela veut dire? Comment écrire le top of the line pour que cela marche ?
Je suis plutôt sur pour le PID , voir screenshot ici : https://gyazo.com/5ed5737d784099b67e59d25f8081893b
Je suis plutôt sur pour le PID , voir screenshot ici : https://gyazo.com/5ed5737d784099b67e59d25f8081893b
Re: Script pour application en background
SI t’as le pid, t’as pas besoin d’avoir le nom du processus
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Script pour application en background
Hmmm ça ne donne toujours rien
Re: Script pour application en background
Code: Select all
#NoEnv
SendMode InputThenPlay
ControlSend, , {Alt down}, ahk_pid 8484
Sleep, 90
ControlSend, , {2 down}, ahk_pid 8484
Sleep, 160
ControlSend, , {2 up}, ahk_pid 8484
Sleep, 40
ControlSend, , {Alt up}, ahk_pid 8484
Sleep, 1000
ControlSend, , {1 down}, ahk_pid 8484
Sleep 15500
ControlSend, , {1 up}, ahk_pid 8484
Sleep 1000
ControlSend, , {F down}, ahk_pid 8484
Sleep, 170
ControlSend, , {F up}, ahk_pid 8484
Sleep 100
ControlSend, , {4 down}, ahk_pid 8484
Sleep 200
ControlSend, , {4 up}, ahk_pid 8484
Sleep 3500
ControlSend, , {S down}, ahk_pid 8484
Sleep 10
ControlSend, , {S up}, ahk_pid 8484
Return to “J'ai besoin d'aide”
Who is online
Users browsing this forum: No registered users and 4 guests