Skip to content

Instantly share code, notes, and snippets.

View musahi0128's full-sized avatar

Moh. Sarip Hidayat musahi0128

View GitHub Profile
@musahi0128
musahi0128 / odbc.au3
Last active May 7, 2022 11:58
Sample codes to get query result and execute query against MySQL/MariaDB database using AutoIT and ODBC without creating ODBC data source
Global $sDBDriver = "{MariaDB ODBC 3.1 Driver}"
GLobal $sDBServer = "localhost"
Global $sDBUID = "root"
Global $sDBPWD = "pwd"
Global $sDBName = "dbname"
Global $sDBPort = "3306"
Global $sConnectionString = 'Driver=' & $sDBDriver & ';Server=' & $sDBServer & ';UID=' & $sDBUID & ';PWD=' & $sDBPWD & ';DB=' & $sDBName & ';Port=' & $sDBPort
Func _GetQueryResult($sQuery = "")
@musahi0128
musahi0128 / frontend.au3
Last active May 7, 2022 11:50
Sample codes to make an AutoIT frontend using IE UDF and HTML
#include <GUIConstantsEx.au3>
#include <IE.au3>
$Form1 = GUICreate("HTML Button Test",600,600,-1,-1)
$oIE = _IECreateEmbedded()
$oIE_ctrl = GUICtrlCreateObj($oIE,16,16,568,568)
_IENavigate($oIE, "about:blank")
_IEDocWriteHTML($oIE, "<html><head></head><body scroll=""no"" style=""background:'f0f0f0';border:0;font-family:verdana;font-size:64px"" oncontextmenu=""return false""><input type=""button"" value=""Click me!"" id=""Button1"" style=""width:128;height:128""/></body></html>")
$oButton1 = _IEGetObjById($oIE, "Button1")
ObjEvent($oButton1, "Button1_")