electrons

[help]get Google search suggestions

4 posts in this topic

hello everyOne :)

how can i get Google search suggestions while typing text

and save it to txt file

Untitled.png.f8f87493a19fc87f80b2d93795e

Share this post


Link to post
Share on other sites



is that impossible? 

any idea please?! 

Share this post


Link to post
Share on other sites
<div class="gstl_0 sbdd_a" style="left: 0px; top: 39px; text-align: left; position: absolute; min-width: 590px;" dir="ltr"><div class="fl"></div><div><div class="sbdd_b"><div class="sbsb_a"><ul class="sbsb_b" role="listbox"><li class="sbsb_c gsfs" role="presentation" style="text-align: left;" dir="ltr"><div id="sbse0" role="option"><div class="sbqs_a" aria-hidden="true"><a class="sbsb_i sbqs_b" href="#ifl">Szczęśliwy traf »</a></div><div class="sbqs_c">autoit<b> poradnik</b></div></div></li><li class="sbsb_c gsfs" role="presentation" style="text-align: left;" dir="ltr"><div id="sbse1" role="option"><div class="sbqs_a" aria-hidden="true"><a class="sbsb_i sbqs_b" href="#ifl">Szczęśliwy traf »</a></div><div class="sbqs_c">autoit<b> kurs pdf</b></div></div></li><li class="sbsb_c gsfs" role="presentation" style="text-align: left;" dir="ltr"><div id="sbse2" role="option"><div class="sbqs_a" aria-hidden="true"><a class="sbsb_i sbqs_b" href="#ifl">Szczęśliwy traf »</a></div><div class="sbqs_c">autoit<b> skrypty</b></div></div></li><li class="sbsb_c gsfs" role="presentation" style="text-align: left;" dir="ltr"><div id="sbse3" role="option"><div class="sbqs_a" aria-hidden="true"><a class="sbsb_i sbqs_b" href="#ifl">Szczęśliwy traf »</a></div><div class="sbqs_c">autoit<b> download</b></div></div></li></ul></div></div><div><div class="sft" id="pocs" style="left: 0px; margin-top: 10px; white-space: nowrap; position: absolute; z-index: 987;"><div id="pocs0" style="display: none;"><span><span>Google</span> Wyszukiwanie dynamiczne jest niedostępne. Naciśnij Enter, aby wyszukać.</span>&nbsp;<a href="//support.google.com/websearch/answer/186645?hl=pl">Więcej informacji</a></div><div id="pocs1" style="display: none;"><span>Google</span> Wyszukiwanie dynamiczne jest nieaktywne z powodu wolnego połączenia. Naciśnij Enter, aby wyszukać.</div><div id="pocs2">Naciśnij Enter, aby wyszukać.</div></div></div></div></div>

Yest it is possible.

<div class="sbqs_c">autoit<b> poradnik</b></div>
<div class="sbqs_c">autoit<b> kurs pdf</b></div>
<div class="sbqs_c">autoit<b> skrypty</b></div>
<div class="sbqs_c">autoit<b> download</b></div>

Try to use RegExp:

(?i)(?:<div class="sbqs_c">)(.*?)(?:</div>)

Quote

autoit<b> poradnik</b>
autoit<b> kurs pdf</b>
autoit<b> skrypty</b>
autoit<b> download</b>

 

1 person likes this

Signature beginning:   Wondering who uses AutoIT and what it can be used for ?
* GHAPI UDF - modest begining - comunication with GitHub REST API *
ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF *

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Best coding practices * 

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * 

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2017-06-04

Share this post


Link to post
Share on other sites
11 hours ago, mLipok said:
<div class="gstl_0 sbdd_a" style="left: 0px; top: 39px; text-align: left; position: absolute; min-width: 590px;" dir="ltr"><div class="fl"></div><div><div class="sbdd_b"><div class="sbsb_a"><ul class="sbsb_b" role="listbox"><li class="sbsb_c gsfs" role="presentation" style="text-align: left;" dir="ltr"><div id="sbse0" role="option"><div class="sbqs_a" aria-hidden="true"><a class="sbsb_i sbqs_b" href="#ifl">Szczęśliwy traf »</a></div><div class="sbqs_c">autoit<b> poradnik</b></div></div></li><li class="sbsb_c gsfs" role="presentation" style="text-align: left;" dir="ltr"><div id="sbse1" role="option"><div class="sbqs_a" aria-hidden="true"><a class="sbsb_i sbqs_b" href="#ifl">Szczęśliwy traf »</a></div><div class="sbqs_c">autoit<b> kurs pdf</b></div></div></li><li class="sbsb_c gsfs" role="presentation" style="text-align: left;" dir="ltr"><div id="sbse2" role="option"><div class="sbqs_a" aria-hidden="true"><a class="sbsb_i sbqs_b" href="#ifl">Szczęśliwy traf »</a></div><div class="sbqs_c">autoit<b> skrypty</b></div></div></li><li class="sbsb_c gsfs" role="presentation" style="text-align: left;" dir="ltr"><div id="sbse3" role="option"><div class="sbqs_a" aria-hidden="true"><a class="sbsb_i sbqs_b" href="#ifl">Szczęśliwy traf »</a></div><div class="sbqs_c">autoit<b> download</b></div></div></li></ul></div></div><div><div class="sft" id="pocs" style="left: 0px; margin-top: 10px; white-space: nowrap; position: absolute; z-index: 987;"><div id="pocs0" style="display: none;"><span><span>Google</span> Wyszukiwanie dynamiczne jest niedostępne. Naciśnij Enter, aby wyszukać.</span>&nbsp;<a href="//support.google.com/websearch/answer/186645?hl=pl">Więcej informacji</a></div><div id="pocs1" style="display: none;"><span>Google</span> Wyszukiwanie dynamiczne jest nieaktywne z powodu wolnego połączenia. Naciśnij Enter, aby wyszukać.</div><div id="pocs2">Naciśnij Enter, aby wyszukać.</div></div></div></div></div>

Yest it is possible.

<div class="sbqs_c">autoit<b> poradnik</b></div>
<div class="sbqs_c">autoit<b> kurs pdf</b></div>
<div class="sbqs_c">autoit<b> skrypty</b></div>
<div class="sbqs_c">autoit<b> download</b></div>

Try to use RegExp:

(?i)(?:<div class="sbqs_c">)(.*?)(?:</div>)

 

Thank you so much mLipok God bless you.

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

  • 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"
    • Gowrisankar
      By Gowrisankar
      Hello everyone,
      I'm working on a task where, a PDF file is opened (in IE browser) when I click a link in a website.
      I have to read the first page of the PDF to find particular strings. Can you please share some ideas?
    • DeathChicken
      By DeathChicken
      If possible please add or edit the comments to explain how this works.
       
      ;includes functions from other things
      #include <GDIPlus.au3>
      #include <ScreenCapture.au3>
      ;hotkeys
      HotKeySet("{ESC}", _exit)
      HotKeySet("{F1}", _scan)
      ;global variables
      Global $win_title                    ;name of the window
      Global $area_x                        ;
      Global $area_y                        ;
      Global $area_w                       ;
      Global $area_h                        ;
      Global $cursor                         ;
      Global $rect_file                      ;
      Global $hbmpscreen              ;
      Global $i=  1043                      ;moves the rect
      Global $ii=    378                      ;moves the rect
      Global $x=1044                        ;inner rect offset
      Global $y=501                          ;inner rect offset
      Global $hbmprect                    ;image inside rect
      Global $hscreen                        ;image whole screen
                                         
      _GDIPlus_Startup()                    ;?
      ;display hotkeys on screen
      ToolTip("Press F1 to scan | Press ESC to Exit",0,0)
                                          ;infinite loop to keep prog running
      While 1
          Sleep(100)
      WEnd
      Func _scan()
      ;~ reads your screen area:
      _read()
      ;~ converts screen captured into bmp
      _convert()
      ;~ .  Loads converted bmp to be read
      _loadBMP()
      ;~ compares the bmp of your scanned screen to the actual screen that is being displayed
      _compare()
      EndFunc
                                          ;reads screen
      Func _read()
          $hscreen = _ScreenCapture_CaptureWnd("", WinGetHandle($win_title), $area_x, $area_y, $area_x + $area_w, $area_y + $area_h, $cursor)
      EndFunc
                                          ;converts screen into bmp
      Func _convert()
          _GDIPlus_BitmapCreateFromHBITMAP($hscreen)
      EndFunc
                                          ;loads converted screen
      Func _loadBMP()
      _GDIPlus_BitmapCreateFromFile($rect_file)
      EndFunc
                                          ;compares savedBMP to current screen
      Func _compare()
      ;If(                              below code                                     ) = (                   below code           ) Then
      If _GDIPlus_BitmapGetPixel($hbmpscreen, ($i + $x) - $area_x, ($ii + $y) - $area_y) = _GDIPlus_BitmapGetPixel($hbmprect, $x, $y) Then
      ;display message box titled found with a message of found
      MsgBox("","","found")
      ;if above is not correct then
      EndIf
      EndFunc
                                          ;exit func
      Func _exit()
          Exit
      EndFunc
    • ct253704
      By ct253704
      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]")  


    • algiuxas
      By algiuxas
      Hello everybody, so I might found a bug in _ArraySearch:
       
      #include <Array.au3> Local $abc[2] = ["b", "b"] $h = "+---------------------------------+" & @CRLF ConsoleWrite($h) For $i = 0 To 1 $abc[0] = 0 out() $abc[0] = 1 out() $abc[0] = -1 out() $abc[0] = "Abc" out() $abc[1] = "Hello" Next Func txt() Return "$abc = [" & $abc[0] & ", " & $abc[1] & "]" & @CRLF & _ "> _ArraySearch($abc,""Hello"") = " EndFunc ;==>txt Func shouldoutput($ans) Return "_ArraySearch Should return: " & ($ans ? 1 : -1) EndFunc ;==>shouldoutput Func out() ConsoleWrite("> " & txt() & _ArraySearch($abc, "Hello") & @CRLF & "> " & shouldoutput($abc[1] == "Hello") & @CRLF & $h) EndFunc ;==>out Exit Sorry for this messy script