I'm new to AHK and am having problems getting it to do what I expect.
If you can help (email/phone), I'll pay $50 per hour. It shouldn't take more than 1 or 2 hours.
Basically, I need AHK to copy the contents of a cell in an XLS spreadsheet, Google it, then go to the top page returned by Google. (Chrome is best, but other browsers are ok). That page will be copied and saved as a .txt file using a file name also taken from the spreadsheet.
Sounds simple, but I don't know why I'm having so many problems.
Roy F.
<!-- e --><a href="mailto:feinson@gmail.com">feinson@gmail.com</a><!-- e -->
Need help with AHK spreadsheet application. Will pay
Started by
vuilgat
, Jun 01 2012 04:13 PM
2 replies to this topic
#1
Posted 01 June 2012 - 04:13 PM
#2
Guests
Posted 01 June 2012 - 06:09 PM
Step 1) In Excel, Export as CSV
Step 2) Parse the CSV (quite easy to do)
Step 3) Use UrlDownloadToFile Command
Shouldn't take more than 5 minutes. ;-)
Step 2) Parse the CSV (quite easy to do)
Step 3) Use UrlDownloadToFile Command
Shouldn't take more than 5 minutes. ;-)
#3
Posted 04 June 2012 - 06:37 AM
Simple example using AutoHotkey_L:
InputBox, outputvar, Enter a Cell to Google:, , , 220, 100
if ErrorLevel
return
xl := ComObjCreate("Excel.Application")
xl.Workbooks.Open(A_ScriptDir "\test.csv")
search := xl.Range(outputvar).Value
clip := ClipboardAll
xl.Range(outputvar).offset(0,-1).copy()
FileName := RTrim(Clipboard, "`r`n")
Clipboard := clip
xl.Quit
wb := ComObjCreate("InternetExplorer.Application")
LoadPage(wb, "https://www.google.com/search?q=" search)
LoadPage(wb, wb.document.all("rso").all.tags("A")[0].href)
FileAppend, % wb.document.body.outerText, %FileName%.txt
wb.visible := true
LoadPage(wb, url) {
wb.Navigate(url)
while wb.busy or wb.document.readystate != "complete"
sleep 10
}




