Тема: AHK: Поиск папки
Добрый день!! Подскажите пож-та, если в папке нету файлов с именем "паспорт" и нет "wmv", то как это выявить?
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
FormatTime, TimeString, , dd.MM.yyyy
Folder := % "С:\DOC\" TimeString
Numb := 0
Loop, %Folder%\*, 2, 1
if A_LoopFileAttrib not contains H
Numb ++
Doc := 0
Loop, %Folder%\паспорт*.pdf, 1, 1
Doc++
Video := 0
Loop, %Folder%\*.wmv, 1, 1
Video++
Gui, +ToolWindow +AlwaysOnTop
Gui, Font, s15 italic
Gui, Add, text,x10, Количество - %Numb%
Gui, Add, Text, x5 y+5 w190 h1 0x10
Gui, Add, text,x10 y+20, Паспорт - %Doc%
Gui, Add, text,x10, Видео - %Video%
Gui, Show, , *****
Return
Guiclose:
gui, destroy
ExitApp