#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
$sTITLE = "Example gets color CSS style"
$sHTML = _
"<html>" _
&"<head>" _
&"<meta charset='utf-8'>" _
&"<title>border-color</title>" _
&"<style>" _
&"#green {" _
&"border: #00ff00 solid 3px;" _
&"height: 150px;" _
&"width: 150px;" _
&"position: absolute;" _
&"top: 10px;" _
&"left: 10px;" _
&"}" _
&"#blue {" _
&"border: #0000ff solid 3px;" _
&"height: 150px;" _
&"width: 150px;" _
&"position: absolute;" _
&"top: 10px;" _
&"left: 173px;" _
&"}" _
&"#red {" _
&"border: #ff0000 solid 3px;" _
&"height: 150px;" _
&"width: 150px;" _
&"position: absolute;" _
&"top: 173px;" _
&"left: 10px;" _
&"}" _
&"#yellow {" _
&"border: #FFFF00 solid 3px;" _
&"height: 150px;" _
&"width: 150px;" _
&"position: absolute;" _
&"top: 173px;" _
&"left: 173px;" _
&"}" _
&"</style>" _
&"</head>" _
&"<body>" _
&"<div id='green'></div>" _
&"<div id='blue'></div>" _
&"<div id='red'></div>" _
&"<div id='yellow'></div>" _
&"</body>" _
&"</html>"
$Form1 = GUICreate($sTITLE, 623, 449, -1, -1)
$oObj1 = ObjCreate("Shell.Explorer.2")
$Obj1_ctrl = GUICtrlCreateObj($oObj1, 2, 2, 618, 396)
$Button1 = GUICtrlCreateButton("green", 62, 411, 155, 25)
$Button2 = GUICtrlCreateButton("blue", 232, 411, 155, 25)
$Button3 = GUICtrlCreateButton("red", 402, 411, 155, 25)
GUISetState(@SW_SHOW)
MsgBox(64, $sTITLE, 'Example tested on Win XP SP3 / IE8!!!')
_IENavigate($oObj1, "about:" & $sHTML)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_GetColor($oObj1, ControlGetText('', '', $Button1))
Case $Button2
_GetColor($oObj1, ControlGetText('', '', $Button2))
Case $Button3
_GetColor($oObj1, ControlGetText('', '', $Button3))
EndSwitch
WEnd
Func _GetColor(ByRef $_Obj, $s_ID)
$oEl = _IEGetObjById($_Obj, $s_ID)
MsgBox(2097152, $sTITLE, StringFormat('#%s -> border: %s %s %s;', _
$s_ID, _
$oEl.currentStyle.borderColor, _
$oEl.currentStyle.borderStyle, _
$oEl.currentStyle.borderWidth))
EndFunc ;==>_GetColor