Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/10/2016 in all areas

  1. water

    OutlookEX

    Version 1.7.0.1

    10,051 downloads

    Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate items (folders, mails, contacts ...) in the background. Can be seen like an API. There are other UDFs available to automate Outlook: OutlookEX_GUI: This UDF holds the functions to automate the Outlook GUI. OutlookTools: Allows to import/export contacts and events to VCF/ICS files and much more. Threads: Development - General Help & Support - Example Scripts - Wiki 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: 2020-02-09) None
    1 point
  2. 1 point
  3. The ratio will heavily depend on which encoding the text file uses and its actual content. AutoIt strings use 16-bit per character; add something for array overhead.
    1 point
  4. Jos

    Excel Range counter

    I know that feeling!
    1 point
  5. water

    Excel Range counter

    Glad the problems could be solved 20k posts? OMG. Didn't expect to stay that long when I posted my first question more than 10 years ago
    1 point
  6. Another way: #include <String.au3> ;~ Local $sFile = "Cars In-Out.txt" ;~ Local $sText = FileRead($sFile) ; for testing purpose, say instead that the file content is: Local $sText = _ "Car 1 checked out by Ben" & @CRLF & _ "Car 2 checked out by Rob" & @CRLF & _ "Car 3 checked In by Sonja" & @CRLF & _ "Car 5 checked out by Sam" & @CRLF & _ "Car 2 checked In by Rob" & @CRLF & _ "Car 4 checked out by Sam" & @CRLF & _ "Car 2 checked out by Joe" & @CRLF & _ "Car 1 checked in by Ben" & @CRLF & _ "Car 123 checked Out by Sonja" & @CRLF Local $iCarSearched = 1 Local $aFound = StringRegExp($sText, "(?ims)Car " & $iCarSearched & "\b\N*(In|Out)\N*(?!.*Car " & $iCarSearched & "\b)", 1) If Not @error Then ConsoleWrite("Car " & $iCarSearched & " is " & _StringProper($aFound[0]) & @LF)
    1 point
  7. This: GUISetOnEvent($WM_NCPAINT, "_Refresh") ;<================================ add that part GUISetOnEvent($WM_PAINT, "_ValidateGIFs") together with ; Additional processing of some windows messages (for example) ;<================================ comment that part GUIRegisterMsg(133, "_Refresh") ; WM_NCPAINT GUIRegisterMsg(15, "_ValidateGIFs") ; WM_PAINT Funcs registered to aMsgCodes using GuiRegisterMSG musn't Set with GuiSetOnEvent nor GUICtrlSetOnEvent. So this code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "GIFAnimation.au3" Opt("GUIOnEventMode", 1) ;<================================ set mode Opt("MustDeclareVars", 1) ; Start by choosing GIF to display Global $sFile = FileOpenDialog("Choose Image", "", "(*.gif;*.png;*.jpg;*.tiff;*.bmp;*.jpeg)", -1, "") If @error Then Exit ; Make GUI Global $hGui = GUICreate("GIF Animation", 500, 500, -1, -1, $WS_OVERLAPPEDWINDOW) GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit') ; Add some buttons Global $hButton = GUICtrlCreateButton("&Pause animation", 50, 450, 100, 25) GUICtrlSetOnEvent(-1, '_CheckPausePlay') Global $hButton1 = GUICtrlCreateButton("&Delete Control", 200, 450, 100, 25) GUICtrlSetOnEvent(-1, '_GIF_Delete') Global $hButton2 = GUICtrlCreateButton("&Open Image", 350, 450, 100, 25) GUICtrlSetOnEvent(-1, '_OpenImage') ; Make GIF Control Global $hGIF = _GUICtrlCreateGIF($sFile, "", 10, 10) If @extended Then GUICtrlSetState($hButton, $GUI_DISABLE) GUICtrlSetTip($hGIF, "Image") ; Additional processing of some windows messages (for example) ;<================================ comment that part GUIRegisterMsg($WM_NCPAINT, "_Refresh") ; 133 GUIRegisterMsg($WM_PAINT, "_ValidateGIFs") ;15 Global $iPlay = 1 ; Show it GUISetState() ; Loop till end While 1 Sleep(1000) WEnd Func _Exit() Exit EndFunc ;==>_Exit Func _OpenImage() $sFile = FileOpenDialog("Choose gif", "", "(*.gif;*.png;*.jpg;*.tiff;*.bmp;*.jpeg)", -1, "", $hGui) If Not @error Then _GIF_DeleteGIF($hGIF); delete previous $hGIF = _GUICtrlCreateGIF($sFile, "", 10, 10) If @extended Then GUICtrlSetState($hButton, $GUI_DISABLE) Else GUICtrlSetState($hButton, $GUI_ENABLE) EndIf GUICtrlSetTip($hGIF, "Image") $iPlay = 1 GUICtrlSetData($hButton, "Pause animation") EndIf EndFunc ;==>_OpenImage Func _GIF_Delete() _GIF_DeleteGIF($hGIF) EndFunc ;==>_GIF_Delete Func _CheckPausePlay() If $iPlay Then If _GIF_PauseAnimation($hGIF) Then $iPlay = 0 GUICtrlSetData($hButton, "Resume animation") EndIf Else If _GIF_ResumeAnimation($hGIF) Then $iPlay = 1 GUICtrlSetData($hButton, "Pause animation") EndIf EndIf EndFunc ;==>_CheckPausePlay Func _Refresh($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam _GIF_RefreshGIF($hGIF) EndFunc ;==>_Refresh Func _ValidateGIFs($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam _GIF_ValidateGIF($hGIF) EndFunc ;==>_ValidateGIFs script (complete in GUIOnEventMode) should work.
    1 point
  8. #include <File.au3> Global $aFile, $sCar = "Car 5" FileReadToArray("FilePath of the file to read", $aFile) For $i = $aFile[0] to 1 Step -1 If StringLeft($aFile[$i], StringLen($sCar)) = $sCar Then If StringMid($aFile[$i], 15, 1) = "i" Then ConsoleWrite($sCar & " is In" & @CRLF) Else ConsoleWrite($sCar & " is Out" & @CRLF) EndIf Exitloop EndiF Next NB: This only works for "Carx" where x is a one-digit number. It doesn't work for "Car10" etc.
    1 point
  9. Thank you for your help BetaLeaf. I have tried many different numbers for the time, still no avail. I am quite certain SoftXpand relies on input from the driver, as other the workstations are virtual machines.
    1 point
  10. Today, MSSE marked one of my applications as Trojan:Win32/Zelrune.C!cl.
    1 point
    This is one of my three top used UDFs at the office, and has GREATLY simplified data gathering for some very complex reports, as well as automating several tasks. I have even been able to free up one admin completely from our annual security audit process (for which he is also very grateful) thanks to the use of your UDF!
    1 point
    Extremely useful for Sys admins or even just an engineer to manipulate AD data or Data Collections. Tests are simple and code is simple to read and modify. If you work with anyone who doesn't know much about AD building a GUI with this UDF is very helpful. Great Job @water
    1 point
  11. kaotkbliss

    7zip dll is not loading

    Somehow got it working again. I went to he 7zip site and downloaded the newly released dll from the source files and changed the udf to use that one instead and after some fumbling around with code, I set it back to use the old ones and they are now loading fine again.
    1 point
  12. SmOke_N

    7zip dll is not loading

    And I'm sure you've tried restarting your pc? The paths point to the script directory, I'm sure you have the dll available there as well? (even thought I see the fileinstall). With and without the changes I made, I have them working (of course, I ran a 32bit exe and the 64bit dll was loaded as I thought without). If you're running AV software, try adding an exception or turning them off for 15 minutes or so while you test. Edit: None of the changes I make to account for x64 dll are working properly... so the only change to make this run x64 vs x32 properly that should be made is: This: Func _7ZipStartup() If Not @Compiled Then ; If not compiled, test and open the right dll If Not FileExists($sNoCompiledPath & $sZip32Dll) And _ Not FileExists($sNoCompiledPath & $sZip64Dll) Then Return SetError(2, 0, 0) If @OSArch = "X86" Then $hDLL_7ZIP = DllOpen($sNoCompiledPath & $sZip32Dll) ; Open x32 dll from no compiled path Else $hDLL_7ZIP = DllOpen($sNoCompiledPath & $sZip64Dll) ; Open x64 dll from no compiled path EndIf Else ; If compiled, test and open the right dll (that must be in ScriptDir for compiling) If @OSArch = "X86" Then If Not FileInstall("7-zip32.dll", $sCompiledPath & $sZip32Dll, 1) Then Return SetError(3, 0, 0) $hDLL_7ZIP = DllOpen($sCompiledPath & $sZip32Dll) ; Open x32 dll from FileInstall path Else If Not FileInstall("7-zip64.dll", $sCompiledPath & $sZip64Dll, 1) Then Return SetError(3, 0, 0) $hDLL_7ZIP = DllOpen($sCompiledPath & $sZip64Dll) ; Open x64 dll from FileInstall path EndIf EndIf If $hDLL_7ZIP = -1 Then Return SetError(1, 0, 0) ; If no dll handle, return error Return 1 EndFunc ;==>_7ZipStartup Should be: Func _7ZipStartup() If Not @Compiled Then ; If not compiled, test and open the right dll If Not FileExists($sNoCompiledPath & $sZip32Dll) And _ Not FileExists($sNoCompiledPath & $sZip64Dll) Then Return SetError(2, 0, 0) If Not @AutoItX64 Then $hDLL_7ZIP = DllOpen($sNoCompiledPath & $sZip32Dll) ; Open x32 dll from no compiled path Else $hDLL_7ZIP = DllOpen($sNoCompiledPath & $sZip64Dll) ; Open x64 dll from no compiled path EndIf Else ; If compiled, test and open the right dll (that must be in ScriptDir for compiling) If Not @AutoItX64 Then If Not FileInstall("7-zip32.dll", $sCompiledPath & $sZip32Dll, 1) Then Return SetError(3, 0, 0) $hDLL_7ZIP = DllOpen($sCompiledPath & $sZip32Dll) ; Open x32 dll from FileInstall path Else If Not FileInstall("7-zip64.dll", $sCompiledPath & $sZip64Dll, 1) Then Return SetError(3, 0, 0) $hDLL_7ZIP = DllOpen($sCompiledPath & $sZip64Dll) ; Open x64 dll from FileInstall path EndIf EndIf If $hDLL_7ZIP = -1 Then Return SetError(1, 0, 0) ; If no dll handle, return error Return 1 EndFunc ;==>_7ZipStartup But I do not believe that will fix your problem. I can't replicate it (your issue) no matter how many times I run it.
    1 point
×
×
  • Create New...