1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| @echo off
:: on regroupe les commandes de NIRCMD dans un fichier "tst.nir"
>tst.nir echo wait 1000
>>tst.nir echo movecursor 10 20
>>tst.nir echo wait 1000
>>tst.nir echo movecursor 20 10
>>tst.nir echo wait 1000
>>tst.nir echo movecursor 30 50
>>tst.nir echo wait 1000
>>tst.nir echo movecursor 40 30
>>tst.nir echo wait 1000
>>tst.nir echo movecursor 30 50
>>tst.nir echo wait 1000
>>tst.nir echo movecursor 20 30
>>tst.nir echo wait 1000
>>tst.nir echo movecursor 10 10
>>tst.nir echo wait 1000
>>tst.nir echo setcursor 100 50
:: conditionner l'execution du script "tst.nir" par une boite de dialogue de choix
nircmd qboxcom "voir un exemple avec MOVECURSOR et SETCURSOR" "exemple" script "tst.nir"
del tst.nir
>tst.nir echo wait 500
>>tst.nir echo execmd start cmd.exe
>>tst.nir echo wait 500
>>tst.nir echo sendkey c press
>>tst.nir echo wait 500
>>tst.nir echo sendkey l press
>>tst.nir echo wait 500
>>tst.nir echo sendkey s press
>>tst.nir echo wait 500
>>tst.nir echo sendkey enter press
>>tst.nir echo wait 500
>>tst.nir echo sendkey d press
>>tst.nir echo wait 500
>>tst.nir echo sendkey i press
>>tst.nir echo wait 500
>>tst.nir echo sendkey r press
>>tst.nir echo wait 500
>>tst.nir echo sendkey enter press
>>tst.nir echo wait 500
>>tst.nir echo sendkey e press
>>tst.nir echo wait 500
>>tst.nir echo sendkey x press
>>tst.nir echo wait 500
>>tst.nir echo sendkey i press
>>tst.nir echo wait 500
>>tst.nir echo sendkey t press
>>tst.nir echo wait 500
>>tst.nir echo sendkey enter press
nircmd qboxcom "voir un exemple avec SENDKEY" "exemple" script "tst.nir"
del tst.nir
pause |
Partager