Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/02/2016 in all areas

  1. Iczer

    FreeImage Library

    Here FreeImage_GetMemorySize() function (its only for 3.17+ versions - 3.15. dont have it - see FreeImage3170.pdf) to update dll-version info on-the-fly some corrections to UDF are needed (also updated version of UDF uploaded): Global $FREEIMAGE_MAJOR_VERSION = 0 Global $FREEIMAGE_MINOR_VERSION = 0 Global $FREEIMAGE_RELEASE_SERIAL = 0 ;------------------------------------------------------------------------------------------ Func _FreeImage_GetVersion() ;Author: Prog@ndy Local $result = DllCall($__g_hFREEIMAGEDLL, "str", (($b___FeeImageIsx64)?("FreeImage_GetVersion"):("_FreeImage_GetVersion@0"))) If @error Then Return SetError(1, @error, "") Local $aVersion = StringRegExp($result[0],"(\d+)",3) If @error Then Return SetError(1, @error, "") $FREEIMAGE_MAJOR_VERSION = $aVersion[0] $FREEIMAGE_MINOR_VERSION = $aVersion[1] $FREEIMAGE_RELEASE_SERIAL = $aVersion[2] Return $result[0] EndFunc ;==>_FreeImage_GetVersion ;------------------------------------------------------------------------------------------ ;~ DLL_API unsigned DLL_CALLCONV FreeImage_GetMemorySize(FIBITMAP *dib); Func _FreeImage_GetMemorySize($pDIB) ;Author: Prog@ndy Local $result = DllCall($__g_hFREEIMAGEDLL, "uint", (($b___FeeImageIsx64)?("FreeImage_GetMemorySize"):("_FreeImage_GetMemorySize@4")), $lpFIBITMAP, $pDIB) If @error Then Return SetError(1, @error, 0) Return $result[0] EndFunc ;==>_FreeImage_GetMemorySize ;------------------------------------------------------------------------------------------ FreeImage_x86x64.au3
    1 point
  2. jguinch

    RegEx Help

    StringRegExpReplace(_GUICtrlMenu_GetItemText($hFile, $iItem), '\t\V+', '')
    1 point
  3. GMK

    RegEx Help

    This works for me: #include <GuiMenu.au3> Example() Func Example() Local $hWnd, $hMain, $hFile, $iCount ; Open Notepad Run("notepad.exe") WinWaitActive("[CLASS:Notepad]") $hWnd = WinGetHandle("[CLASS:Notepad]") $hMain = _GUICtrlMenu_GetMenu($hWnd) $hFile = _GUICtrlMenu_GetItemSubMenu($hMain, 0) $iCount = _GUICtrlMenu_GetItemCount($hFile) ; Get item text For $iItem = 0 To $iCount Writeln("Item text: " & StringRegExpReplace(_GUICtrlMenu_GetItemText($hFile, $iItem), '(?:\h{2,}|\t)\S+', '')) Next EndFunc ;==>Example ; Write a line of text to Notepad Func Writeln($sText) ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CRLF) EndFunc ;==>Writeln
    1 point
  4. BTW: To access a public folder you need to drop the leading "\\" as described here:
    1 point
  5. Which version of AutoIt do you run? Which version of the OutlookEx UDF do you run?
    1 point
  6. Means: $iFolderType is missing or not a number Try: Global $oOutlook = _OL_Open() Global $aFolder = _OL_FolderAccess($oOutlook, "\\Dossiers publics - xxxx.xxxxxxxxx@xx.xx.xx.xx\Tous les dossiers publics\Secteur Opérations Régionales\Région\Réservation Pont Visio", $olFolderCalendar) Global $oItem = _OL_ItemCreate($oOutlook, $olAppointmentItem, $aFolder[1]) I added the foldertype to _OL_FolderAccess and passed item 1 of $aFolder to _OL_ItemCreate because _OL_FolderAccess returns an array.
    1 point
  7. What is the value of @error after _OL_FolderAccess?
    1 point
  8. ShellExecute("OCS-NG-Windows-Agent-Setup.exe", '/tag="' & $Arg1 & '"')
    1 point
  9. kylomas

    questions about date

    faustf, Roll your own... Local $mon = MonthtoNumber('jan') ConsoleWrite((@error ? '! Error >>> ' & @error : $mon) & @CRLF) Func MonthtoNumber($str) If Not StringIsAlpha($str) Then Return SetError(1, 0, $str) If StringLen($str) < 3 Then Return SetError(2, 0, $str) Local $aMonths = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'] For $i = 0 To UBound($aMonths) - 1 If StringInStr($aMonths[$i], $str) Then Return $i + 1 Next Return SetError(3, 0, $str) EndFunc ;==>MonthtoNumber kylomas
    1 point
  10. iamtheky

    Best Coding Practices

    If you build something that would have helped you, chances are it would help someone else. Opining will most likely bring far more counterpoints than support, because we are trained to come to these forums find problems and fix things.
    1 point
  11. Sure. You need to use _OL_FolderAccess to access the public folder and replace _OL_Wrapper* with _OL_ItemCreate.
    1 point
  12. Iczer

    FreeImage Library

    You can use my port FreeImage UDF to both x64/x86 - its working with latest v3.17.0.0 DLLs. default names for dlls: "FreeImage_x64.dll" "FreeImage_x86.dll"
    1 point
×
×
  • Create New...