Not sure if you've watched The Office but there's one where Michael doesn't understand something and asks Oscar to explain it to him like he's a 6 year old. When he still doesn't understand it, he asked him to explain it like he's a 4 year old. This is a lot like that. Again, if you don't have time for explanations, I totally understand. This is what I have that's not working:
Code: Select all
settimer, fetch, -50
doc := "1Jzk3LXp3mRFeywqaBGWf0SiO15D9NbWWjEUrx01a70o", sht := "1549904757"
InputBox, needle,enter cell address, , , 175, 105
ifequal, needle, , exitapp
col := regexreplace(needle,"(\D+)\d+","$L1")
row := regexreplace(needle,"\D+(\d+)","$1")
Loop, Parse, col
{
tmp := Asc(A_LoopField) - 96
col += tmp * (26 ** (StrLen(col) - A_Index))
}
for x,y in strsplit(oVar,"`n","`r")
if (x = row)
loop, parse, y, CSV
if (a_index = col)
res := a_loopfield
msgbox % res
return
;Sheet I want to access: https docs.google.com /spreadsheets/d/1Jzk3LXp3mRFeywqaBGWf0SiO15D9NbWWjEUrx01a70o/edit#gid=1549904757 Broken Link for safety
fetch:
URLDownloadToFile,% "https docs.google.com /spreadsheets/d/1Jzk3LXp3mRFeywqaBGWf0SiO15D9NbWWjEUrx01a70o/export?format=csv&id=1Jzk3LXp3mRFeywqaBGWf0SiO15D9NbWWjEUrx01a70o&gid=1549904757" Broken Link for safety sht, tmp.csv
while !FileExist(a_scriptdir "\tmp.csv")
sleep, 50
fileread, oVar, tmp.csv ; change to your needs
FileDelete, tmp.csv
return
Also, any idea what I could do to return data from an offset cell? Here is the script I'm using for this in excel:
#8::
Send, ^c
oExcel := ComObjActive("Excel.Application") ;creates a handle to your currently active excel sheet
Var1 := Clipboard
FoundCell := ComObjActive("Excel.Application").ActiveSheet.Range("A:A").Find(Var1)
MsgBox, 0, Overdue Lesson:, % FoundCell.Offset(0, 5).Value
return
Thank you for your time!