I have been facing one problem whenever tried to run my AHK program overnight for some repititon tasks.
Basically my AHK flow is to read in some values from my Excel sheet and input those value into some software, and getting the software output value back into my Excel file.
This involves using
Excel_Get([_WinTitle]) to activate my Excel file
Excel_GetValue(_ID [, _start]) to read in my Excel value
Excel_SetValue(_ID [, _start, _end, _value]) to enter output value into my Excel Sheet.
Below would be the detail script I get from this website.
ControlGet, hwnd, hwnd, , Excel71, %_WinTitle%
return, Excel_Acc_ObjectFromWindow(hwnd, -16).Application
Excel_SetValue(_ID, _start="A1", _end="", _value="")
_end:=(_end=="") ? _start : _end
If (StrLen(_start)<2 || StrLen(_end)<2)
_ID.Range(_start ":" _end).value:=_value}
My AHK works properly on few repetitions. If I were to repeat my task for like thousand time.
My AHK scripts failed during the way. The error message specified that the above functions cannot be
called or rejected by callee.
I am not sure why this problems arise in my older PC but not my new PC.
The only clue I can think of is my PC spec. My old PC spec is having a RAM of 512MB while my new PC has
at least 4 GB. Is there any reason why these happen or how can I improve my AHK stability.
I am thinking of writing a short AHK to capture my PC memory space and reset or stop my AHK over some time interval
before continuing with my repitition task.
Any comment would be appreciate.