Advertisement
Guest User

everything_save.ahk

a guest
Dec 13th, 2022
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Everything、現時点の各ウィンドウの検索欄をバッチファイルとして保存 (デスクトップに出力)
  2.  
  3. batch := "`r`n" . "chcp 65001`r`n"
  4. WinGet, list_hwnd, List, ahk_class EVERYTHING
  5. loop, %list_hwnd%
  6. {
  7.     StringTrimLeft, hwnd, list_hwnd%A_Index%, 0
  8.     ControlGetText, text, Edit1, ahk_id %hwnd%
  9.     if (text)
  10.     {
  11.         StringReplace, text, text, `%, `%`%, All
  12.         StringReplace, text, text, ", """, All
  13.         batch .= """C:\Program Files\Everything\Everything.exe"" -newwindow -s """ . text . """`r`n"
  14.     }
  15. }
  16. file := FileOpen(A_Desktop . "\Everything 各検索欄を再現.bat", "w", "UTF-8")
  17. file.Write(batch)
  18. file.Close()
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement