hey guys,
i've been trying to help a family member bring their investment spreadsheets into the 21st century.
i've created a simple app the parses the needed data from finance.google.com and i'm able to do everything but write that value back to a cell in the spreadsheet.
basically what happens is once i call _ExcelWriteCell() in GetInfo(), the program instantly shuts down without any error being tossed.
AutoIt
#RequireAdmin #include <ComboConstants.au3> #include <GuiToolbar.au3> #include <EditConstants.au3> #include <GuiConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <Excel.au3> #include <_XLSXReadToArray.au3> #include <file.au3> HotKeySet("{ESC}", "_exit") HotKeySet("{SPACE}", "GetInfo") global $parsedata global $parsestring global $aData global $EFile $form1 = GUIcreate("test", 500,500, 200,200) $go = GUICtrlCreateButton("Update", 100,50,200,40) ;$edit1 = GUICtrlCreateEdit($parsedata, 10,10,480,480) ;$grid1 = GUICtrlCreateListView("short|full name|bought value|current value|profit",-1,-1, 500,500 ) GUISetState(@SW_show, $form1) PopulateGrid() Func _exit() Exit EndFunc func FindExcelLength() EndFunc func PopulateGrid() ;$EFile = FileOpen(@ScriptDir & "\stocks.xlsx") if @error = 1 Then MsgBox("","","shits fucked") EndIf $EFile =_ExcelBookAttach(@ScriptDir & "\stocks.xlsx") if @error = 1 or @error = 2 or @error = 3 or @error = 4 or @error = 5 Then MsgBox("","","shits fucked "& @error) EndIf $FActivate = _ExcelSheetActivate($EFile, 1) $aData = _ExcelReadArray($EFile, 1, 1, 2, 1) _ArrayDisplay($aData) ;_ExcelWriteCell($EFile, $a[0],1,2) ;MsgBox("","", $a) ;GuiCtrlSetData($grid1,$a[0]) EndFunc func GetInfo() MsgBox("","",$aData[0]) for $i = 0 to 1 MsgBox("","",$aData[$i]) $parsedata = InetRead("http://www.google.com/finance?q="& $aData[$i]) MsgBox("","","inet") $parsestring = BinaryToString($parsedata) MsgBox("","","split1") $parsesplit = StringSplit($parsestring, '<span class="pr"', 1) MsgBox("","","split2") $parsesplit2 = StringSplit($parsesplit[2], ">",1) MsgBox("","","split3") $parsesplit3 = StringSplit($parsesplit2[3], "<",1) MsgBox("","","splits done") MsgBox("","",$parsesplit3[1]) _ExcelWriteCell($EFile, $parsesplite3[1], $i+1,2) if @error = 1 or @error = 2 or @error = 3 or @error = 4 or @error = 5 Then MsgBox("","","shits fucked "& @error) EndIf ;GuiCtrlSetData($edit1, $parsesplit3[1]) Next EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg case $GUI_EVENT_CLOSE Exit case $go GetInfo() EndSwitch WEnd
I'd appreciate any help you guys can toss my way.
thanks
ps. different issue all together, but i just installed the latest autoit+scite on my laptop to travel with and it doesn't seem to recognize/ autocomplete functions from #includes like it does on my other versions.