hi all , i am a beginning student .
i design a script to get xls value to search but existing path is fixed , i hope use inputbox to input xls path and always select the excel sheets1 for start page to get value
what can i do ................ please help ............
filepath:=A_ScriptDir "\"
InputBox,_filepath,Open excel file!,please input xls path ,,300,200,,,,15,%filepath%
objExcel := ComObjCreate("Excel.Application")
;objWorkbook := ("C:\Users\adrian\Desktop\test.xls")
objWorkbook := objExcel.Workbooks.Open, %filepath% ;*************don't working
X=1
loop
{
strCell := objExcel.Cells(X, 1).Value
MsgBox, % strCell
;run notepad
;click 287,880
;sleep,1000
;click 436,156
;send, ^a
;send, {delete}
;Send, % strCell
;send, {enter}
;sleep,6000
;;;;do-something;;;;;;
x:=x+1
if (strcell =""){
return
}
}
return
exitapp
use inputbox to open excel file please help Topic is solved
-
- Posts: 11
- Joined: 02 Oct 2017, 02:24
- Blackholyman
- Posts: 1293
- Joined: 29 Sep 2013, 22:57
- Location: Denmark
- Contact:
Re: use inputbox to open excel file please help Topic is solved
how about ?
Code: Select all
FileSelectFile, filepath
objExcel := ComObjCreate("Excel.Application")
;objWorkbook := ("C:\Users\adrian\Desktop\test.xls")
objWorkbook := objExcel.Workbooks.Open(filepath)
Courses on AutoHotkey
My Autohotkey Blog
-
- Posts: 11
- Joined: 02 Oct 2017, 02:24
Re: use inputbox to open excel file please help
omg ! thank you this amazing ! but i have a question . if i use fied path to open xls the msgbox show value is 126 why use fileselectfile show value is 126.000000
how can show interger
how can show interger
Who is online
Users browsing this forum: bobstoner289, Ralf_Reddings200244 and 293 guests