AutoHotkey V1 V2 - Using JavaScript in GUIs

Опубликовано: 07 Сентябрь 2024
на канале: 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?...


Смотрите видео AutoHotkey V1 V2 - Using JavaScript in GUIs онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал TAB Nation - Automation 07 Сентябрь 2024. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 502 раз и оно понравилось 22 посетителям.