Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/23/2021 in all areas

  1. Exactly... Now @Danp2 turn
    1 point
  2. I'd have to do some testing to determine if that's just how the webdriver print functionality works or if somehow the color is being accidentally removed by me.
    1 point
  3. If you post the code for your test and the process you followed to get your benchmark, who knows maybe someone will look for speed improvements and someone might even run your program on their hardware and give you a reference. Since you haven’t done this, I’m assuming you just want some ad hoc ‘gut check’ statement on your 41MB/s figure, so here it is: ”Probably reasonable.”
    1 point
  4. Actually, if you wanna join the skript kiddies, go plunder GitHub! A lot of hard coded passwords right there, in plain text intermingled with the code. I think Microsoft, as a responsible member of the IT industry (did I really type that?), and current owner of GitHub, has been making attempts to identify these oversights and alert the people archiving the code for others to browse of the security implications. Conversely, the baddies have been plucking the low hanging fruit and playing havoc on the Internetz.
    1 point
  5. GUICtrlSetBkColor ($idItem3, 0x00FF00) ? or more precisely : #include <GUIConstantsEx.au3> #include <GuiListView.au3> GUICreate("listview items", 220, 250, 100, 200) Local $idListview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 230) For $i = 1 to 10 GUICtrlCreateListViewItem("item" & $i & "|col" & $i & "2|col" & $i & "3", $idListview) Next LVBK ($idListview, 2, 0x00ff00) LVBK ($idListview, 5, 0x00ff00) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func LVBK ($ListView, $row, $color) GUICtrlSetBkColor (_GUICtrlListView_GetItemParam($ListView, $row),$color) EndFunc
    1 point
  6. Lately, in this forum, there were many questions and problems referring to the use of ie.au3 UDF using the latest version of AutoIt v3.3.14.x. I would like to present the correct usage of the UDF. I hope that it will help many users to prevent problems. #include <ie.au3> #include <MsgBoxConstants.au3> ; STEP 1 ; YOU MUST SET ANY COM ERROR HANDLER IN ONE OF THE FOLLOWING WAY ; STEP 1: CASE 1 ; you should set COM Error Handler Function for ie.au3 UDF _IEErrorHandlerRegister(_User_ErrFunc) ; STEP 1: CASE 2 ; eventually if you not want to recieve additional information ; you can use just the same function without parameter ; _IEErrorHandlerRegister() ; STEP 1: CASE 3 ; or use your own global COM Error Handler ;~ Global $oCOMErrorHandler = ObjEvent("AutoIt.Error", _User_ErrFunc) ; STEP 2 ; if you do not wish to get in Console Output Pane information like the following: ; --> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType ; You can uncomment this following line: ; _IEErrorNotify(False) _Example() Func _Example() ; First lets create some IE Object Local $oIE = _IECreate('google.com') ; you should always check for @error in any function (even you own made) If @error Then MsgBox($MB_ICONERROR, '_IECreate', '@error = ' & @error & @CRLF & '@extended = ' & @extended) ; Set @error when you return from function with Failure Return SetError(1,0,0) Endif ; here we try to get reference to LuckyStrike button Local $oLuckyStrike = _IEGetObjByName($oIE, 'btnI') ; you should always check for @error in any function (even you own made) If @error Then MsgBox($MB_ICONERROR, '_IEGetObjByName', '@error = ' & @error & @CRLF & '@extended = ' & @extended) ; Set @error when you return from function with Failure Return SetError(2,0,0) Endif ; here we try to click LuckyStrike button with previously achieved Object which is a reference to HTML DOM OBJECT in IE Instance _IEAction($oLuckyStrike, 'click') ; you should wait when page is loading _IELoadWait($oIE) ; some user interaction If MsgBox($MB_YESNO, 'Question', 'Do you want to back ?') = $IDYES Then _IEAction($oIE, 'back') EndIf EndFunc ;==>_Example ; User's COM error function. ; After SetUp with ObjEvent("AutoIt.Error", ....) will be called if COM error occurs Func _User_ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptFullPath & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_User_ErrFunc Regards, mLipok
    1 point
×
×
  • Create New...