Code: Select all
Gui Add, ActiveX, vwb, Shell.Explorer
wb.Navigate("about:blank")
wb.document.parentWindow.eval("var result;")
result := Sin(1)
wb.document.parentWindow.result := result
wb.document.parentWindow.eval("alert(result+'='+typeof result);") ; <-- 0.841471=string
ExitApp
return ; <-- end of Auto-execute Section
dummy(){
SetFormat, %foo%, %bar% ; <-- should have no effect. Comment this to see the difference.
}
Actual behavior: the alert in JS outputs 0.841471=string
Workarounds:
- don't assign result := Sin(1). Instead, directly assign wb.document.parentWindow.result := Sin(1)
- take out the SetFormat line (although it's not used at all)