Leaderboard
Popular Content
Showing content with the highest reputation on 10/01/2022 in all areas
-
I don't know of a way to change the timeout settings for the _InetGetSource() function itself. However, if I needed control over HTTP request timeouts, I would most likely use the WinHTTPRequest object instead of _InetGetSource(). Specifically, I would use the SetTimeouts method of the object to set the desired timeouts. As you can see HERE, there's more than 1 timeout for a request. The SetTimeouts method allows you to set them as you desire. It would look something like this: ... $oHttp.SetTimeouts(5000, 5000, 5000, 5000) ...1 point
-
long time to load XML values into the array
argumentum reacted to TheXman for a topic
I could, but I was trying to gauge @lesmly's interest by seeing some effort. As it says in my profile's About Me, I'm "Always willing to help those who are engaged in active learning, not passive receipt of information.". So if/when I see no effort to learn, I know not to waste my time.1 point -
Dragging and dropping web elements
ThomasBennett reacted to Danp2 for a topic
Glad you found a solution that works for you.1 point -
I would use RunWait() and not a fixed Sleep(). So you don't need to use ProcessClose() without knowing what's going on. Your programming style is a bit strange for me by the way. I would clean up the code and use [($i -1) * 4 + 1] as indexer for line one.1 point
-
[Solved] How can I use _GDIPlus_FontPrivateAddMemoryFont() on a button control?
pixelsearch reacted to funkey for a topic
@pixelsearch: If we already have the font file on disk, you can use '_WinAPI_AddFontResourceEx' instead of '_WinAPI_AddFontMemResourceEx'. Example is also in help file. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPIGdi.au3> Example() Func Example() Local $sFontFile = @ScriptDir & "\Ethnocen.ttf" Local $hGUI = GUICreate("GDI", 720, 235) Local $idButton = GUICtrlCreateButton("AutoIt" & @CRLF & "forever", 100, 32, 520, 170, $BS_MULTILINE) _WinAPI_AddFontResourceEx($sFontFile, $FR_PRIVATE) GUICtrlSetFont($idButton, 28, 0, 0, "Ethnocentric") GUISetState() ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources ; If not removed font is installed until system restart _WinAPI_RemoveFontResourceEx($sFontFile, $FR_PRIVATE) EndFunc ;==>Example1 point -
May have answered my own question, although if there is an easier or better way to accomplish this I'm all ears. What I did: Edit the AutoIt3Wrapper.au3 file found in the C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper folder. In the 'Compile_Upd_res' function I changed this line: If $INP_ProductVersion = "" Then $INP_ProductVersion = FileGetVersion($AutoItBin) to If $INP_ProductVersion = "" Then $INP_ProductVersion = $INP_Fileversion In version 21.316.1639.1 of the AutoIt3Wrapper.au3 file that ships with AutoIt 3.3.16.1, that's line # 2558. With this change, instead of defaulting to the AutoIt.exe version number if nothing is entered for the Product Version number, it defaults to whatever was entered as the File Version number. But the Product Version can still be specified as something else in the usual way and it works correctly.1 point
-
[Solved] How can I use _GDIPlus_FontPrivateAddMemoryFont() on a button control?
CYCho reacted to pixelsearch for a topic
@CYCho thanks for your explanation. While you were answering right now, I was preparing the following message. Here it is, untouched : Just found @UEZ code "File to Base64 String Code Generator" with his code solving my preceding question like this : _WinAPI_LZNTDecompress($tSource, $tDecompress) ; only 2 arguments, not 3 ... Func _WinAPI_LZNTDecompress(ByRef $tInput, ByRef $tOutput, $iBufferSize = 0x800000) ... No 3rd constant argument anymore when calling the function, but a buffer having a size big enough to take care of the string when decoded. This approach works in the current example (just tested) in case we don't know the exact size of the .ttf file1 point -
[Solved] How can I use _GDIPlus_FontPrivateAddMemoryFont() on a button control?
pixelsearch reacted to CYCho for a topic
The reason I was thinking of memory font was that I had a rare font installed in my own computer and wanted my clients to have an access to the font without installing it. An actual font file comes first, at least in my case. I used @UEZ's File to Base64 String Code Generator to encode my font file. @UEZ uses the following code to obtain the constant value. $fHandle = FileOpen($path & $aFiles[$j], 16) $BinaryString = FileRead($fHandle) FileClose($fHandle) $bSize = BinaryLen($BinaryString)1 point -
Suggested modification to ArrayDisplayInternals.au3
argumentum reacted to Tippex for a topic
(Changed for AutoIT v3.3.16.1) Global Const $ARRAYDISPLAY_ONLYCOPYBUTTONS = 16 ; Only 'Copy' buttons displayed Global Const $ARRAYDISPLAY_NOBUTTONSDISPLAY = 32 ; No buttons displayed Global Const $ARRAYDISPLAY_NOROW = 64 ; No 'Row' column displayed Global Const $ARRAYDISPLAY_NODATALABELDISPLAY = 128 ; No data label displayed Global Const $ARRAYDISPLAY_CHECKERROR = 128 ; return if @error <> 0 (avoid display after _Array*() errors) ... ... Global $__g_ArrayDisplay_Share_iFlags = 0 Func _DebugArrayDisplay_DefaultFlags($iFlags = 0) $__g_ArrayDisplay_Share_iFlags = $iFlags EndFunc ;==>_DebugArrayDisplay_DefaultFlags Func __ArrayDisplay_SubItemHitTest_ClipPut($hWnd, $iX = -1, $iY = -1) $hWnd = GUICtrlGetHandle($hWnd) Local $_mPos = MouseGetPos(), $aTest = _GUICtrlListView_SubItemHitTest($hWnd, $iX, $iY) ReDim $aTest[12] $aTest[11] = _GUICtrlListView_GetItemText($hWnd, $aTest[0], $aTest[1]) ClipPut($aTest[11]) ToolTip($aTest[11], $_mPos[0] - 20, $_mPos[1] - 60, "ClipPut", 0, 4) AdlibRegister("__ArrayDisplay_ToolTipOff", 500) Return $aTest EndFunc ;==>__ArrayDisplay_SubItemHitTest_ClipPut Func __ArrayDisplay_ToolTipOff() AdlibUnRegister("__ArrayDisplay_ToolTipOff") ToolTip("") EndFunc ;==>__ArrayDisplay_ToolTipOff ... ... ; Set lower button border ;Local $iButtonBorder = (($bDebug) ? (40) : (20)) If IsDeclared("iButtonBorder") = $DECLARED_UNKNOWN Then Local $iButtonBorder $iButtonBorder = 40 If $bDebug Then Select Case Not BitAND($iFlags, $ARRAYDISPLAY_NODATALABELDISPLAY) And BitAND($iFlags, $ARRAYDISPLAY_NOBUTTONSDISPLAY) ;Allow border to show data label $iButtonBorder = 20 Case BitAND($iFlags, $ARRAYDISPLAY_NOBUTTONSDISPLAY) ;No border required for buttons or label (see above, NODATALABELDISPLAY = True) $iButtonBorder = 0 Case Not BitAND($iFlags, $ARRAYDISPLAY_ONLYCOPYBUTTONS) ;Allow border to show both copy & exit buttons (& data label if required) $iButtonBorder = 40 Case BitAND($iFlags, $ARRAYDISPLAY_ONLYCOPYBUTTONS) And Not BitAND($iFlags, $ARRAYDISPLAY_NODATALABELDISPLAY) ; Allow border to show copy buttons & data label (no exit button required) $iButtonBorder = 40 Case Not BitAND($iFlags, $ARRAYDISPLAY_NODATALABELDISPLAY) ;Allow border to show copy buttons, data label & exit button (NODATALABELDISPLAY = False) $iButtonBorder = 40 Case BitAND($iFlags, $ARRAYDISPLAY_ONLYCOPYBUTTONS) And BitAND($iFlags, $ARRAYDISPLAY_NODATALABELDISPLAY) ;Allow border to show copy buttons (no data label) $iButtonBorder = 20 Case Else $iButtonBorder = 40 EndSelect Else $iButtonBorder = 20 ;Allow border to show data label as there's no NODATALABELDISPLAY option for _ArrayDisplay() EndIf ... ... ; Check if other buttons are required If Not BitAND($iFlags, $ARRAYDISPLAY_ONLYCOPYBUTTONS) And Not BitAND($iFlags, $ARRAYDISPLAY_NOBUTTONSDISPLAY) Then Local $iButtonWidth_Var = $iButtonWidth_1 Local $iOffset = $iButtonWidth_1 If IsFunc($hUser_Function) Then ; Create UserFunc button if function passed $idUser_Func = GUICtrlCreateButton("Run User Func", $iButtonWidth_2, $aiGUISize[1] - 20, $iButtonWidth_2, 20) $iButtonWidth_Var = $iButtonWidth_2 $iOffset = $iButtonWidth_2 * 2 EndIf ; Create Exit button and data label $idExit_Script = GUICtrlCreateButton("Exit", $iOffset, $aiGUISize[1] - 20, $iButtonWidth_Var, 20) ;$idData_Label = GUICtrlCreateLabel($sDisplayData, 0, $aiGUISize[1] - 20, $iButtonWidth_Var, 18, BitOR($_ARRAYCONSTANT_SS_CENTER, $_ARRAYCONSTANT_SS_CENTERIMAGE)) If Not BitAND($iFlags, $ARRAYDISPLAY_NODATALABELDISPLAY) Then $idData_Label = GUICtrlCreateLabel($sDisplayData, 0, $aiGUISize[1] - 20, $iButtonWidth_Var, 18, BitOR($_ARRAYCONSTANT_SS_CENTER, $_ARRAYCONSTANT_SS_CENTERIMAGE)) Else If Not BitAND($iFlags, $ARRAYDISPLAY_NODATALABELDISPLAY) Then $idData_Label = GUICtrlCreateLabel($sDisplayData, 0, $aiGUISize[1] - 20, $aiGUISize[0], 18, BitOR($_ARRAYCONSTANT_SS_CENTER, $_ARRAYCONSTANT_SS_CENTERIMAGE)) EndIf ArrayDisplayInternals.au31 point -
Because there is a space in the string and you do not put " " around the string.1 point