Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/18/2023 in all areas

  1. @bdr529 I was just looking at this earlier. //table//tr[1]/* seems to work for both scenarios, but it might be good to only include td or th elements. Edit: This is what I plan to use going forward -- //table/tbody/tr[1]/*[self::td or self::th]
    2 points
  2. Example of a single glyph (once rendered) using pre-computed surrogates: ; A familly with different Fitzpatrick settings = only one glyph $s = ChrW(0xD83D) & ChrW(0xDC68) & ChrW(0xD83C) & ChrW(0xDFFB) & ChrW(0x200D) & ChrW(0xD83D) & ChrW(0xDC69) & ChrW(0xD83C) & ChrW(0xDFFF) & ChrW(0x200D) & ChrW(0xD83D) & ChrW(0xDC66) & ChrW(0xD83C) & ChrW(0xDFFD) MsgBox(0, "", $s) If displayed on a Unicode-aware console (I'm using font DejaVu), this is 👨🏻‍👩🏿‍👦🏽 else in the MsgBox the default font is much less pretty. EDIT: I just notice that the html-ed string is showing as 3 separate glyphs (ZWJ gets ignored), contrary to what I get displayed here.
    1 point
  3. If you have a "basic" table that you want to extract quickly, you could probably use a bit of JavaScript to build a pipe and newline delimited table. See _WD_ExecuteScript and use something similar to this script: // Accepts an HtmlElement currently for ease in testing. Modify to accept an XPath/Id? function tableExport(table){ var tbody = table.getElementsByTagName("tbody")[0]; var text = ""; // For each row for(let row of tbody.getElementsByTagName("tr")){ // For each cell in the row for(let cell of row.getElementsByTagName("td")){ // Note .innerText might not be what you want here, modify as needed text += cell.innerText + "|"; } text = text.slice(0, -1) + '\n'; } return text.slice(0, -1); }
    1 point
  4. While I mostly agree, it can also make you dangerous ... especially if you don't have enough. It can also make you more acutely aware of your situation ... which might not make you happy, if you feel trapped in it etc. The moral of all that, is to not feel trapped using just AutoIt ... if indeed it could feel that way to you. Follow you heart, so they say .... perhaps your mind too.
    1 point
  5. Found a function example by trancexx on how to calculate the high and low surrogate. #include <GUIConstantsEx.au3> Local $hGUI = GUICreate("Test", 200, 90) Local $hLabel = GUICtrlCreateLabel("", 5, 5, 190, 130) GUICtrlSetFont($hLabel, 48) ; https://www.gaijin.at/de/infos/unicode-zeichentabelle-piktogramme-3 GUICtrlSetData($hLabel, " " & _ChrW(0x1F50A) & " " & _ChrW(0x1F525)) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Func _ChrW($iCodePoint) ; By trancexx ; https://www.autoitscript.com/forum/topic/149307-another-unicode-question/?do=findComment&comment=1064547 If $iCodePoint <= 0xFFFF Then Return ChrW($iCodePoint) If $iCodePoint > 0x10FFFF Then Return SetError(1, 0, "") Local $tOut = DllStructCreate("word[2]") Local $high_surrogate = BitShift($iCodePoint, 10) + 0xD7C0 Local $low_surrogate = BitAND($iCodePoint, 0x3FF) + 0xDC00 ConsoleWrite("CodePoint = " & @tab& @tab & Hex($iCodePoint,4) & @crlf) ConsoleWrite("High Surrogate = " & @tab & Hex($high_surrogate, 4) & @CRLF) ConsoleWrite("Low Surrogate = " & @tab & Hex($low_surrogate, 4) & @CRLF) ConsoleWrite(@CRLF) DllStructSetData($tOut, 1, $high_surrogate, 1) DllStructSetData($tOut, 1, $low_surrogate, 2) Return BinaryToString(DllStructGetData(DllStructCreate("byte[4]", DllStructGetPtr($tOut)), 1), 2) EndFunc ;==>_ChrW
    1 point
  6. Latest update just released. See below for change log.
    1 point
  7. I think we all agree, even OP, that the more knowledge one has, the better. While it's not mandatory, the more knowledge you have, the more interesting things you can do and create on your own. Sure if someone else does it for you then it's easier, but it's not the same thing... "Knowledge makes you free" (Socrates)
    1 point
  8. It's a simple call of SystemParametersInfo. #include <WinAPISys.au3> ; SPI_SETLOGICALDPIOVERRIDE = 0x009F ; SPIF_UPDATEINIFILE = 0x0001 _WinAPI_SystemParametersInfo(0x009F, $iScaling, Null, 0x0001) For whatever reason MSDN has a note for SPI_SETLOGICALDPIOVERRIDE and say Do not use.
    1 point
×
×
  • Create New...