Jump to content

NetSession UDF ~ Per-Process Embedded Browser Settings (Proxy/Agent/Etc.)


Recommended Posts

drego,

thank you - that's what I was looking for.

But how can I bind to a dedicated (= the current) process? The functions seems to affect other processes as well (e. g. Citrix XenApp Client). Any ideas?

Regards,

-supersonic.

 

I'll look into it now. In my initial tests (Years ago) I was only using it with once process for the purpose of not relying on the global registry settings. After I made the UDF recently I tested by setting a proxy in two different AutoIt processes, Hopefully the options weren't being set globally. I'll perform a test now to see if one changes the other.

Thank you for the report.

Edited by drego
Link to post
Share on other sites

Thank you, I appreciate it.

 

I have just ran a test. Here's what I did.

  1. Changed my application so that it only sets the proxy/agent 1 time at the beginning of script execution.
  2. Ran the app and then ran a second and third instance of the app, each using a different proxy.
  3. Began navigating with all of them at the same time.

Since I set the proxy only once in the app, if your problem were affecting me the proxy of all of the app instances would change to 1 proxy. They did not. Each instance of the app retained it's own proxy & agent settings so as far as running multiple processes, each compiled by AutoIt, they will each have whatever unique settings you apply to them.

I'm not sure about your Citrix XenApp Client but given these tests I don't know how it could be affected. Are you sure it's changing the Internet settings for "Citrix XenApp Client?" Is this a client you developed or by Citrix? Can you show me any proxy server logs to confirm it? Any data at all showing that the proxy settings were somehow applied to a second application? I only ask because it doesn't happen between multiple AutoIt compiled applications so I'm not sure why it would happen to one by Citrix. RIght now I could spawn 100 processes, each with different proxy settings and have them perform multiple embedded browser operations at the same time without interfering with each-other.

Thanks.

Edited by drego
Link to post
Share on other sites

I just updated the main post about a bug I'm encountering with the new _ClearCookies function. There are no compile errors but upon calling it during execution I'm getting: Error: Error parsing function call.

If anyone can take a look and knows what is causing this it will be a great help to this seemingly simple function and will be much appreciated.

Link to post
Share on other sites
  • Moderators

Not sure what makes you think clearing the flash player folder is clearing cookies... care to enlighten?

Edit:

Maybe that's just an addition, I have no idea what that .cpl is doing, but I assume that's the attempt you're making to clear the IE cookies.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to post
Share on other sites

Not sure what makes you think clearing the flash player folder is clearing cookies... care to enlighten?

Edit:

Maybe that's just an addition, I have no idea what that .cpl is doing, but I assume that's the attempt you're making to clear the IE cookies.

 

Correct, the first clears IE cookes and the second empties the Flash cache. This function used to work without any problems.

Edit: Obviously it needs to be updated as I see now the directory structure is different. But is there anything else wrong? Also on the topic of clearing the flash cache, many sites use it to track people.

Edited by drego
Link to post
Share on other sites

Correction, the Flash cache is in the same location. I commented out the flash code and got the same error so the problem is in the IE cookies command:

ShellExecuteWait("RunDll32.exe","InetCpl.cpl,ClearMyTracksByProcess 2")
; Running this from the command prompt work fine.
Edited by drego
Link to post
Share on other sites

LoL it was my error in calling the function in 1 place without (). A silly mistake on my part. There is nothing wrong with the function but in the process of troubleshooting someone did make a slight improvement to it and I also added a needed line so I'm now uploading version 0.9c.

Link to post
Share on other sites
  • Moderators

I think I've finally exhausted my patience with the username/password thing.  urlmon and wininet are not cooperating with me at all.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to post
Share on other sites

Announcement: I have just released NetSession-0.9d. This release contains a new function that was on the Planned Features list I forgot to add in the last version I posted. As now stated in the main post this will likely be the last update until we add more DLL/WinAPI code, enabling more features from the Planned Features list :)

Link to post
Share on other sites

I think I've finally exhausted my patience with the username/password thing.  urlmon and wininet are not cooperating with me at all.

 

You did get the UDF working for you right? I'm assuming you're taking about further auth testing. Maybe post some examples of what you've tried?

Link to post
Share on other sites
  • Moderators

This was the last code I was messing with... but it requires a modification to wininet.au3 library (see attachment).

The issue is, that I'm fairly confident that you cannot globally set the username/password with urlmksetsessionoption, so I went to InternetOpen/Connect/SetOption route.

The commented code and commented out code was just for testing different things so it's not going to run out of the box.

#Region new
Func _proxySetEx($sUser = "", $sPass = "", $sProxy = "", $sProxyByPass = "", $sUserAgent = "")

    Local Const $tagInternetProxyInfo = _
        "dword dwAccessType;ptr lpszProxy;ptr lpszProxyByPass"

    _WinINet_Startup()
#cs
    Local $tUsername, $tPassword, $iEnum, $iErr
    Local $hIOpen = -1, $hInternet = -1
    Local $sServerName, $sServerPort
    If ($sUser <> Default And StringLen($sUser)) Or _
        ($sPass <> Default And StringLen($sPass)) Then
        $hIOpen = _WinINet_InternetOpen($sUserAgent, $INTERNET_OPEN_TYPE_PROXY, 0, $sProxy, "")
        If @error Then
            Return SetError(1, @error, 0)
        EndIf

        $sServerName = StringRegExpReplace($sProxy, "(.*?)(\:.*?)$", "$1")
        $sServerPort = StringRegExpReplace($sProxy, "(.*?\:)(.*?)$", "$2")
        $hInternet = _WinINet_InternetConnect($hIOpen, $INTERNET_SERVICE_HTTP, $sServerName, $sServerPort, _
            BitOR($INTERNET_DEFAULT_HTTP_PORT, $INTERNET_DEFAULT_HTTPS_PORT, $INTERNET_DEFAULT_SOCKS_PORT), $sUser, $sPass, 0)
        If @error Then
            _WinINet_InternetCloseHandle($hIOpen)
            Return SetError(2, 0, 0)
        EndIf
    EndIf

    ; set username
    If $sUser <> Default And StringLen($sUser) Then
        _WinINet_InternetSetOption(0, $INTERNET_OPTION_PROXY_USERNAME, $sUser)
        If @error Then
            _WinINet_InternetCloseHandle($hInternet)
            _WinINet_InternetCloseHandle($hIOpen)
            Return SetError(3, 0, 0)
        EndIf
    EndIf

    ; set password
    If $sPass <> Default And StringLen($sPass) Then
        _WinINet_InternetSetOption(0, $INTERNET_OPTION_PROXY_PASSWORD, $sPass)
        If @error Then
            _WinINet_InternetCloseHandle($hInternet)
            _WinINet_InternetCloseHandle($hIOpen)
            Return SetError(4, 0, 0)
        EndIf
    EndIf
#ce
    Local $tProxy
;~      $sProxy = _WinAPI_WideCharToMultiByte($sProxy)
    $tProxy = DllStructCreate("wchar proxy[" & StringLen($sProxy) + 2 & "]")
    DllStructSetData($tProxy, "proxy", $sProxy)

    Local $tProxyByPass;~      $sProxyByPass = _WinAPI_WideCharToMultiByte($sProxyByPass)
    $tProxyByPass = DllStructCreate("wchar proxybypass[" & StringLen($sProxyByPass) + 2 & "]")
    DllStructSetData($tProxyByPass, "proxybypass", $sProxyByPass)

    Local $tProxyBuffer = DllStructCreate($tagInternetProxyInfo)
    If (($sProxyByPass <> Default) And StringLen($sProxyByPass)) Or _
        (($sProxy <> Default) And StringLen($sProxy)) Then
        DllStructSetData($tProxyBuffer, "dwAccessType", $INTERNET_OPEN_TYPE_PROXY)
        DllStructSetData($tProxyBuffer, "lpszProxy", DllStructGetPtr($tProxy))
        DllStructSetData($tProxyBuffer, "lpszProxyByPass", DllStructGetPtr($tProxyByPass))
        _WinINet_InternetSetOption(0, $INTERNET_OPTION_PROXY, $tProxyBuffer)
;~      If Not _WinAPI_UrlMkSetSessionOption($INTERNET_OPTION_PROXY, $tProxyBuffer) Then
;~          _WinINet_InternetCloseHandle($hInternet)
;~          _WinINet_InternetCloseHandle($hIOpen)
;~          Return SetError(4, @error, 0)
;~      EndIf
    EndIf
Return 1
;~  If $hInternet <> -1 Then _WinINet_InternetCloseHandle($hInternet)
;~  If $hIOpen <> -1 Then _WinINet_InternetCloseHandle($hIOpen)

    Return 1
EndFunc
#EndRegion new


Func _WinAPI_UrlMkSetSessionOption($nOption, $tBuffer)

    Local $aRet = DllCall("urlmon.dll", "long", "UrlMkSetSessionOption", _
        "dword", $nOption, "ptr", DllStructGetPtr($tBuffer), _
        "dword", DllStructGetSize($tBuffer), "dword", 0)
    If Not IsArray($aRet) Or $aRet[0] <> 0 Then
        If IsArray($aRet) Then Return SetError($aRet[0], 0, 0)
        Return SetError(1, 0, 0)
    EndIf

    Return 1
EndFunc

And the old code that works (without user/pass), but what you set with urlmksetsessionoption stays after the exe has ran (your code does too).  So my non-user/pass proxy's are still set once the code exits (not ideal but the point was to get it to work first, and worry about other issues later).

Func _proxySet($sUser = "", $sPass = "", $sProxy = "", $sProxyByPass = "")

    Local Const $INTERNET_OPTION_PROXY = 38
    Local Const $INTERNET_OPTION_PROXY_USERNAME = 43
    Local Const $INTERNET_OPTION_PROXY_PASSWORD = 44
    Local Const $INTERNET_OPEN_TYPE_PROXY = 3

    Local Const $tagInternetProxyInfo = _
        "dword dwAccessType;ptr lpszProxy;ptr lpszProxyByPass"

    Local $tUsername, $tPassword, $iEnum, $iErr

    ; set username
    If $sUser <> Default And StringLen($sUser) Then
        $sUser = _WinAPI_WideCharToMultiByte($sUser)
        $tUsername = DllStructCreate("char username[" & StringLen($sUser) + 1 & "]")
        DllStructSetData($tUsername, "username", $sUser)
        $iEnum += _WinAPI_UrlMkSetSessionOption($INTERNET_OPTION_PROXY_USERNAME, $tUsername)
        $iErr = @error
    EndIf

    ; set password
    If $sPass <> Default And StringLen($sPass) Then
        $sPass = _WinAPI_WideCharToMultiByte($sPass)
        $tPassword = DllStructCreate("char password[" & StringLen($sPass) + 1 & "]")
        DllStructSetData($tPassword, "password", $sPass)
        $iEnum += _WinAPI_UrlMkSetSessionOption($INTERNET_OPTION_PROXY_PASSWORD, $tPassword)
        $iErr = @error
    EndIf

    Local $tProxy
    $sProxy = _WinAPI_WideCharToMultiByte($sProxy)
    $tProxy = DllStructCreate("char proxy[" & StringLen($sProxy) + 1 & "]")
    DllStructSetData($tProxy, "proxy", $sProxy)

    Local $tProxyByPass
    $sProxyByPass = _WinAPI_WideCharToMultiByte($sProxyByPass)
    $tProxyByPass = DllStructCreate("char proxybypass[" & StringLen($sProxyByPass) + 1 & "]")
    DllStructSetData($tProxyByPass, "proxybypass", $sProxyByPass)

    Local $tProxyBuffer = DllStructCreate($tagInternetProxyInfo)
    If (($sProxyByPass <> Default) And StringLen($sProxyByPass)) Or _
        (($sProxy <> Default) And StringLen($sProxy)) Then
        DllStructSetData($tProxyBuffer, "dwAccessType", $INTERNET_OPEN_TYPE_PROXY)
        DllStructSetData($tProxyBuffer, "lpszProxy", DllStructGetPtr($tProxy))
        DllStructSetData($tProxyBuffer, "lpszProxyByPass", DllStructGetPtr($tProxyByPass))
        $iEnum += _WinAPI_UrlMkSetSessionOption($INTERNET_OPTION_PROXY, $tProxyBuffer)
        $iErr = @error
    EndIf

    If Not $iEnum Then
        Return SetError($iErr, 0, 0)
    EndIf

    Return $iEnum
EndFunc

Func _WinAPI_UrlMkSetSessionOption($nOption, $tBuffer)

    Local $aRet = DllCall("urlmon.dll", "long", "UrlMkSetSessionOption", _
        "dword", $nOption, "ptr", DllStructGetPtr($tBuffer), _
        "dword", DllStructGetSize($tBuffer), "dword", 0)
    If Not IsArray($aRet) Or $aRet[0] <> 0 Then
        If IsArray($aRet) Then Return SetError($aRet[0], 0, 0)
        Return SetError(1, 0, 0)
    EndIf

    Return 1
EndFunc

Modified WinINet.au3 attachments:

WinINet.zip

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to post
Share on other sites

drego,

currently I can't provide any screenshots from our proxy server regarding the Citrix XenApp Client issue due too many sensitive information. As SmOke_N stated before the settings seems to work "somehow" globally. So, I'm still looking for a real solution to bind a dedicated proxy server to an AutoIt process.

Link to post
Share on other sites

drego,

currently I can't provide any screenshots from our proxy server regarding the Citrix XenApp Client issue due too many sensitive information. As SmOke_N stated before the settings seems to work "somehow" globally. So, I'm still looking for a real solution to bind a dedicated proxy server to an AutoIt process.

 

Though the settings might in some way/cases affect other processes that use IE controls the UDF is still a "real solution to bring a dedicated proxy server to an Autoit process."

I don't know what your use case is but right now I have many processes forked doing work for me on the backend, each using their own proxy and agent on their own ie controls separate of the others. If you think you can somehow improve things be my guest. Right now this is the only way to change these settings for embedded IE controls on a per-process basis or per-autoit-compiled-process basis.

Edited by drego
Link to post
Share on other sites
  • 2 months later...

This was the last code I was messing with... but it requires a modification to wininet.au3 library (see attachment).

The issue is, that I'm fairly confident that you cannot globally set the username/password with urlmksetsessionoption, so I went to InternetOpen/Connect/SetOption route.

The commented code and commented out code was just for testing different things so it's not going to run out of the box.

#Region new
Func _proxySetEx($sUser = "", $sPass = "", $sProxy = "", $sProxyByPass = "", $sUserAgent = "")

    Local Const $tagInternetProxyInfo = _
        "dword dwAccessType;ptr lpszProxy;ptr lpszProxyByPass"

    _WinINet_Startup()
#cs
    Local $tUsername, $tPassword, $iEnum, $iErr
    Local $hIOpen = -1, $hInternet = -1
    Local $sServerName, $sServerPort
    If ($sUser <> Default And StringLen($sUser)) Or _
        ($sPass <> Default And StringLen($sPass)) Then
        $hIOpen = _WinINet_InternetOpen($sUserAgent, $INTERNET_OPEN_TYPE_PROXY, 0, $sProxy, "")
        If @error Then
            Return SetError(1, @error, 0)
        EndIf

        $sServerName = StringRegExpReplace($sProxy, "(.*?)(\:.*?)$", "$1")
        $sServerPort = StringRegExpReplace($sProxy, "(.*?\:)(.*?)$", "$2")
        $hInternet = _WinINet_InternetConnect($hIOpen, $INTERNET_SERVICE_HTTP, $sServerName, $sServerPort, _
            BitOR($INTERNET_DEFAULT_HTTP_PORT, $INTERNET_DEFAULT_HTTPS_PORT, $INTERNET_DEFAULT_SOCKS_PORT), $sUser, $sPass, 0)
        If @error Then
            _WinINet_InternetCloseHandle($hIOpen)
            Return SetError(2, 0, 0)
        EndIf
    EndIf

    ; set username
    If $sUser <> Default And StringLen($sUser) Then
        _WinINet_InternetSetOption(0, $INTERNET_OPTION_PROXY_USERNAME, $sUser)
        If @error Then
            _WinINet_InternetCloseHandle($hInternet)
            _WinINet_InternetCloseHandle($hIOpen)
            Return SetError(3, 0, 0)
        EndIf
    EndIf

    ; set password
    If $sPass <> Default And StringLen($sPass) Then
        _WinINet_InternetSetOption(0, $INTERNET_OPTION_PROXY_PASSWORD, $sPass)
        If @error Then
            _WinINet_InternetCloseHandle($hInternet)
            _WinINet_InternetCloseHandle($hIOpen)
            Return SetError(4, 0, 0)
        EndIf
    EndIf
#ce
    Local $tProxy
;~      $sProxy = _WinAPI_WideCharToMultiByte($sProxy)
    $tProxy = DllStructCreate("wchar proxy[" & StringLen($sProxy) + 2 & "]")
    DllStructSetData($tProxy, "proxy", $sProxy)

    Local $tProxyByPass;~      $sProxyByPass = _WinAPI_WideCharToMultiByte($sProxyByPass)
    $tProxyByPass = DllStructCreate("wchar proxybypass[" & StringLen($sProxyByPass) + 2 & "]")
    DllStructSetData($tProxyByPass, "proxybypass", $sProxyByPass)

    Local $tProxyBuffer = DllStructCreate($tagInternetProxyInfo)
    If (($sProxyByPass <> Default) And StringLen($sProxyByPass)) Or _
        (($sProxy <> Default) And StringLen($sProxy)) Then
        DllStructSetData($tProxyBuffer, "dwAccessType", $INTERNET_OPEN_TYPE_PROXY)
        DllStructSetData($tProxyBuffer, "lpszProxy", DllStructGetPtr($tProxy))
        DllStructSetData($tProxyBuffer, "lpszProxyByPass", DllStructGetPtr($tProxyByPass))
        _WinINet_InternetSetOption(0, $INTERNET_OPTION_PROXY, $tProxyBuffer)
;~      If Not _WinAPI_UrlMkSetSessionOption($INTERNET_OPTION_PROXY, $tProxyBuffer) Then
;~          _WinINet_InternetCloseHandle($hInternet)
;~          _WinINet_InternetCloseHandle($hIOpen)
;~          Return SetError(4, @error, 0)
;~      EndIf
    EndIf
Return 1
;~  If $hInternet <> -1 Then _WinINet_InternetCloseHandle($hInternet)
;~  If $hIOpen <> -1 Then _WinINet_InternetCloseHandle($hIOpen)

    Return 1
EndFunc
#EndRegion new


Func _WinAPI_UrlMkSetSessionOption($nOption, $tBuffer)

    Local $aRet = DllCall("urlmon.dll", "long", "UrlMkSetSessionOption", _
        "dword", $nOption, "ptr", DllStructGetPtr($tBuffer), _
        "dword", DllStructGetSize($tBuffer), "dword", 0)
    If Not IsArray($aRet) Or $aRet[0] <> 0 Then
        If IsArray($aRet) Then Return SetError($aRet[0], 0, 0)
        Return SetError(1, 0, 0)
    EndIf

    Return 1
EndFunc

And the old code that works (without user/pass), but what you set with urlmksetsessionoption stays after the exe has ran (your code does too).  So my non-user/pass proxy's are still set once the code exits (not ideal but the point was to get it to work first, and worry about other issues later).

Func _proxySet($sUser = "", $sPass = "", $sProxy = "", $sProxyByPass = "")

    Local Const $INTERNET_OPTION_PROXY = 38
    Local Const $INTERNET_OPTION_PROXY_USERNAME = 43
    Local Const $INTERNET_OPTION_PROXY_PASSWORD = 44
    Local Const $INTERNET_OPEN_TYPE_PROXY = 3

    Local Const $tagInternetProxyInfo = _
        "dword dwAccessType;ptr lpszProxy;ptr lpszProxyByPass"

    Local $tUsername, $tPassword, $iEnum, $iErr

    ; set username
    If $sUser <> Default And StringLen($sUser) Then
        $sUser = _WinAPI_WideCharToMultiByte($sUser)
        $tUsername = DllStructCreate("char username[" & StringLen($sUser) + 1 & "]")
        DllStructSetData($tUsername, "username", $sUser)
        $iEnum += _WinAPI_UrlMkSetSessionOption($INTERNET_OPTION_PROXY_USERNAME, $tUsername)
        $iErr = @error
    EndIf

    ; set password
    If $sPass <> Default And StringLen($sPass) Then
        $sPass = _WinAPI_WideCharToMultiByte($sPass)
        $tPassword = DllStructCreate("char password[" & StringLen($sPass) + 1 & "]")
        DllStructSetData($tPassword, "password", $sPass)
        $iEnum += _WinAPI_UrlMkSetSessionOption($INTERNET_OPTION_PROXY_PASSWORD, $tPassword)
        $iErr = @error
    EndIf

    Local $tProxy
    $sProxy = _WinAPI_WideCharToMultiByte($sProxy)
    $tProxy = DllStructCreate("char proxy[" & StringLen($sProxy) + 1 & "]")
    DllStructSetData($tProxy, "proxy", $sProxy)

    Local $tProxyByPass
    $sProxyByPass = _WinAPI_WideCharToMultiByte($sProxyByPass)
    $tProxyByPass = DllStructCreate("char proxybypass[" & StringLen($sProxyByPass) + 1 & "]")
    DllStructSetData($tProxyByPass, "proxybypass", $sProxyByPass)

    Local $tProxyBuffer = DllStructCreate($tagInternetProxyInfo)
    If (($sProxyByPass <> Default) And StringLen($sProxyByPass)) Or _
        (($sProxy <> Default) And StringLen($sProxy)) Then
        DllStructSetData($tProxyBuffer, "dwAccessType", $INTERNET_OPEN_TYPE_PROXY)
        DllStructSetData($tProxyBuffer, "lpszProxy", DllStructGetPtr($tProxy))
        DllStructSetData($tProxyBuffer, "lpszProxyByPass", DllStructGetPtr($tProxyByPass))
        $iEnum += _WinAPI_UrlMkSetSessionOption($INTERNET_OPTION_PROXY, $tProxyBuffer)
        $iErr = @error
    EndIf

    If Not $iEnum Then
        Return SetError($iErr, 0, 0)
    EndIf

    Return $iEnum
EndFunc

Func _WinAPI_UrlMkSetSessionOption($nOption, $tBuffer)

    Local $aRet = DllCall("urlmon.dll", "long", "UrlMkSetSessionOption", _
        "dword", $nOption, "ptr", DllStructGetPtr($tBuffer), _
        "dword", DllStructGetSize($tBuffer), "dword", 0)
    If Not IsArray($aRet) Or $aRet[0] <> 0 Then
        If IsArray($aRet) Then Return SetError($aRet[0], 0, 0)
        Return SetError(1, 0, 0)
    EndIf

    Return 1
EndFunc

Modified WinINet.au3 attachments:

WinINet.zip

 

Were you able to set the proxy user/pass successfully on a process without passing it in the URL in this way? I've still been passing it in the URL and of course that doesn't work for visiting HTTPS sites.

Link to post
Share on other sites

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.

  • Similar Content

    • By water
      I have started to rewrite the PowerPoint UDF similar to the Word, Excel and Outlook UDF. The new UDF will not be compatible with the existing one.
      I will add examples, documentation, a section in the wiki etc.
      So far the following functions have been coded - more are on the ToDo list.
      _PPT_Open: Open a connection to a running instance of PowerPoint or start a new one _PPT_Close: Close a PowerPoint instance _PPT_CommentAdd: Add a Comment anywhere on a Slide or connected to a Shape (version 1.5.0.0 2021-08-31) _PPT_CommentDelete: Delete a single Comment from a Slide or all Comments from a SlideRange (version 1.5.0.0 2021-08-31) _PPT_CommentList: Get a list of all Comments in a Presentation (version 1.5.0.0 2021-08-31) _PPT_ConvertUnits: Convert units (like centimeters) to other units (like points) (version 1.3.0.0 2021-08-17) _PPT_HeaderFooterList: Returns a list of Headers and Footers for a Presentation (version 1.1.0.0 2021-07-25, removed with version 1.4.0.0 2021-08-25) _PPT_HeaderFooterSet: Sets the Header/Footer for a Slide/Slides or the Slide-/Notes-/Handout-/Title-Master of the Presentation (version 1.2.0.0 2021-08-09) _PPT_PresentationAttach: Attach to an already opened Presentation _PPT_PresentationClose: Close a Presentation _PPT_PresentationExport: Export one/multiple/all Slides as PDF or XPS. _PPT_PresentationExportGraphic: Export one/multiple/all Slides in a graphic format. _PPT_PresentationList: Returns a list of currently open Presentations (version 1.0.0.0 2021-07-20) _PPT_PresentationNew: Create a new Presentation _PPT_PresentationOpen: Open an existing Presentation _PPT_Print: Print one/multiple/all Slides of a Presentation (version 1.0.0.0 2021-07-20) _PPT_PresentationSave: Save a Presentation _PPT_PresentationSaveAs: Save a Presentation to another location or with another type _PPT_ShapeAdd: Add a Shape to a single or multiple Slides (version 1.1.0.0 2021-07-25) _PPT_ShapeAlignDistribute: Aligns and distributes the Shapes in the specified ShapeRange (version 1.6.0.0 - to be released) _PPT_ShapeCopyMove: Copy/move a Shape(s) of a single Slide to a Slide(s) in the same or a different Presentation (version 1.1.0.0 2021-07-25) _PPT_ShapeDelete: Delete a Shape or Shapes from a single or multiple Slides (version 1.1.0.0 2021-07-25) _PPT_SlideAdd: Add slide(s) to a Presentation _PPT_SlideCopyMove: Copy, move, duplicate Slide(s) _PPT_SlideDelete: Delete Slide(s) _PPT_SlideShow: Show a Presentation _PPT_TableGet: Extract data from a PowerPoint Table Shape to an array (version 1.3.0.0 2021-08-17) _PPT_TableSet: Write data to a PowerPoint Table Shape (version 1.3.0.0 2021-08-17) _PPT_TextFindReplace: Find & replace text throughout entire PowerPoint presentation (version 1.0.0.0 2021-07-20) _PPT_TextSet: Sets/modifies the Text of a Shape or Shapes of a single or multiple Slides (version 1.2.0.0 2021-08-09 Which functions do you want me to add to the UDF?
      ToDo list:
      create slide (JLogan3o13) - Done: _PPT_SlideAdd Apply template to slide (JLogan3o13) - Done: _PPT_SlideAdd Apply theme to slide (JLogan3o13) Cut/Copy/Duplicate/Move/Delete slide(s) (JLogan3o13) - Done: _PPT_SlideCopyMove, _PPT_SlideDelete Export slides (JLogan3o13) - Done: _PPT_PresentationExport Cut/Copy/Duplicate/Move/Delete shape(s) (JLogan3o13): Done : _PPT_ShapeCopyMove, _PPT_ShapeDelete (version 1.1.0.0 2021-07-25) ApplyAnimation, Select, SetDefaultProperties, and zOrder for shape(s) (JLogan3o13) Searching and replacing text (pcjunki) - Done: _PPT_TextFindReplace (version 1.0.0.0 2021-07-20) Export slides in a graphic format (JPG, GIF, PNG ...) (UEZ) - Done: _PPT_PresentationExportGraphic The UDF can be downloaded from the download forum.
       
    • By p4sCh
      Hello everyone,
      I've created a UDF for basic communication with SSH servers. I know there is already such a UDF, but I wasn't satisfied with it for my purpose, so I created a new one.
      This UDF also acts as a wrapper for the plink executable. Its essential functions are _SSHConnect, _SSHSend, _SSHRecv and _SSHCloseSocket.
      It does support multiple simultaneous connections and aims to be pretty robust. Feel free to share your opinions
      Two of the included examples use a slightly modified version of Vintage Terminal by @Chimp
      Download
      The download includes ssh.au3 (UDF), plink.exe (necessary), vintage terminal and code examples:
      SSH UDF.zip
    • By mLipok
      Anybody could help with using QueryInterface in AutoIt to embed Microsoft Edge using WebView2 Interface ?
      Here are links to information/documentation:

      Image comes from: https://docs.microsoft.com/en-us/microsoft-edge/webview2/media/webview2/whatwebview.png
      Introduction to Microsoft Edge WebView2
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/

      Understand WebView2 SDK versions
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/versioning
      Download:
      https://developer.microsoft.com/en-US/microsoft-edge/webview2/
      https://developer.microsoft.com/en-US/microsoft-edge/webview2/#download-section
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution
      API Reference:
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/?view=webview2-1.0.622.22

      HowTo/Concepts:
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/versioning
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/win32
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/howto/debug?tabs=devtools
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/security
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/userdatafolder
      https://mybuild.microsoft.com/sessions/9198aeac-0c8e-4d32-96d1-cbb99a390aa6
      Example:
      https://github.com/MicrosoftEdge/WebView2Samples
      Related:
      https://www.essentialobjects.com/Products/WebBrowser/Default.aspx?gclid=CjwKCAiA17P9BRB2EiwAMvwNyMe6UI9VHej-JYDBUoyGDFz40KaaJ_RidY-75Fhr-PHz65sSVC0XlxoC5loQAvD_BwE
      https://docs.microsoft.com/en-us/microsoft-edge/webview2/howto/webdriver
       
      btw.
      I'm not WindowsApi expert (QueryInterface, C++, DllCall).
      What I trying to say is:     It means that I do not done anything in this regards .... as so far.
       
       
      TIMELINE/ChangeLog:
       
      2020-11-12 - Project propsed by @mLipok 2021-02-03 - First version provided by @LarsJ
    • By seadoggie01
      This UDF is because I'm tired of trying to use UI Automation and Send to automate Adobe Acrobat. I often need to read the contents of PDFs and Acrobat is not easy to work with as a window.  The functions are based on the API Reference from Adobe located here.
      Acrobat Pro is required for all functions.
      It's very beta right now, but it still seems to work. Currently, the functions are based around page level manipulation of PDF documents: re-arranging, swapping, deleting, and moving pages as this is what I use the most.
      Please feel free to request/suggest features!
       
       
    • By DonChunior
      Introduction 
      In the course of my research for a project involving, among other things, the transfer of large amounts of data, I came across the BITS service and from that the idea for this UDF was born.
      For a brief overview, I'll quote from Microsoft's BITS website (https://docs.microsoft.com/en-us/windows/win32/bits/background-intelligent-transfer-service-portal).
      Availability 🛒
      The BITS UDF can be downloaded from my GitHub repository:
      🔗 https://github.com/DonChunior/BITS-UDF
      Comments 💬
      Currently, only an alpha version of the UDF is available.
      This contains by and large the full functionality of the object interfaces, but still completely lacks error checking and handling.
      I will implement this in the upcoming beta version.
      Therefore I ask you to use the UDF only for testing purposes but not in productive code!
      Acknowledgment 🤝
      Many thanks to @Nine and @Danyfirex.
      You helped me very well in solving some tricky problems.
×
×
  • Create New...