effacer tout ... ecrire

Poser vos questions de programmation en AutoHotkey
jiptwo
Posts: 8
Joined: 12 Jan 2021, 15:14

effacer tout ... ecrire

Post by jiptwo » 12 Jan 2021, 15:26

bonjour
j'utilise luaMacros pour identifier mon 2e clavier
mais dans mon autohotkey si j'utilise ''1'' j'aimerais qui efface se qui est dans la case choisi (avec ma souris ) et qu'il inscrit 2000

en résumé ... efface tout .. et écrit 2000
présentement j'ai ceci qui écrit 2000 seulement

else if (key = "1")
SendRaw, 2000

peut-etre facile pour vous ... mais moi c'est nouveau de coder en générale .. :crazy:
merci!

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: effacer tout ... ecrire

Post by joedf » 12 Jan 2021, 16:32

Tu peux faire qqch comme ça, si tu tappes 1, seulement "2000" sera écrit.

Code: Select all

1::Send 2000
Image Image Image Image Image
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]

jiptwo
Posts: 8
Joined: 12 Jan 2021, 15:14

Re: effacer tout ... ecrire

Post by jiptwo » 13 Jan 2021, 08:07

bonjour
sa ne fonctionne pas

else if (key = "1")
Send 2000

sa doit effacer dans la case et après inscrire 2000

la présentement sa écrit 2000 mais sa n'efface pas qu'est-ce qui est dans la case
tout mes codes dans être dans mon même fichier d'exécution ... c'est pour ceci qu'il y a else if
merci!

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: effacer tout ... ecrire

Post by joedf » 13 Jan 2021, 09:00

Tu peux essayer d'envoyer la touche Retour arrière une fois avant "2000". :thumbup:

Code: Select all

Send, {Backspace}2000
si ça ne fonctionne pas, il faudra peut-être partager le reste de ton script. :think:
Image Image Image Image Image
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]

jiptwo
Posts: 8
Joined: 12 Jan 2021, 15:14

Re: effacer tout ... ecrire

Post by jiptwo » 13 Jan 2021, 11:03

super sa marche :)

merci!

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: effacer tout ... ecrire

Post by joedf » 13 Jan 2021, 12:59

Hourrah ! :+1:
Image Image Image Image Image
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]

Post Reply

Return to “J'ai besoin d'aide”