Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting "401 - Unathorized" using IntGetFile
#2
I would try:

Call IntGetFile as it is.
If it returns an error:
- Show custom dialog with web browser control, with the same URL or with the password form URL.
- Manually enter password.
- Call IntGetFile again.

Next time the first IntGetFile call should succeed, until you restart QM (or your macro.exe process) or a timeout.

If don't want to enter password manually, can try to POST the password form data, but it is quite difficult and may not work. Maybe easier is to show the web browser dialog hidden and automate entering password with accessible object functions or HTML element functions or easier with function AutoPassword.

Instead of creating custom dialog you can try to download the file with HtmlDoc class functions. It creates a hidden web browser control (depends on options). Then automate entering password in the popup window.

To automate entering password, probably will need to do it in other thread, because your macro will wait until the dialog is closed. Use mac to create new thread.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)