ControlSetMouseAction /L /K:C /B:1 17 ShowSetEnviroments
Global Envrs
ProcessExecGetOutput /OEM Envrs %COMSPEC% "/c SET"
If Not StrPos(Envrs, "COMMANDER_HANDLE") > 0 Then
SetEnv SET_SNAPSHOT %Envrs%
Endif
SetEnv COMMANDER_PID %AUTORUN_TCPID%
SetEnv COMMANDER_HANDLE %AUTORUN_TCHANDLE%
Func ShowSetEnviroments()
EnvrsHint(SET_SNAPSHOT, 60)
Sleep(500)
If IsPressed (0x10) Then EnvrsHint(Envrs, 60)
If IsPressed (0x11) Then EnvrsHint(SET_SNAPSHOT, 90)
EndFunc
Func EnvrsHint(SetVar, Length)
Local out, hint, line, i
ProcessExecGetOutput /OEM out %COMSPEC% "/c SET"
i=1
while i < 200
line=StrPart(out, auCRLF, i)
If ERROR = 1 Then Break
If StrPos(line, "SET_SNAPSHOT") > 0 Or StrPos(SetVar, line) > 0 Then
i = i + 1
Continue
Endif
If StrLen(line) > Length Then
line = StrLeft(line, Length)
Endif
hint = hint & line & auLF
i = i + 1
Wend
i = StrLen(hint) - 1
ShowHint(StrMid(hint, 1, i))
EndFunc |