自动化Google搜索 [英] Automate Google Search
问题描述
大家好,
我想到了需要实现的一般用例:
查询:
-用户在桌面中
-在单词"go"中键入关键字,后跟Google搜索字符串:例如,如果用户要搜索"java".然后用户将键入"gojava"
-现在,脚本必须检测用户是否在桌面&桌面中.然后仅执行脚本以检测单词"go"后的搜索字符串&通过打开浏览器在Google中找到它.
设计:
Hi All,
I thought of a general use case which needs to be implemented:
Query:
- User is present in Desktop
- Keys in word ''go'' followed by the google search string: for example if the user wants to search for ''java''. Then the user will key in ''gojava''
- Now the script has to detect that the user is present in desktop & then only execute the script to detect the search string after word ''go'' & find it in Google by opening a browser.
Design:
Detect Desktop
{
Wait for user to hit 'go'
{
Cache the remaining words after 'go' as they have to be searched in google
{Open google & search for the search string}
}
}
谁能提供脚本来做到这一点?最好使用AutoIT脚本来完成吗?
谢谢&问候,
Chaitanya
Could anyone provide a script to do it? Preferably could it be done using AutoIT scripting?
Thanks & Regards,
Chaitanya
推荐答案
string SearchString = textboxSearch.Text.Replace(" ", "+");
然后只需打开带有初始页面URL的浏览器窗口
then just have it open a browser window with inital page URL
"http://www.google.com/search?q=" + SearchString;
关于如何在线打开浏览器的大量帮助,很简单
plenty of help on how to open a browser online, its easy enough
这篇关于自动化Google搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!