Code: Select all
dhCallMethod(obj, "AddCode(%T)", @Script)
Code: Select all
dhCallMethod(obj, "AddCode(%T)", @Script)
Code: Select all
Procedure.s AdapterConfig() ; Returns AdapterConfig
Protected Script$
Script$ = "Set objWMIService = GetObject(" + Chr(34) + "winmgmts:" + Chr(34) + " _" + #CRLF$
Script$ + " & " + Chr(34) + "{impersonationLevel=impersonate}!\\.\root\cimv2" + Chr(34) + ")" + #CRLF$
Script$ + "Set IPConfigSet = objWMIService.ExecQuery _" + #CRLF$
Script$ + " (" + Chr(34) + "Select IPAddress from Win32_NetworkAdapterConfiguration" + Chr(34) + ")" + #CRLF$
Script$ + "For Each IPConfig in IPConfigSet" + #CRLF$
Script$ + " If Not IsNull(IPConfig.IPAddress) Then " + #CRLF$
Script$ + " For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)" + #CRLF$
Script$ + " name = IPConfig.IPAddress(i)" + #CRLF$
Script$ + " Next" + #CRLF$
Script$ + " End If" + #CRLF$
Script$ + "Next" + #CRLF$
ProcedureReturn Script$
EndProcedure
dhToggleExceptions(#True)
Define.l Result, obj = dhCreateObject("MSScriptControl.ScriptControl")
Define.s Script
If obj
dhPutValue(obj, "Language = %T", @"VBScript")
dhGetValue("%T", @Result, obj, "Language")
If Result
dhFreeString(Result) : Result = 0
EndIf
Script = AdapterConfig()
dhCallMethod(obj, "AddCode(%T)", @Script)
dhGetValue("%T", @Result, obj, "Eval(%T)", @"name")
If Result
Debug "Adapter: " + PeekS(Result)
dhFreeString(Result) : Result = 0
EndIf
dhReleaseObject(obj) : obj = 0
EndIf
Code: Select all
REMOVED - see ts-soft's post below.
OnToneDetected
The OnToneDetected event will be fired when a tone detected.
Event OnToneDetected(
AppSpecific As Long,
Position As Long)
Parameters
AppSpecific
Used by the application for tagging the tone.
Position
the referenced position.
See Also
MonitorTones_Add
Code: Select all
;this is VB Code
' Decode the '0'-'#' DTMF keys
.MonitorTones_Add 1, 80, 0, 697, 1209 ' "1"
.MonitorTones_Add 2, 80, 0, 697, 1336 ' "2"
.MonitorTones_Add 3, 80, 0, 697, 1477 ' "3"
.MonitorTones_Add 4, 80, 0, 770, 1209 ' "4"
.MonitorTones_Add 5, 80, 0, 770, 1336 ' "5"
.MonitorTones_Add 6, 80, 0, 770, 1477 ' "6"
.MonitorTones_Add 7, 80, 0, 852, 1209 ' "7"
.MonitorTones_Add 8, 80, 0, 852, 1336 ' "8"
.MonitorTones_Add 9, 80, 0, 852, 1477 ' "9"
.MonitorTones_Add 10, 80, 0, 941, 1209 ' "*"
.MonitorTones_Add 0, 80, 0, 941, 1336 ' "0"
.MonitorTones_Add 12, 80, 0, 941, 1477 ' "#"
.MonitorTones_Add 1, 500, 0, 480, 620, 0, 0, 0 , -20 ' Monitor the 480Hz, 620Hz dual tone and it amplitude must >-20dB
.MonitorTones_Add 1, 500, 0, 350, 440, 0, 0, -12, -40 ' Monitor the 350Hz, 440Hz dual tone and it amplitude must in range -12dB to -40dB
.MonitorTones_Add 1, 500, 0, 350, 440, 0, 0, -20, 0 ' Monitor the 350Hz, 440Hz dual tone and it amplitude must < -20dB
' use feature of negation gate :
.MonitorTones_Add 1, 50, 0, -450 ' Monitor the non 450Hz signal (OnToneDetected will be fired if the signal neither in 450Hz nor silence for 50ms.)
.MonitorTones_Add 1, 50, 0, 480, -620 ' Monitor the 480Hz and non 620Hz signal
;
;Here it says
I dont know what i need to do to get this in my code I have the [/quote]
MonitorTones_Add
The MonitorTones_Add method enables the detection of inband tones. Each time a specified tone is detected, OnToneDetected will be fired.
Function MonitorTones_Add(
AppSpecific As Long,
MinPeriodOn As Long,
MinPeriodOff As Long,
[Frequency1 As Long],[Frequency2 As Long], [Frequency3 As Long], [Frequency4 As Long],
[MinAmpdB As Single],
[MaxAmpdB As Single]
) As Boolean
Parameters
AppSpecific
Used by the application for tagging the tone. When this tone is detected, Event OnToneDetected() fires with the value of the AppSpecific as parameter.
MinPeriodOn
The minimal duration of the period on in milliseconds, during which the tone should be present before a detection is made.
MinPeriodOff
The minimal duration of the period off in milliseconds, during which the tone should be present before a detection is made. Leave it zero to ignore this parameter.
Frequency1, Frequency2, Frequency3, Frequency4
The frequency, in hertz, of a component of the tone. If fewer than three frequencies are needed in the tone, a value of 0 should be used for the unused frequencies. A tone with all frequencies set to zero is interpreted as silence and can be used for silence detection. If FrequencyX is negative, it works as negation gate. For more info, read the example below.
MinAmpdB
The minimal amplitude in decibel of the those frequencies above. Range from -1dB to -60dB . if it is zero, MinAmpdB will be ignored. Otherwise the tones which amplitude of those frequencies smaller than the MinAmpdB will be filtered.
MaxAmpdB
The maximal amplitude in decibel of the those frequencies above. Range from -1dB to -60dB . if it is zero, MaxAmpdB will be ignored. Otherwise the tones which amplitude of those frequencies bigger than the MinAmpdB will be filtered.
Return Values
If the method succeeds, return TRUE. If the function fails, the return value is FALSE.
Sorry, is a german side