Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/24/2018 in all areas

  1. After AutoIt 3.3.12.0 the handling of COM errors has been "fixed". Now nested COM operations crash the script in case of an error even when there is a COM error handler. Edit: All 3 problems have been fixed in AutoIt 3.3.14.3. Here you find a fixed version of function _Excel_RangeFind. I simply removed all nestings and added the missing COM error hander: Another function that needed some modification is _Excel_BookOpen. It crashed when a workbook was opened using _Excel_BookOpen with parameter $bVisible = True, saved and then reopened. The following modification solves the problem: 2017/06/19: Another function that needed some modification is _Word_DocSaveAs. It doesn't work with Word 2013 or later as MS felt the urge to change the name of the save method from SaveAs to SaveAs2. The following modification solves the problem: Please tell me if you still have problems with this or any other function from the Excel or Word UDF!
    1 point
  2. As the WebDriver UDF - Help & Support thread has grown too big, I started a new one. The prior thread can be found here.
    1 point
  3. @AlienStar did you happen to notice this thread is over 9 years old? Please don't resurrect old posts, especially when what you're asking has absolutely NOTHING to do with the original question. Start a new thread instead, include a detailed description of what you're trying to accomplish, along with what you have tried on your own, and we will do our best to assist.
    1 point
  4. antmar904

    Regex Help

    Yes these are logs from TrendMicro that is being feed into out SIEM system which is why I needed help with the RegEx to create a custom field with the call back address.
    1 point
  5. Try this: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <WinAPIEx.au3> #include <array.au3> #include <Memory.au3> #include <GDIPlus.au3> #Include "Package.au3" ;~ Opt('MustDeclareVars', 1) Global Const $sPackage = @ScriptDir & '\data.pkr' Global $hPackage, $ID, $File #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 694, 420, 613, 326) $Button1 = GUICtrlCreateButton("PACK!", 16, 344, 107, 65) $Button2 = GUICtrlCreateButton("Display Packege", 129, 344, 107, 65) $Button3 = GUICtrlCreateButton("Testes", 244, 344, 107, 65) $Button4 = GUICtrlCreateButton("Button1", 360, 344, 107, 65) $Pic1 = GUICtrlCreatePic("", 8, 8, 172, 140, BitOR($SS_CENTERIMAGE, $SS_SUNKEN)) $Pic2 = GUICtrlCreatePic("", 189, 8, 172, 140, $SS_CENTERIMAGE) $Label1 = GUICtrlCreateLabel("Label1", 16, 224, 100, 17) $Label2 = GUICtrlCreateLabel("Label2", 16, 240, 100, 17) $Label3 = GUICtrlCreateLabel("Label3", 16, 256, 100, 17) $Label4 = GUICtrlCreateLabel("Label4", 168, 224, 100, 17) $Label5 = GUICtrlCreateLabel("Label5", 168, 240, 100, 17) $Label6 = GUICtrlCreateLabel("Label6", 168, 256, 100, 17) $Edit1 = GUICtrlCreateEdit("", 496, 16, 185, 161) GUICtrlSetData(-1, "Edit1") $Edit2 = GUICtrlCreateEdit("", 499, 187, 185, 161) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### If Not FileExists($sPackage) Then $hPackage = _PK_Create($sPackage, 'Glorifica') Else $hPackage = _PK_Open($sPackage) EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 local $fulldir = "" $File = FileOpenDialog('Add File', @WorkingDir, 'All Files (*.*)', $FD_FILEMUSTEXIST + $FD_PATHMUSTEXIST + $FD_MULTISELECT) $split = stringsplit($File, "|") for $i = 2 to $split[0] ;1 = dir $fulldir = $split[1]&"\"&$split[$i] $ID = _PK_AddPacketFromFile($hPackage, $fulldir, _WinAPI_PathStripPath($fulldir)) If @Error Then $ID = MsgBox(20, 'Package', 'An error occurred while adding file to the package.' & @CR & @CR & 'Error: ' & @Error & @CR & @CR & 'Do you want to add another file?') Else ;~ $ID = MsgBox(68, 'Package', 'File added successfully.' & @CR & @CR & 'ID: ' & $ID & @CR & @CR & 'Do you want to add another file?') consolewrite("adding: "&$ID&@CRLF) EndIf next case $button2 _PK_DisplayPackage($hPackage) _PK_Close($hPackage) case $button3 Local $hTimer3 = TimerInit() Local $dif3 Local $pak_ID3 = _PK_GetPacketID($hPackage, 4) Local $tData3 = DllStructCreate('byte[' & _PK_GetPacketDataLength($hPackage, $pak_ID3) & ']') _PK_ExtractPacketData($hPackage, $pak_ID3, DllStructGetPtr($tData3), DllStructGetSize($tData3)) $dif3 = timerdiff($hTimer3) ;the magic part ;-) _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromMemory(DllStructGetData($tData3, 1)) $hBitmap_Resized = _GDIPlus_ImageResize($hBitmap, 172, 140) $hBitmap_GDI = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap_Resized) _GDIPlus_ImageDispose($hBitmap) _GDIPlus_ImageDispose($hBitmap_Resized) _GDIPlus_Shutdown() _WinAPI_DeleteObject(GUICtrlSendMsg($Pic1, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap_GDI)) _WinAPI_DeleteObject($hBitmap_GDI) guictrlsetdata($label3, timerdiff($hTimer3)) EndSwitch WEnd
    1 point
  6. water

    ExcelChart

    Version 0.4.0.1

    1,465 downloads

    Extensive library to control and manipulate Microsoft Excel charts. Written by GreenCan and water. Theads: General Help & Support - Example Scripts BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2017-07-21) None. The COM error handling related bugs have been fixed.
    1 point
  7. @mdmehrabhaque it's great telling us what you want, but how about what you've tried? This forum is dedicated to helping people with their scripts; it is not a place where you put in an order and someone barfs up code for you. A simple search of the forum will reveal a large number of threads dealing with retrieving email through gmail. I would suggest reading through these and trying a few things out on your own. Then, if you are stuck, post your code here along with what problems you're having, and we will do our best to assist.
    1 point
  8. @careca i upped the tolerance and it works great now, you're the best <3
    1 point
  9. Got it! #include <ie.au3> $searchterm = StringReplace("AutoIt Wikipedia", " ", "+") $url = "http://www.google.com/search?hl=en&q=" & $searchterm & "&btnI=I%27m+Feeling+Lucky&aq=f&oq=" $answer = MsgBox(68, "?", "Direct link to AutoIt Wikipedia is:" & @CRLF & $url & @CRLF & "Navigate now?") If $answer = 6 Then ShellExecute($url)
    1 point
×
×
  • Create New...