Jump to content
Sign in to follow this  
marculito

Google/Twitter search

Recommended Posts

marculito

Hi everyone. I am new here and new to AutoIt but I must say it's really fun to learn how to script in AutoIt.

What I am looking for is to create a script that can connect to Google's API, Twitters API to be able to run keyword searches against them. So that when the script runs, let's say once every hour it should find the latest results in Twitter and in Google according to the keywords entered into the script.

Maybe this is impossible to do in AutoIt? Or not? Since I'm new to this I'm just looking for any advice into how I can achieve this. If anyone have any code snippets or source code willing to share with me you are welcome to share it :)

If not maybe someone here can give me a hint of what I should look into, and of course again, if it is possible to achieve this.

Any help or advices at all are welcome.

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, marculito, welcome to the forum. Have you tried a forum search yet? Just a quick search of Google + API yielded almost 300 results; you may read through these to find what you're looking for.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
marculito

Hi and thanks for the welcome :) I have done a search and found some examples but nothing that does what I am looking for. But you are of course correct, haven't read all posts yet so I will do that first. Have also searched on google but haven't yet found what I am looking for. There is a lot of scrapers/crawlers but all I want to achieve is an automated search based on keywords.

But as said, will read some more and figure out how to do it :)

Thanks again for the welcoming message.

Share this post


Link to post
Share on other sites
ileandros

This is a start.

#include <GUIConstants.au3>
$hGUI = GUICreate("Google - Twitter API",300,100)
$input = GUICtrlCreateInput("Google - Twitter search",10,70)
$label = GUICtrlCreateLabel("Keywords search:",10,45)
GUISetState(@SW_SHOW)
While 1
 Switch GUIGetMsg()
  Case $GUI_EVENT_CLOSE
   Exit
 EndSwitch
WEnd

I could help more if i could understand more what ur trying to do...

I dont use twitter/facebook etc. a lot so i got no idea what your trying to do here.

When you mean Google API or twitters or what ever you mean the input that searches for keywords???

So you want an IE automatation.

If not please explain so i can help


I feel nothing.It feels great.

Share this post


Link to post
Share on other sites
marculito

Hi, and well, yeah, IE automation maybe is the right word for this. A script that searches choosen websites, google, yahoo, twitter, or other sites using keywords entered into a list or database. It would then extract the results and paste it into a .txt or html so that once a day you get a summary based on all keywords used for each website searched.

Does this explain a bit more about what I would like to accomplish?

Thanks

Share this post


Link to post
Share on other sites
ileandros

I just made a piece of code.

Maybe need some changes. Check it out

#include <GUIConstants.au3>
#include <IE.au3>
#include <GUIScrollbars_Ex.au3>

Global $url = "https://www.google.com/"
$hGUI = GUICreate("Google - Twitter API",300,100)
$input = GUICtrlCreateInput("Google - Twitter search",10,70)
$label = GUICtrlCreateLabel("Keywords search:",10,45)
GUISetState(@SW_SHOW)
MsgBox(0,"WARNING", "You got 10 secs to writte the keyword in the inputbox")
Sleep(10000) ; 10 seconds to writte the keyword
If WinExists("Google - Windows Internet Explorer") Then
WinActivate("Google - Windows Internet Explorer")
Else
$oie = _IECreate($url)
EndIf
;Google search
$gtext = _IEGetObjById($oie,"gbqfq")
$value = _IEFormElementSetValue($gtext,GUICtrlRead($input))
Send("{ENTER}")
Sleep(3000)
$hGUI2 = GUICreate("Resault", 500, 500)
$edit = GUICtrlCreateEdit("",10,10,450,450)
GUICtrlSetData($edit,_IEBodyReadText($oie))
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd

EDIT: you will also need the ScrollBars UDF where you can find here.

Edited by ileandros

I feel nothing.It feels great.

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  

×