你能告诉我,有没有可能做一个批处理文件,在谷歌搜索一个单词,然后打开一个特定的网站从谷歌搜索页面。所以我认为它需要点击搜索结果。它可以是来自搜索页面的第一个结果。
我此时此刻的代码:
@echo off
set executecounter=0
:loop
start chrome --user-data-dir="C:\Users\(username)\AppData\Local\Google\Chrome\User Data\Default"--new-window --window-position=1280,0 --window-size=10,10 "https://www.google.com/search?q=%*"
timeout /t 20
taskkill /F /IM chrome.exe /T > nul
set /a executecounter=%executecounter%+1
if "%executecounter%"=="180" goto done
goto loop
:done
echo Complete!
pause谢谢你
发布于 2020-05-03 21:12:06
我做了一个非常简单的实验:我在Google Chrome地址栏上搜索"Tralala“,URL变成了一个比这个更复杂的版本:
https://www.google.com/search?q=Tralala为了启动Google Chrome,我需要进入目录"C:\Program Files (x86)\Google\Chrome\Application\“。
因此,通过组合这两个命令,我得到了以下命令:
cd "C:\Program Files (x86)\Google\Chrome\Application"
Chrome https://www.google.com/search?q=Tralala您可以将其用作创建批处理文件的输入
https://stackoverflow.com/questions/61572451
复制相似问题