For example,
Code: Select all
start %windir%\explorer.exe
Code: Select all
start %windir5|explorer.exe
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
!^i::
xl := ComObjCreate("Excel.Application")
xl.Visible := true
FilePath := "C:\Users\folder\file.xlsx"
xl.Workbooks.Open(FilePath)
values := {}
for Cell in Xl.Range("A1:A5").Cells
if !(Cell.text="")
Values.Push(Cell.Text)
xl.Quit
SetKeyDelay , 30
run cmd.exe
for key, val in values
{
WinActivate, ahk_exe cmd.exe
WinWait, ahk_exe cmd.exe
ControlSendRaw ,, % val, ahk_exe cmd.exe
WinWait, ahk_exe cmd.exe
ControlSend ,, {enter}, ahk_exe cmd.exe
WinWait, ahk_exe cmd.exe
}
MsgBox, DONE