Sign in to follow this  
Followers 0
ct253704

Acquiring Class/ID of Hidden Google Slides button

5 posts in this topic

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]")

 

Button.JPG

Element.JPG

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Danp2

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I'm sure you could click it using the _IE functions.

1 person likes this

Share this post


Link to post
Share on other sites

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

 

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  
Followers 0

  • Similar Content

    • falcontechnics
      By falcontechnics
      Dear master, hello,
      I got the speech API from Google. But I could not find how to use. Could you help me with a simple example?
      "https://speech.googleapis.com/v1/speech:recognize?key=MyKey"
    • electrons
      By electrons
      hi  , hope  you all doing well 
       cant find any elements on the page ?  and the right click mouse dont work too?
      iam trying with more than method , i need help please!!
       

    • jonson1986
      By jonson1986
      Hello,
      I'm trying to translate with google translator but not able to translate my text file from Russian to English and my output saved in text file is 0 instead of any translated text.
      I'm using a text file which contains 5 lines of Russian language and I want to translate it into English language and want to save it in other text file translated.txt but I'm not able to let it happen.
      Please help me how can I make this possible same code was working several months ago but not now especially don't know what's going wrong with my code of google translator.
       
      Here are my codes
      #RequireAdmin #include <IE.au3> #include <String.au3> #include <Array.au3> ProcessClose ( 'iexplore.exe') $File1 = @ScriptDir & "\kat01.txt" $txt = FileRead($File1) ;-------------------------------Translation Started------------------------- Local $tag="* # * # *" Local $oIE=_IECreate("https://translate.google.com/#ru/en", 1, 1) Local $oForm=_IEFormGetCollection($oIE,0) Local $oQuery=_IEGetObjByName($oForm,"text") _IEFormElementSetValue($oQuery, $tag & @CR & $txt & @CR & $tag) _IEFormSubmit($oForm) _IELoadWait($oIE) Local $oText=_IEGetObjById($oIE,"gt-res-data") $lines=StringSplit(_IEPropertyGet($oText,"innerText"),@CRLF,1) ;_IEQuit($oIE) _ArrayDelete($lines,_ArraySearch($lines,$tag,1,0,0,1,0) & "-" & $lines[0]) _ArrayDelete($lines,"1-" & _ArraySearch($lines,$tag,1,0,0,1,1)) $lines[0]=UBound($lines)-1 _ArrayDisplay($lines) Local $sFilePath = @ScriptDir & "\Translated.txt" _FileWriteFromArray($sFilePath, $lines, 1)  
    • LeloDragneel
      By LeloDragneel
      Hey guys,
      I'm looking to implement an accurate voice recognition method in my program. I tried to understand the Microsoft SAPI API, read their online documentation and found it very confusing and unclear. (Like seriously, it's so bad and vague, but that's just my opinion). I have also tried using UTTER UDF, but could not get a grasp either, because you know, that's an extension UDF to Microsoft SAPI.
      Let's face it, the Google Speech Recognition is much more accurate than Microsoft SAPI (by far). Right now, I am determined to just use the Google Speech API. I have dug deep in regards to implementing the Google Speech API in AutoIT and I haven't found even one post about it. I suppose it's because the Google Speech API was only recently made available to the public. In case you don't know what I'm talking about, here's the link to google api. On that page, notice that there is language support for various languages such as Java, C#, and PHP. However, there's no support for AutoIT. So my question is; how can I go about implementing the Google Speech API into my AutoIT program? Is it even possible?
      Cheers guys!
    • jonson1986
      By jonson1986
      Hello,
      I've thousands of URLs to check them these are safe, malware infected or any other type of error, that's why I searched and found Google Safe browsing API with this we can send HTTP GET request so different code will return to make us clear is it our sent URL is safe or not. Please guide me how can i make this possible I know basics of Auotit but don't know how to use this API to fulfill above mentioned purpose. Your help will be much appreciated. Thanks
      Here is API URL;
      https://developers.google.com/safe-browsing/v3/lookup-guide