Seems like after the JsRT.ahk library created by @lexikos exits and tries to free the loaded dll, Autohotkey tries to read an invalid location in memory and we end up getting an error on program exit
Code: Select all
; plugin.js file
function filter_data(selected_text)
{
return [ { text : 'hey man'} ];
}
Code: Select all
; test.ahk file
#SingleInstance
#Include <JsRT>
js_plugin := (JsRT.Edge)()
plugin_code := FileRead(A_ScriptDir "\plugin.js")
try js_plugin.Exec(plugin_code)
catch Error as e
msgbox e.What " " e.Message
com_matches := js_plugin.filter_data("test test")
matches := []
loop com_matches.length
{
match := com_matches.%A_Index-1%
matches.Push({text : "hi"})
}
MsgBox matches.length
Error IMG
Any ideas whether this is an Autohotkey bug or am I doing something wrong here?