AutoHotkey V1 V2 - Using JavaScript in GUIs

Published: 07 September 2024
on channel: TAB Nation - Automation
502
22

Sorry having issues with recorder but here is sample code.
Will need to add angled brackets as I cant post that in desc.

V1================
JS = function JS(x, y) { alert("I am an alert box!") }
HTML := "script" JS "script"
Gui, Add, ActiveX, w200 h200 vWB, about:!DOCTYPE html
WB.Document.Open(), WB.Document.Write(HTML), WB.Document.Close()
HTMLWindow := WB.Document.parentWindow
F1:: HTMLWindow.JS(10, 20)

v2=====
#Requires AutoHotkey v2+
JS := "function JS(x, y) { alert(`"I am an alert box!`") }"
HTML := "script" JS "/script"
myGui := Gui()
ogcActiveXWB := myGui.Add("ActiveX", "w200 h200 vWB", "about:!DOCTYPE html")
WB := ogcActiveXWB.Value
WB.Document.Open(), WB.Document.Write(HTML), WB.Document.Close()
HTMLWindow := WB.Document.parentWindow
F1::
{
HTMLWindow.JS(10, 20)
}

If you find my video helpful help me to upgrade my videos with a small donation. TY so much for any help!

Free AHK Chrome Ext 💻 = https://shorturl.at/bpwBV

Discord ✅ tabberman 4162
Website ✅ Tabnationcoding.com
Paypal ✅ paypal.me/tabnationYT
For Hire ✅ https://tabnationcoding.com/hire/
TikTok ✅ https://www.tiktok.com/@tabnationauto...
Facebook ✅ https://www.facebook.com/profile.php?...


Watch video AutoHotkey V1 V2 - Using JavaScript in GUIs online, duration hours minute second in high quality that is uploaded to the channel TAB Nation - Automation 07 September 2024. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 502 times and liked it 22 visitors.