rustcat Posted May 28, 2017 Posted May 28, 2017 Hello, I have a puzzling issue. I'm using AutoIT with VBA in Excel to capture an Windows 10 IE browser window with video. This is done in Win 10 by sending the LWIN-ALT-R keys. I've got everything working upto the point the recording actually starts. However, it stops the recording after 2 seconds. Whereas the video recorder is supposed to continue until the IE window closes. I initiate AutoIT in VBA and have a new object: Dim autoit As AutoItX3 Set autoit = New AutoItX3 My last command in the VBA subroutine is: autoit.send ("#!r") Clicking WIN-ALT-R manually works just fine - the entire session is recorded until the browser window (automatically) closes. Thanks much in advance for any expert guidance! Rusty
InunoTaishou Posted May 30, 2017 Posted May 30, 2017 Not sure, it works perfectly fine in native autoit script. Only difference I used was {r} instead of #!r Send("#!{r}")
rustcat Posted May 30, 2017 Author Posted May 30, 2017 Just to confirm - you're saying the video recording does not abruptly stop after a few seconds? It continues on until the entire video is done and the browser window closes? Thanks, Rusty
anthonyjr2 Posted May 30, 2017 Posted May 30, 2017 Could you possible post all of your code so we can compile and test it ourselves? UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=
rustcat Posted May 31, 2017 Author Posted May 31, 2017 The code is quite large and messy. Allow me to summarize the steps followed. Note: The entire code is built in Excel VBA. I found out VBA cannot send WIN-ALT-R which is why I turned to AutoIT. Sending ("#!r") or ("#!{r}"} works correctly, i.e., the red recorder bar shows up on the IE window playing the video. However it stops after 2 seconds. Whereas clicking WIN-ALT-R manually keeps the recording going until the IE window playing the video closes. 1) VBA to identify the right browser window - WORKING 2) VBA to click the link for the video to play - WORKING 3) VBA to identify the pop-up browser window playing the video - WORKING 4) AutoIT (inside VBA) to send ("#!r") or ("#!{r}") to the pop-up browser - WORKING 5) Visually check if the Windows 10 DVR recording bar (red) shows up on the pop-up browser window - WORKING At this point, the recorder stops after 2 seconds. Hope this sheds a little more light? Thanks again.
anthonyjr2 Posted May 31, 2017 Posted May 31, 2017 Have you tested it in other areas? I threw the Send("#!{r}") into a random autoit script and it records whatever screen I'm on fine. Have you tried doing it outside of VBA? As in using an external script? Or maybe try recording on a different screen to see if that's the problem. This doesn't sound like something to do with AutoIt, unless there is a big in your code where you send the command twice for some reason. UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=
rustcat Posted May 31, 2017 Author Posted May 31, 2017 Good ideas, thanks - I will try and revert back. I send the "#!{r}" only once, but it is the last line of my VBA subroutine. I tried adding a Wait command but nothing changed. Cheers, Rusty
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now