ct253704 Posted September 26, 2017 Posted September 26, 2017 Good morning, I am struggling to find a way to force a ControlClick on a particular hidden element within a Google Slides window. Using Au3Info doesn't work as the hidden text won't appear when attempting to gather the data. Using inspect element will show the class/title of the button, but using the class in the ControlClick function doesn't seem to do anything. Since this script is going to be running on multiple machines with different resolutions, MouseClick isn't a good option either. Can someone help me figure out how to click this full screen button? One more note - It says "Ctrl + Shift + F" for full screen, however sending that combo doesn't work - nor does actually using those keys on the keyboard. Possible conflict with AutoIT hotkeys? Here's some sample code / screenshots to help: ControlClick($Title, "", "[CLASS:punch-viewer-icon punch-viewer-full-screen goog-inline-block]")
Danp2 Posted September 26, 2017 Posted September 26, 2017 (edited) What browser are you using? FWIW, I checked in FireFox and Chrome and they both use Ctrl + Shift + F for opening the main menu. OIC, this is occurring in presentation mode. For me, the keystroke works just fine in Chrome. Edited September 26, 2017 by Danp2 Latest Webdriver UDF Release Webdriver Wiki FAQs
ct253704 Posted September 26, 2017 Author Posted September 26, 2017 I'm doing all of this in IE due to certain restrictions placed on PCs in our domain environment. I have noticed the keystroke will work fine on some laptops so it is possible that it's some sort of addon or hardware issue, but i've tried booting IE into clean mode without addons and still can't seem to get it to function properly.
Danp2 Posted September 26, 2017 Posted September 26, 2017 I'm sure you could click it using the _IE functions. ct253704 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
ct253704 Posted September 26, 2017 Author Posted September 26, 2017 Hm, I originally didn't use those because you can't use _IEPropertySet with the "Fullscreen" property. However I did some looking after you said that and realized there's another property called "Theatermode" that did exactly what I wanted it to do. Works like a charm now, thanks Danp2. Here's that section of code for reference: $oIE = _IECreate ($url, 1) $hIE = _IEPropertyGet($oIE, "hwnd") WinSetState($hIE, "", @SW_MAXIMIZE) WinWaitActive($Title) Sleep(1000) While Local $FS = _IEPropertyGet($oIE, "theatermode") IF $FS = 0 Then _IEPropertySet($oIE, "theatermode", 1) EndIf WinActivate($title) WinWaitActive($title) Send("{F5}") Sleep(100000) Wend
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