So on Windows you want some automation to. . .
- Detect when a specific window is spawned
- Make a specific detected window active
- Insert a full file path into a particular field within a specific window with the file name minus the extension of that path being the current clipboard's copied value
Consider using the free AutoIT application and some functions and loop calling methods for this.
AutoIT Logic
This method requires setting two variables: the full file path
as $SavePath and the file extension as $SaveExt where the Save As field of the Download File Info window will save files.
This method sets a Local variable within the user-defined function labeled IDM_DFI() and copies the current clipboard's value as its value so it's assumed here that you will likely have something that copies a unique value to the clipboard before the Download File Info window is launched.
This process will select and delete everything from the Save As field, replace that with the $SavePath, $Clip, and $SaveExt variable values concatenated in that order becoming the string for the full file path and file name of the downloaded file saved, and then press Start Download.
This process starts with a CheckWin() user-defined function call and within that the WinWait function is used to wait for a window to spawn that has a title matching the value of the $WinTitle Global variable. When it detects this window it will perform the aforementioned processes and then call the CheckWin() function again and wait for another $WinTitle window to spawn.
Global $WinTitle = "Download File Info"
Global $SavePath = "F:\German lge\Audio database\"
Global $SaveExt = ".mp3"
CheckWin()
Func CheckWin()
WinWait($WinTitle)
IDM_DFI()
EndFunc
Func IDM_DFI()
Local $Clip = ClipGet()
WinActivate($WinTitle)
Sleep(200)
ControlSend($WinTitle, "", "[CLASSNN:Edit3]", "^a{DELETE}"&$SavePath&$Clip&$SaveExt) ; "^a" --> CTRL+a to select all
Sleep(200)
ControlClick($WinTitle, "", "[CLASSNN:Button1]", "left")
Sleep(500)
CheckWin()
EndFunc
It's possible to make this logic more dynamic to accept three input parameters and then you could pass those to the executable once it's compiled for the Window Title, Full Save As Folder Path, and the Save As File Extension which you want it to process (e.g. IDM_DFI.exe "Download File Info" "F:\German lge\Audio database\" ".mp3").
Further Resources