Jump to content

Recommended Posts

Posted

I am trying to open my downloads folder and select .exe file (This file name changes on multiple downloads therefore cannot give path). The issue is that the window info tool focus on entire download list as a whole and doe snot provide me control id for each item in the list.

  • Moderators
Posted

Moved to the appropriate forum.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

the window info tool give just info for

  • Window titles
  • Text on the window (visible and hidden)
  • Window size and position
  • Contents of the status bar
  • Position of the mouse pointer
  • Color of the pixels underneath the mouse pointer
  • Details of the Control underneath the mouse pointer

 

try this if it help you :)

#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#include <File.au3>

_FindAllFile()

;----------------------------------------------------------------------------------------
Func _FindAllFile()
    Local $dir = @HomeDrive & @HomePath & "\Downloads\"
    Local $ArraySrtfiles = _FileListToArrayRec($dir, "*.exe", $FLTAR_FILES, $FLTAR_NORECUR)
    If Not IsArray($ArraySrtfiles) Then
        ConsoleWrite($dir & " = Invalid input path" & @CRLF)
        Return
    Else
        Local $sFilePath
        For $x = 1 To $ArraySrtfiles[0]
            $sFilePath = $dir & $ArraySrtfiles[$x]
            ConsoleWrite($sFilePath & " -> Timestamp:" & FileGetTime($sFilePath, $FT_MODIFIED, 1) & @CRLF)
        Next
    EndIf
EndFunc   ;==>_FindAllFile
;----------------------------------------------------------------------------------------

 

I know that I know nothing

  • 3 weeks later...
Posted (edited)

What browser do you use?

For Chrome e.g. the default download location can be found this way:

 

$Str = "\\\\fdjakl\\fldias\\fdasköl"
$Str = StringReplace($Str, "\\", "\")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $Str = ' & $Str & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
Exit


$RegExDL_Dir = '(?i)^(?:.*?"download":{"default_directory":")([^"]+)(?:".*$)'
$StrPreferences = FileRead(@LocalAppDataDir & "\Google\Chrome\User Data\Default\Preferences")
If StringRegExp($StrPreferences, $RegExDL_Dir) Then
    $DLDir = StringRegExpReplace($StrPreferences, $RegExDL_Dir, "$1")
    $DLDir = StringReplace($DLDir, "\\", "\")
    #cs <edit> - not required, as "\\\\" will be reduced to "\\" and not "\"
    if StringLeft($DLDir,1)="\" then $DLDir = "\" & $DLDir
    #ce <edit> - not required, as "\\\\" will be reduced to "\\" and not "\"
Else
    $DLDir = @UserProfileDir & "\Downloads"
EndIf

ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $DLDir = ' & $DLDir & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

once that is known monitor the folder for new EXE files to show up

 

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Posted (edited)

I mainly use firefox, I use chrome for translations, both use the default windows Downloads folder 

in the location C:\Users\<UserName>\Downloads\    which, however, changes if you want, to both

in chrome in   chrome://settings/downloads     in Firefox in  about:preferences   in the section Files and Applications

 

 

Edited by ioa747

I know that I know nothing

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...