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
| #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
IfWinNotExist, COM5 - PuTTY
{
Run "C:\PuTTY\putty.exe" -load MKS
sleep,3000
}
; Format Time Stamp
FormatTime, TimeString,,yyyy-MM-dd HH-mm-ss
ControlSend, , %TimeString%, COM5 - PuTTY
loop, 5
{
; Record Oasis Values
ControlSend, , {enter}, COM5 - PuTTY
ControlSend, , @253PR3?;FF, COM5 - PuTTY
ControlSend, , {enter}, COM5 - PuTTY
sleep,250
ControlSend, , /, COM5 - PuTTY
FormatTime, TimeString,,HH-mm-ss
ControlSend, , %TimeString%, COM5 - PuTTY
sleep,750
}
; Copier l'ntegralité de la fenetre putty
SetTitleMatchMode, 2
ClipBoard := "" ; vider le clipboard
PostMessage, 0x112, 0x170, 0,, PuTTY
ClipWait
;MsgBox % Clipboard
; Creer un nouveau fichier
FormatTime, TimeString,,yyyy-MM-dd HH-mm ;editer le format de la date pour nommer le fichier
FileAppend, %clipboard%, %A_WorkingDir%\Suivi Debit_%TimeString%.txt ; Creer un fichier texte avec le contenue du clipboard |