Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

File not being found

$
0
0
Hey quick question here - I am downloading a file and trying to open it but the file will not be found. I have a loop that waits for the file to exist but it never exists! The file is very clearly in the same directory as the script that is running. I have tried using fileopen, fileflush, fileclose but that doesn't help at all.  I would really appreciate any feedback!

$rObjs = _IETagNameGetCollection($hIE, "img")
For $rObj In $rObjs
If StringInStr($rObj.src, "data:image") > 0 Then
  $nSrc = StringReplace($rObj.src, "data:image/jpg;base64, ", "")
 
  ;download base64 image
  Run('base64decode.exe ' & $nSrc)
  While Not FileExists(@ScriptDir & "tImg.jpg")
   Sleep(1000)
   MsgBox(0, "", "waiting for file to exist")
  WEnd
EndIf
Next

If you need any more code please let me know this is just the relevant snippit.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>