Jump to content
Sign in to follow this  
cyxstudio

ControlSend PageDown wont work on webbrowser control

Recommended Posts

I have created a form with vb.net with a webbrowser control on it opening a pdf file, i wish to use autoit to control it by controlsend pageup / pagedown but it wont work even though controlsend returns a 1 which is suppose to be a success

I replaced the webbrowser control with an acrobat adobe control and the outcome is still the same.

However when i try controlsend to a textbox , controlsend works in delivering the keys.

 

#include <Misc.au3>

$i = ControlSend("Form4", "", 469204408, "^{PGDN}")
msgbox("","", $i)

The code is as above, i tried other variations with this

Local $hWnd = WinWait("[CLASS:WindowsForms10.Window.8.app.0.bf7771]", "", 10)
        msgbox("", "", $hWnd)
        $i = ControlSend($hWnd, "", "", "^{PGDN}")
         msgbox("","", $i)

controlsend will still return 1, which means success , but the pdf file wont scroll down

 

 

autoit.png

Share this post


Link to post
Share on other sites

_ieaction of focus will auto move the page to allow that element to be visible.

_ieattach by the "embedded" = title sub-string or hwnd of the window embedding the control

edit: oh, that might not be an ie browser embedded in there...winform values change everytime you launch them, so you need to use regular expressions on the CLASS, or loop through all controls and grab them by the position.

Add in a controlFocus too.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...