Leaderboard
Popular Content
Showing content with the highest reputation on 03/31/2022 in all areas
-
You could do this: _DefaultBroswerLoadPage() Func _DefaultBroswerLoadPage() Local $sUrl = "http://localhost:80" TCPStartup() $iMainSocket = TCPListen("127.0.0.1", 80) ShellExecute($sUrl) Local $iConnectedSocket = -1 Local $hTimer = TimerInit() Local $bErrorTimeout = False Do Sleep(300) $iConnectedSocket = TCPAccept($iMainSocket) If TimerDiff($hTimer) > (1000 * 5) Then $bErrorTimeout = True ExitLoop EndIf Until $iConnectedSocket <> -1 If $bErrorTimeout Then TCPShutdown() Return "" EndIf Local $sReceived = TCPRecv($iConnectedSocket, 1024) ;~ $sReceived = BinaryToString($sReceived, 4) TCPSend($iConnectedSocket, '<h1 style="text-align: center;color: blue;font-size: 40px;">AutoIt Rocks</h1><p style="color: red; font-size: 30px;text-align: center;">@AutoItVersion: ' & @AutoItVersion & '<br><br>' & "@AutoItPID: " & @AutoItPID & '</p>') If $iConnectedSocket <> -1 Then TCPCloseSocket($iConnectedSocket) TCPShutdown() EndFunc ;==>_DefaultBroswerLoadPage Saludos5 points
-
@Danyfirex that's very nice 👍. Bravo! _DefaultBroswerLoadPage() Func _DefaultBroswerLoadPage() Local $sUrl = "http://localhost:80" TCPStartup() $iMainSocket = TCPListen("127.0.0.1", 80) ShellExecute($sUrl) Local $iConnectedSocket = -1 Local $hTimer = TimerInit() Local $bErrorTimeout = False Do Sleep(300) $iConnectedSocket = TCPAccept($iMainSocket) If TimerDiff($hTimer) > (1000 * 5) Then $bErrorTimeout = True ExitLoop EndIf Until $iConnectedSocket <> -1 If $bErrorTimeout Then TCPShutdown() Return "" EndIf Local $sReceived = TCPRecv($iConnectedSocket, 1024) ;~ $sReceived = BinaryToString($sReceived, 4) TCPSend($iConnectedSocket, '<h1 style="text-align: center;color: blue;font-size: 40px;">AutoIt Rocks</h1><p style="color: red; font-size: 30px;text-align: center;">@AutoItVersion: ' & _ @AutoItVersion & '<br> <img src="https://www.autoitscript.com/forum/uploads/monthly_2019_01/1.thumb.jpg.4e910845fcf6cc195122be1deb540735.jpg" width="100" height="100"> <br>' & _ "@AutoItPID: " & @AutoItPID & '</p>') If $iConnectedSocket <> -1 Then TCPCloseSocket($iConnectedSocket) TCPShutdown() EndFunc ;==>_DefaultBroswerLoadPage1 point
-
FULL _ArrayDisplay which contains another arrays
pixelsearch reacted to jchd for a topic
Sorry, didn't notice where the post I linked was sitting. Here's the meat: #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Compile_Both=n ;~ #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Run_AU3Check=n #include-once #include <Math.au3> Global Const $_TAB = ' ' ; user-callable function, so that noone messes with __VarDump indentation ; $vVar is the variable to be dumped ; $iLimit is the max number of entries of an array, map or DllStruct array element to be displayed in full Func _VarDump(ByRef $vVar, $iLimit = 20) If $iLimit < 3 Then $iLimit = 0 Return(__VarDump($vVar, $iLimit)) EndFunc ; =>_VarDump Func __VarDump(ByRef $vVar, $iLimit, $sIndent = '') Local $ret, $len, $ptr Select Case IsString($vVar) $len = StringLen($vVar) Return 'String (' & $len & ") " & __DumpStr($vVar) Case VarGetType($vVar) = "Double" Return 'Double ' & $vVar & (IsInt($vVar) ? '.0' : '') Case IsInt($vVar) Return VarGetType($vVar) & ' ' & $vVar Case IsArray($vVar) Local $iDimensions = UBound($vVar, 0) Local $iCells = 1 $ret = 'Array' $iDimensions -= 1 For $i = 0 To $iDimensions $ret &= '[' & UBound($vVar, $i + 1) & ']' $iCells *= UBound($vVar, $i + 1) Next If $iCells = 0 Then Return $ret & $_TAB & ' (array is empty)' Else Return $ret & @CRLF & __VarDumpArray($vVar, $iLimit, $sIndent) EndIf Case IsBinary($vVar) $len = BinaryLen($vVar) $ret = 'Binary (' & BinaryLen($vVar) & ') ' Return($ret & (($len <= 32) ? $vVar : BinaryMid($vVar, 1, 16) & ' ... ' & StringTrimLeft(BinaryMid($vVar, $len - 15, 16), 2))) Case IsBool($vVar) Return 'Boolean ' & $vVar Case IsKeyword($vVar) Return('Keyword ' & ($vVar = Null ? 'Null' : ($vVar = Default ? 'Default' : 'Other keyword'))) Case IsHWnd($vVar) Return 'HWnd ' & $vVar Case IsPtr($vVar) Return 'Pointer ' & $vVar Case IsObj($vVar) Return 'Object ' & ObjName($vVar) Case IsFunc($vVar) Return StringFormat('%-13s', VarGetType($vVar)) & FuncName($vVar) Case IsDllStruct($vVar) $len = DllStructGetSize($vVar) $ptr = DllStructGetPtr($vVar) $ret = 'Struct (' & $len & ') @:' & Hex($ptr) & ' (structure alignment is unknown)' & @CRLF Local $nbElem = 1, $idx, $incr, $data, $type, $indent = $sIndent & $_TAB, $oldvalue, $readvalue, $field, $elem While 1 $data = DllStructGetData($vVar, $nbElem) If @error = 2 Then ExitLoop $type = VarGetType($data) $idx = 1 $incr = 0 ; determine max index of element While 1 DllStructGetData($vVar, $nbElem, 2 * $idx) If @error = 3 Then ExitLoop $incr = $idx $idx *= 2 WEnd ; index is in [$idx, (2 * $idx) - 1] $idx += $incr Do DllStructGetData($vVar, $nbElem, $idx) If @error = 3 Then ; approach is asymetric (upper bound is too big) $idx -= ($incr = 1) ? 1 : $incr / 2 Else $idx += Int($incr / 2) EndIf $incr = Int($incr / 2) Until $incr = 0 Switch $type Case "Int32", "Int64" $ret &= $indent $data = DllStructGetData($vVar, $nbElem, 1) DllStructSetData($vVar, $nbElem, 0x7777666655554433, 1) $readvalue = DllStructGetData($vVar, $nbElem, 1) Switch $readvalue Case 0x7777666655554433 $elem = "int64" ; alias: uint64 ; alias: int_ptr(x64), long_ptr(x64), lresult(x64), lparam(x64) ; alias: uint_ptr(x64), ulong_ptr(x64), dword_ptr(x64), wparam(x64) Case 0x55554433 DllStructSetData($vVar, $nbElem, 0x88887777, 1) $readvalue = DllStructGetData($vVar, $nbElem, 1) $elem = ($readvalue > 0 ? "uint" : "int") ; int aliases: long, bool, int_ptr(x86), long_ptr(x86), lresult(x86), lparam(x86); ; uint aliases: ulong, dword, uint_ptr(x86), ulong_ptr(x86), dword_ptr(x86), wparam(x86) Case 0x4433 DllStructSetData($vVar, $nbElem, 0x8888, 1) $readvalue = DllStructGetData($vVar, $nbElem, 1) $elem = ($readvalue > 0 ? "ushort" : "short") ; ushort alias: word Case 0x33 $elem = "byte" ; alias: ubyte EndSwitch DllStructSetData($vVar, $nbElem, $data, 1) If $idx = 1 Then $ret &= StringFormat('%-' & 9 + StringLen($len) & 's ', $elem) & $data & @CRLF Else $ret &= $elem & "[" & $idx & "]" & @CRLF For $i = 1 To $idx If $iLimit And $idx > $iLimit And $i > $iLimit Then $ret &= $indent & StringFormat('%-' & 9 + StringLen($len) & 's ', '') & '... there are ' & $idx - $iLimit & ' more ' & $elem & ' in this array' & @CRLF ExitLoop Else $ret &= $indent & StringFormat('%-' & 9 + StringLen($len) & 's ', '') & DllStructGetData($vVar, $nbElem, $i) & @CRLF EndIf Next EndIf Case "String" $oldvalue = DllStructGetData($vVar, $nbElem, 1) DllStructSetData($vVar, $nbElem, ChrW(0x2573), 1) $readvalue = DllStructGetData($vVar, $nbElem, 1) DllStructSetData($vVar, $nbElem, $oldvalue, 1) $elem = ($readvalue = ChrW(0x2573) ? "wchar" : "char") If $idx > 1 Then $elem &= "[" & $idx & "]" $ret &= $indent & StringFormat('%-' & 9 + StringLen($len) & 's ', $elem) & __DumpStr($data) & @CRLF Case "Binary" Local $blen = BinaryLen($data) $elem = "byte" If $idx > 1 Then $elem &= "[" & $idx & "]" $ret &= $indent & StringFormat('%-' & 9 + StringLen($len) & 's ', $elem) & (($blen <= 32) ? $data : BinaryMid($data, 1, 16) & ' ... ' & StringTrimLeft(BinaryMid($data, $blen - 15, 16), 2)) & @CRLF Case "Ptr" $ret &= $indent $elem = "ptr" ; alias: hwnd, handle If $idx = 1 Then $ret &= StringFormat('%-' & 9 + StringLen($len) & 's ', $elem) & $data & @CRLF Else $ret &= $elem & "[" & $idx & "]" & @CRLF For $i = 1 To $idx $ret &= $indent & StringFormat('%-' & 9 + StringLen($len) & 's ', '') & DllStructGetData($vVar, $nbElem, $i) & @CRLF Next EndIf Case "Double" $ret &= $indent $oldvalue = DllStructGetData($vVar, $nbElem, 1) DllStructSetData($vVar, $nbElem, 10^-15, 1) $readvalue = DllStructGetData($vVar, $nbElem, 1) DllStructSetData($vVar, $nbElem, $oldvalue, 1) $elem = ($readvalue = 10^-15 ? "double" : "float") If $idx = 1 Then $ret &= StringFormat('%-' & 9 + StringLen($len) & 's ', $elem) & $data & (IsInt($data) ? '.0' : '') & @CRLF Else $ret &= $elem & "[" & $idx & "]" & @CRLF For $i = 1 To $idx If $iLimit And $idx > $iLimit And $i > $iLimit Then $ret &= $indent & StringFormat('%-' & 9 + StringLen($len) & 's ', '') & '... there are ' & $idx - $iLimit & ' more ' & $elem & ' in this array' & @CRLF ExitLoop Else $ret &= $indent & StringFormat('%-' & 9 + StringLen($len) & 's %s', '', DllStructGetData($vVar, $nbElem, $i)) & (IsInt(DllStructGetData($vVar, $nbElem, $i)) ? '.0' : '') & @CRLF EndIf Next EndIf EndSwitch $nbElem += 1 WEnd Return StringTrimRight($ret, 2) Case IsMap($vVar) Local $iCells = UBound($vVar) $ret = 'Map[' & $iCells & ']' If $iCells = 0 Then Return $ret & $_TAB & ' (map is empty)' Else Return $ret & @CRLF & __VarDumpMap($vVar, $iLimit, $sIndent) EndIf Case Else Return StringFormat('%-13s', VarGetType($vVar)) & $vVar EndSelect EndFunc ;==>__VarDump Func __VarDumpArray(ByRef $aArray, $iLimit, $sIndent = $_TAB) Local $sDump, $sArrayFetch, $sArrayRead, $iDone = 0, $iElements = 1 Local $iDimensions = UBound($aArray, 0) Local $aUBounds[$iDimensions] Local $aIndices[$iDimensions] $iDimensions -= 1 For $i = 0 To $iDimensions $aUBounds[$i] = UBound($aArray, $i + 1) - 1 $iElements *= $aUBounds[$i] + 1 $aIndices[$i] = 0 Next $sIndent &= $_TAB While $iDone < ($iLimit ? _Min($iLimit, $iElements) : $iElements) $sArrayFetch = '' For $i = 0 To $iDimensions $sArrayFetch &= '[' & $aIndices[$i] & ']' Next $sArrayRead = Execute('$aArray' & $sArrayFetch) $sDump &= $sIndent & $sArrayFetch & ' => ' & __VarDump($sArrayRead, $iLimit, $sIndent) & @CRLF $iDone += 1 If $iLimit And $iDone = $iLimit Then $sDump &= $sIndent & '... there are ' & $iElements - $iDone & ' more elements in this array' & @CRLF ExitLoop EndIf For $i = $iDimensions To 0 Step -1 $aIndices[$i] += 1 If $aIndices[$i] > $aUBounds[$i] Then $aIndices[$i] = 0 Else ExitLoop EndIf Next WEnd Return(StringTrimRight($sDump, 2)) EndFunc ;==>__VarDumpArray Func __VarDumpMap(ByRef $mMap, $iLimit, $sIndent = $_TAB) Local $i = 0, $sDump $sIndent &= $_TAB For $key In Mapkeys($mMap) $sDump &= $sIndent & StringFormat('%-16s => ', _ "[" & (IsString($key) ? __DumpStr($key) : $key) & "]") $sDump &= __VarDump($mMap[$key], $iLimit, $sIndent) & @CRLF If $iLimit And $i = $iLimit - 1 Then $sDump &= $sIndent & '... there are ' & UBound($mMap) - $i - 1 & ' more elements in this map' & @CRLF ExitLoop EndIf $i += 1 Next Return(StringTrimRight($sDump, 2)) EndFunc ;==>__VarDumpMap Func __DumpStr($vVar) Local $len = StringLen($vVar) $vVar = Execute("'" & StringRegExpReplace(StringReplace($vVar, "'", "''"), "([\p{Cc}])", "<0x' & Hex(AscW('$1'), 2) & '>") & "'") Return "'" & (($len <= 64) ? $vVar : StringMid($vVar, 1, 32) & ' ... ' & StringTrimLeft(StringMid($vVar, $len - 31, 32), 2)) & "'" EndFunc ;==>__DumpStr ; example use Local $tTest = DllStructCreate("byte;byte[3];char;char[3];wchar;wchar[3];short;short[3];ushort;ushort[3];int;int[3];uint;uint[3];int64;int64[3];uint64;uint64[3];float;float[3];double;double[3];handle;handle[3];boolean;bool;hwnd;handle;int_ptr;long_ptr;lresult;lparam;uint_ptr;ulong_ptr;dword_ptr;wparam") DllStructSetData($tTest, 2, '€') DllStructSetData($tTest, 6, '€') _ConsoleWrite('Test structure types' & @LF & _VarDump($tTest) & @LF & @LF) Local $struct = DllStructCreate("char[3];handle[3];uint[35];byte[128];wchar[190000]; double[3];int64[3];char[3];float;double;byte;byte;short;ushort;int;uint;char") DllStructSetData($struct, 1, 'sos') DllStructSetData($struct, 2, Ptr(123456789)) DllStructSetData($struct, 3, 8, 1) DllStructSetData($struct, 3, 0x87654321, 2) DllStructSetData($struct, 3, 256, 5) DllStructSetData($struct, 4, Binary('sos')) DllStructSetData($struct, 5, 'gno' & @CRLF & 'j''i' & @TAB & 'o') DllStructSetData($struct, 6, 3.1415926, 2) DllStructSetData($struct, 7, 17, 1) DllStructSetData($struct, 7, -1, 2) DllStructSetData($struct, 8, 'end') DllStructSetData($struct, 9, 2.7182818284590452353602874713527) DllStructSetData($struct, 10, 2.7182818284590452353602874713527) DllStructSetData($struct, 11, 107) DllStructSetData($struct, 12, -108) DllStructSetData($struct, 13, 109) DllStructSetData($struct, 14, 110) DllStructSetData($struct, 15, 111) DllStructSetData($struct, 16, 112) Local $f = _VarDump Local $c[2][0] Local $e = [[Null, Default], [__DumpStr, MsgBox]] Local Enum $p = 33333333333333 Opt("WinTitleMatchMode", 2) Local $a[3][4] = [ _ [$c, $e, ObjCreate("shell.application"), WinGetHandle("Dump.au3")], _ ['zzz', 1/3, True, 0x123456], _ [$struct, 93, Null, $p] _ ] _ConsoleWrite('Test example of moderate complexity' & @LF & $f($a) & @LF) Func _ConsoleWrite($s) ConsoleWrite(BinaryToString(StringToBinary($s, 4), 1)) EndFunc1 point -
you are master1 point
-
Maybe this could interest you: https://www.autoitscript.com/forum/topic/182856-array-viewer/1 point
-
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
argumentum reacted to Jos for a topic
mmm guess I goofed up and we have issues with the EXPAND again ..... checking... Fixed in latest Beta. ... and also updated AutoItTools.lua as I noticed that the expansion didn't work correctly when type a abbrev in front of another text and then hitting the space.1 point -
Uploaded a new version of the SciTE4AutoIt3.exe v21.316.1639.1
argumentum reacted to Jos for a topic
Think I found the issue with that one. Please try current beta SciLexer.dll.1 point -
Info Chrome automation - (Moved)
MarcoMonte reacted to Nine for a topic
_Json(2021.11.20).zip WinHttp.zip1 point -
Thanks. Fixed: _WD_Action($sSession, "URL")1 point
-
1 point
-
Windows 11 and the IE udf
mLipok reacted to argumentum for a topic
alright. Set it to never and it uses Explorer1 point -
Windows 11 and the IE udf
argumentum reacted to mLipok for a topic
Little refactored version: ; Trap COM errors so that 'Back' and 'Forward' ; outside of history bounds does not abort script ; (expect COM errors to be sent to the console) #include <GUIConstantsEx.au3> #include <IE.au3> #include <WindowsConstants.au3> Global $oIE Global $g_idError_Message _IEErrorHandlerRegister() _Example() Exit Func _Example() $oIE = _IECreateEmbedded() GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) Local $iEmbededIE = GUICtrlCreateObj($oIE, 5, 5, 640-10, 360) GUICtrlSetResizing($iEmbededIE, $GUI_DOCKAUTO) Local $idButton_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30) Local $idButton_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) Local $idButton_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30) Local $idButton_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30) GUICtrlCreateLabel("Examples", 10, 462, 100, 21) Local $idExamples = GUICtrlCreateCombo("", 110, 460, 300, 25) GUICtrlSetData($idExamples, "basic|form|table|frameset|iframe", "basic") $g_idError_Message = GUICtrlCreateLabel("", 100, 500, 500, 30) GUICtrlSetColor(-1, 0xff0000) GUISetState(@SW_SHOW) ;Show GUI __IE_Example(GUICtrlRead($idExamples)) _IEAction($oIE, "stop") ; Waiting for user to close the window While 1 Local $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE ExitLoop Case $iMsg = $idButton_Home _IENavigate($oIE, "http://www.autoitscript.com") _IEAction($oIE, "stop") _IEAction($oIE, "back") CheckError("Home", @error, @extended) Case $iMsg = $idButton_Back _IEAction($oIE, "back") CheckError("Back", @error, @extended) Case $iMsg = $idButton_Forward _IEAction($oIE, "forward") CheckError("Forward", @error, @extended) Case $iMsg = $idButton_Stop _IEAction($oIE, "stop") CheckError("Stop", @error, @extended) Case $iMsg = $idExamples __IE_Example(GUICtrlRead($idExamples)) EndSelect WEnd GUIDelete() EndFunc ;==>_Example Func CheckError($sMsg, $iError, $iExtended) If $iError Then $sMsg = "Error using " & $sMsg & " button (" & $iExtended & ")" Else $sMsg = "" EndIf GUICtrlSetData($g_idError_Message, $sMsg) EndFunc ;==>CheckError Func __IE_Example($sModule = "basic") Local $sHTML = "" Switch $sModule Case "basic" $sHTML &= '<!DOCTYPE html>' & @CR $sHTML &= '<html>' & @CR $sHTML &= '<head>' & @CR $sHTML &= '<meta content="text/html; charset=UTF-8" http-equiv="content-type">' & @CR $sHTML &= '<title>_IE_Example("basic")</title>' & @CR $sHTML &= '<style>body {font-family: Arial}</style>' & @CR $sHTML &= '</head>' & @CR $sHTML &= '<body>' & @CR $sHTML &= '<a href="http://www.autoitscript.com"><img src="http://www.autoitscript.com/images/logo_autoit_210x72.png" id="AutoItImage" alt="AutoIt Homepage Image" style="background: #204080;"></a>' & @CR $sHTML &= '<p></p>' & @CR $sHTML &= '<div id="line1">This is a simple HTML page with text, links and images.</div>' & @CR $sHTML &= '<br>' & @CR $sHTML &= '<div id="line2"><a href="http://www.autoitscript.com">AutoIt</a> is a wonderful automation scripting language.</div>' & @CR $sHTML &= '<br>' & @CR $sHTML &= '<div id="line3">It is supported by a very active and supporting <a href="http://www.autoitscript.com/forum/">user forum</a>.</div>' & @CR $sHTML &= '<br>' & @CR $sHTML &= '<div id="IEAu3Data"></div>' & @CR $sHTML &= '</body>' & @CR $sHTML &= '</html>' _IENavigate($oIE, "about:blank") _IEDocWriteHTML($oIE, $sHTML) Case "table" $sHTML &= '<!DOCTYPE html>' & @CR $sHTML &= '<html>' & @CR $sHTML &= '<head>' & @CR $sHTML &= '<meta content="text/html; charset=utf-8" http-equiv="content-type">' & @CR $sHTML &= '<title>_IE_Example("table")</title>' & @CR $sHTML &= '<style>body {font-family: Arial}</style>' & @CR $sHTML &= '</head>' & @CR $sHTML &= '<body>' & @CR $sHTML &= '$oTableOne = _IETableGetObjByName($oIE, "tableOne")<br>' & @CR $sHTML &= '<table border=1 id="tableOne"><br>' & @CR $sHTML &= '<table border=1 id="tableOne">' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>AutoIt</td>' & @CR $sHTML &= ' <td>is</td>' & @CR $sHTML &= ' <td>really</td>' & @CR $sHTML &= ' <td>great</td>' & @CR $sHTML &= ' <td>with</td>' & @CR $sHTML &= ' <td>IE.au3</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>1</td>' & @CR $sHTML &= ' <td>2</td>' & @CR $sHTML &= ' <td>3</td>' & @CR $sHTML &= ' <td>4</td>' & @CR $sHTML &= ' <td>5</td>' & @CR $sHTML &= ' <td>6</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>the</td>' & @CR $sHTML &= ' <td>quick</td>' & @CR $sHTML &= ' <td>red</td>' & @CR $sHTML &= ' <td>fox</td>' & @CR $sHTML &= ' <td>jumped</td>' & @CR $sHTML &= ' <td>over</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>the</td>' & @CR $sHTML &= ' <td>lazy</td>' & @CR $sHTML &= ' <td>brown</td>' & @CR $sHTML &= ' <td>dog</td>' & @CR $sHTML &= ' <td>the</td>' & @CR $sHTML &= ' <td>time</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>has</td>' & @CR $sHTML &= ' <td>come</td>' & @CR $sHTML &= ' <td>for</td>' & @CR $sHTML &= ' <td>all</td>' & @CR $sHTML &= ' <td>good</td>' & @CR $sHTML &= ' <td>men</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>to</td>' & @CR $sHTML &= ' <td>come</td>' & @CR $sHTML &= ' <td>to</td>' & @CR $sHTML &= ' <td>the</td>' & @CR $sHTML &= ' <td>aid</td>' & @CR $sHTML &= ' <td>of</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= '</table>' & @CR $sHTML &= '<br>' & @CR $sHTML &= '$oTableTwo = _IETableGetObjByName($oIE, "tableTwo")<br>' & @CR $sHTML &= '<table border="1" id="tableTwo"><br>' & @CR $sHTML &= '<table border=1 id="tableTwo">' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td colspan="4">Table Top</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>One</td>' & @CR $sHTML &= ' <td colspan="3">Two</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>Three</td>' & @CR $sHTML &= ' <td>Four</td>' & @CR $sHTML &= ' <td colspan="2">Five</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>Six</td>' & @CR $sHTML &= ' <td colspan="3">Seven</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= ' <tr>' & @CR $sHTML &= ' <td>Eight</td>' & @CR $sHTML &= ' <td>Nine</td>' & @CR $sHTML &= ' <td>Ten</td>' & @CR $sHTML &= ' <td>Eleven</td>' & @CR $sHTML &= ' </tr>' & @CR $sHTML &= '</table>' & @CR $sHTML &= '</body>' & @CR $sHTML &= '</html>' _IENavigate($oIE, "about:blank") _IEDocWriteHTML($oIE, $sHTML) Case "form" $sHTML &= '<!DOCTYPE html>' & @CR $sHTML &= '<html>' & @CR $sHTML &= '<head>' & @CR $sHTML &= '<meta content="text/html; charset=UTF-8" http-equiv="content-type">' & @CR $sHTML &= '<title>_IE_Example("form")</title>' & @CR $sHTML &= '<style>body {font-family: Arial}' & @CR $sHTML &= 'td {padding:6px}</style>' & @CR $sHTML &= '</head>' & @CR $sHTML &= '<body>' & @CR $sHTML &= '<form name="ExampleForm" onSubmit="javascript:alert(''ExampleFormSubmitted'');" method="post">' & @CR $sHTML &= '<table style="border-spacing:6px 6px;" border=1>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>ExampleForm</td>' & @CR $sHTML &= '<td><form name="ExampleForm" onSubmit="javascript:alert(''ExampleFormSubmitted'');" method="post"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>Hidden Input Element<input type="hidden" name="hiddenExample" value="secret value"></td>' & @CR $sHTML &= '<td><input type="hidden" name="hiddenExample" value="secret value"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<input type="text" name="textExample" value="http://" size="20" maxlength="30">' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><input type="text" name="textExample" value="http://" size="20" maxlength="30"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<input type="password" name="passwordExample" size="10">' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><input type="password" name="passwordExample" size="10"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<input type="file" name="fileExample">' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><input type="file" name="fileExample"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<input type="image" name="imageExample" alt="AutoIt Homepage" src="http://www.autoitscript.com/images/logo_autoit_210x72.png" style="background: #204080;>' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><input type="image" name="imageExample" alt="AutoIt Homepage" src="http://www.autoitscript.com/images/logo_autoit_210x72.png"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<textarea name="textareaExample" rows="5" cols="15">Hello!</textarea>' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><textarea name="textareaExample" rows="5" cols="15">Hello!</textarea></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<input type="checkbox" name="checkboxG1Example" value="gameBasketball">Basketball<br>' & @CR $sHTML &= '<input type="checkbox" name="checkboxG1Example" value="gameFootball">Football<br>' & @CR $sHTML &= '<input type="checkbox" name="checkboxG2Example" value="gameTennis" checked>Tennis<br>' & @CR $sHTML &= '<input type="checkbox" name="checkboxG2Example" value="gameBaseball">Baseball' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><input type="checkbox" name="checkboxG1Example" value="gameBasketball">Basketball<br><br>' & @CR $sHTML &= '<input type="checkbox" name="checkboxG1Example" value="gameFootball">Football<br><br>' & @CR $sHTML &= '<input type="checkbox" name="checkboxG2Example" value="gameTennis" checked>Tennis<br><br>' & @CR $sHTML &= '<input type="checkbox" name="checkboxG2Example" value="gameBaseball">Baseball</td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<input type="radio" name="radioExample" value="vehicleAirplane">Airplane<br>' & @CR $sHTML &= '<input type="radio" name="radioExample" value="vehicleTrain" checked>Train<br>' & @CR $sHTML &= '<input type="radio" name="radioExample" value="vehicleBoat">Boat<br>' & @CR $sHTML &= '<input type="radio" name="radioExample" value="vehicleCar">Car</td>' & @CR $sHTML &= '<td><input type="radio" name="radioExample" value="vehicleAirplane">Airplane<br><br>' & @CR $sHTML &= '<input type="radio" name="radioExample" value="vehicleTrain" checked>Train<br><br>' & @CR $sHTML &= '<input type="radio" name="radioExample" value="vehicleBoat">Boat<br><br>' & @CR $sHTML &= '<input type="radio" name="radioExample" value="vehicleCar">Car<br></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<select name="selectExample">' & @CR $sHTML &= '<option value="homepage.html">Homepage' & @CR $sHTML &= '<option value="midipage.html">Midipage' & @CR $sHTML &= '<option value="freepage.html">Freepage' & @CR $sHTML &= '</select>' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><select name="selectExample"><br>' & @CR $sHTML &= '<option value="homepage.html">Homepage<br>' & @CR $sHTML &= '<option value="midipage.html">Midipage<br>' & @CR $sHTML &= '<option value="freepage.html">Freepage<br>' & @CR $sHTML &= '</select></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<select name="multipleSelectExample" size="6" multiple>' & @CR $sHTML &= '<option value="Name1">Aaron' & @CR $sHTML &= '<option value="Name2">Bruce' & @CR $sHTML &= '<option value="Name3">Carlos' & @CR $sHTML &= '<option value="Name4">Denis' & @CR $sHTML &= '<option value="Name5">Ed' & @CR $sHTML &= '<option value="Name6">Freddy' & @CR $sHTML &= '</select>' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><select name="multipleSelectExample" size="6" multiple><br>' & @CR $sHTML &= '<option value="Name1">Aaron<br>' & @CR $sHTML &= '<option value="Name2">Bruce<br>' & @CR $sHTML &= '<option value="Name3">Carlos<br>' & @CR $sHTML &= '<option value="Name4">Denis<br>' & @CR $sHTML &= '<option value="Name5">Ed<br>' & @CR $sHTML &= '<option value="Name6">Freddy<br>' & @CR $sHTML &= '</select></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td>' & @CR $sHTML &= '<input name="submitExample" type="submit" value="Submit">' & @CR $sHTML &= '<input name="resetExample" type="reset" value="Reset">' & @CR $sHTML &= '</td>' & @CR $sHTML &= '<td><input name="submitExample" type="submit" value="Submit"><br>' & @CR $sHTML &= '<input name="resetExample" type="reset" value="Reset"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '</table>' & @CR $sHTML &= '<input type="hidden" name="hiddenExample" value="secret value">' & @CR $sHTML &= '</form>' & @CR $sHTML &= '</body>' & @CR $sHTML &= '</html>' _IENavigate($oIE, "about:blank") _IEDocWriteHTML($oIE, $sHTML) Case "frameset" $sHTML &= '<!DOCTYPE html>' & @CR $sHTML &= '<html>' & @CR $sHTML &= '<head>' & @CR $sHTML &= '<meta content="text/html; charset=UTF-8" http-equiv="content-type">' & @CR $sHTML &= '<title>_IE_Example("frameset")</title>' & @CR $sHTML &= '</head>' & @CR $sHTML &= '<frameset rows="25,200">' & @CR $sHTML &= ' <frame name=Top SRC=about:blank>' & @CR $sHTML &= ' <frameset cols="100,500">' & @CR $sHTML &= ' <frame name=Menu SRC=about:blank>' & @CR $sHTML &= ' <frame name=Main SRC=about:blank>' & @CR $sHTML &= ' </frameset>' & @CR $sHTML &= '</frameset>' & @CR $sHTML &= '</html>' _IENavigate($oIE, "about:blank") _IENavigate($oIE, "about:blank") _IEDocWriteHTML($oIE, $sHTML) _IEAction($oIE, "refresh") Local $oFrameTop = _IEFrameGetObjByName($oIE, "Top") Local $oFrameMenu = _IEFrameGetObjByName($oIE, "Menu") Local $oFrameMain = _IEFrameGetObjByName($oIE, "Main") _IEBodyWriteHTML($oFrameTop, '$oFrameTop = _IEFrameGetObjByName($oIE, "Top")') _IEBodyWriteHTML($oFrameMenu, '$oFrameMenu = _IEFrameGetObjByName($oIE, "Menu")') _IEBodyWriteHTML($oFrameMain, '$oFrameMain = _IEFrameGetObjByName($oIE, "Main")') Case "iframe" $sHTML &= '<!DOCTYPE html>' & @CR $sHTML &= '<html>' & @CR $sHTML &= '<head>' & @CR $sHTML &= '<meta content="text/html; charset=UTF-8" http-equiv="content-type">' & @CR $sHTML &= '<title>_IE_Example("iframe")</title>' & @CR $sHTML &= '<style>td {padding:6px}</style>' & @CR $sHTML &= '</head>' & @CR $sHTML &= '<body>' & @CR $sHTML &= '<table style="border-spacing:6px" border=1>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td><iframe name="iFrameOne" src="about:blank" title="iFrameOne"></iframe></td>' & @CR $sHTML &= '<td><iframe name="iFrameOne" src="about:blank" title="iFrameOne"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '<tr>' & @CR $sHTML &= '<td><iframe name="iFrameTwo" src="about:blank" title="iFrameTwo"></iframe></td>' & @CR $sHTML &= '<td><iframe name="iFrameTwo" src="about:blank" title="iFrameTwo"></td>' & @CR $sHTML &= '</tr>' & @CR $sHTML &= '</table>' & @CR $sHTML &= '</body>' & @CR $sHTML &= '</html>' _IENavigate($oIE, "about:blank") _IEDocWriteHTML($oIE, $sHTML) _IEAction($oIE, "refresh") Local $oIFrameOne = _IEFrameGetObjByName($oIE, "iFrameOne") Local $oIFrameTwo = _IEFrameGetObjByName($oIE, "iFrameTwo") _IEBodyWriteHTML($oIFrameOne, '$oIFrameOne = _IEFrameGetObjByName($oIE, "iFrameOne")') _IEBodyWriteHTML($oIFrameTwo, '$oIFrameTwo = _IEFrameGetObjByName($oIE, "iFrameTwo")') Case Else __IEConsoleWriteError("Error", "_IE_Example", "$_IESTATUS_InvalidValue") Return SetError($_IESTATUS_InvalidValue, 1, 0) EndSwitch ; at least under IE10 some delay is needed to have functions as _IEPropertySet() working ; value can depend of processor speed ... Sleep(500) Return SetError($_IESTATUS_Success, 0, $oIE) EndFunc ;==>__IE_Example It is compiliant with Au3Check, and includes some GUI improvements (resizing).1 point -
AutoIt v3.3.16.0 has been released. Thanks to @jpm and the MVPs who were responsible for the majority of code in this version. Download it here. Complete list of changes: History1 point
-
Yes, it is because the function is located in a restricted area. Maybe @jchd could make it as a Script Example (if you ask politely)0 points
-
What holding you back developing this option and proposing an update to the _ArrayDisplay() UDF?0 points