Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/29/2020 in all areas

  1. Ahh You got me interested, so I put everything together. That is my problem, I get interested in others issues and forget my owns 😞 #AutoIt3Wrapper_UseX64=y #include <Constants.au3> #include <File.au3> ListSelect() Func ListSelect() MsgBox($MB_SYSTEMMODAL, "", "You will have 5 sec to choose desktop icons after closing this msgBox") Sleep(5000) Local $sSel = ControlListView("[CLASS:Progman]", "", 1, "GetSelected", 1) Local $aSel = StringSplit($sSel, "|") _ArrayColInsert($aSel, 1) For $i = 1 To $aSel[0][0] $aSel[$i][0] = ControlListView("[CLASS:Progman]", "", 1, "GetText", $aSel[$i][0]) $aSel[$i][1] = SearchPath($aSel[$i][0]) Next _ArrayDisplay($aSel) EndFunc ;==>ListSelect Func SearchPath($sName) Local $ssfDESKTOPDIRECTORY = 16, $ssfCOMMONDESKTOPDIR = 25 Local $SHCONTF_NONFOLDERS = 0x40 Local $oShellApplication = ObjCreate("Shell.Application") Local $oShellFolder = $oShellApplication.NameSpace($ssfDESKTOPDIRECTORY) Local $oShellFolderItems = $oShellFolder.Items() $oShellFolderItems.Filter($SHCONTF_NONFOLDERS, "*") For $oShellFolderItem In $oShellFolderItems If $oShellFolderItem.name = $sName Then Return $oShellFolderItem.path Next $oShellFolder = $oShellApplication.NameSpace($ssfCOMMONDESKTOPDIR) $oShellFolderItems = $oShellFolder.Items() $oShellFolderItems.Filter($SHCONTF_NONFOLDERS, "*") For $oShellFolderItem In $oShellFolderItems If $oShellFolderItem.name = $sName Then Return $oShellFolderItem.path Next Return "" EndFunc ;==>SearchPath
    2 points
  2. UEZ

    Need help with DLL Call

    This works but you need the latest BASS.dll (v2.4.15.0) Func _BASS_ChannelGetLevelEx($hStream, $fLength = 0.02, $iFlag = $BASS_LEVEL_STEREO) Local $tLevels = DllStructCreate("float levels[2]") Local $BASS_ret_ = DllCall($_ghBassDll, 'bool', 'BASS_ChannelGetLevelEx', 'dword', $hStream, 'struct*', $tLevels, 'float', $fLength, 'dword', $iFlag) If @error Then Return SetError(1, 1, 0) If $BASS_ret_[0] = 0 Then Return SetError(_BASS_ErrorGetCode(), 0, 0) Return $tLevels EndFunc ;==>_BASS_ChannelGetLevelEx You can access the values $tLevels = _BASS_ChannelGetLevelEx($hMusic) ConsoleWrite($tLevels.levels(1) & ", " & $tLevels.levels(2) & @CRLF)
    1 point
  3. Nine

    Need help with DLL Call

    Local $fLength = 0.02 ; 2ms of data Local $BASS_LEVEL_STEREO = 2 ; stereo flag Local $aResult = DllCall("bass.dll", 'bool', 'BASS_ChannelGetLevelEx', 'dword', $hStream, 'struct*', 0, 'float', $fLength, 'dword', $BASS_LEVEL_STEREO) ConsoleWrite(@error & @CRLF) Local $tFloat = DllStructCreate("float[2]", $aResult[2]) _ArrayDisplay($aResult) ConsoleWrite(DllStructGetData($tFloat, 1, 1) & "/" & DllStructGetData($tFloat, 1, 2) & @CRLF)
    1 point
  4. Probably you need to allocate the floats before so create the structure before the call and pass the structure's pointer type ptr or the struct itself changing the parameter type to struct. I've not checked documentation yet. But I'll do later probably. But I'm sure it's not a big issue. Seems to be easy to implement checking with the library. Saludos
    1 point
  5. @argumentum for starters I had some help with codeproject references 8 articles you can reach it thru this https://stackoverflow.com/questions/946114/how-to-use-idispatch-in-plain-c-to-call-a-com-object https://docs.microsoft.com/en-gb/windows/win32/api/oaidl/nn-oaidl-idispatch?redirectedfrom=MSDN But there are many books written on COM/COM++ having hundreds of pages so no Idea if there is a one-pager that explains it. https://books.google.nl/books?id=x2OIPSyFLBcC&pg=PT227&lpg=PT227&dq=iunknown+idispatch+.net&source=bl&ots=_rACVH3Ul-&sig=ACfU3U1SSU-ORYxW_MIuXDjA4fxiUf2K3Q&hl=en&sa=X&ved=2ahUKEwiOkprL2qbqAhUxURUIHYHcDaQQ6AEwAnoECAUQAQ
    1 point
  6. Danp2

    Trap COM (SAPI) error?

    Try moving the register/unregister function calls outside your For / Next loop.
    1 point
  7. Use: $checkFileCopy = FileCopy(@ScriptDir & "\source.7z", $_WorkDir, 1)
    1 point
  8. Hi everyone, Some good news for you among all the gloom of these virus-ridden times: Nine, Subz and Danyfirex have accepted the invitation to become MVPs. Please join me in congratulating them on their new status in our community. Keep safe out there, M23
    1 point
×
×
  • Create New...