Jump to content

marcoauto

Active Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by marcoauto

  1. hi, I made a software for managing dtmf tones. For the moment the pc audio output is connected to an Arduino with an mt8870 module which decodes the tone and returns the correct value via serial. I wanted to make sure not to use external hardware and so I tried with the bass.dll library to read the microphone input. I can read the volume and interpret the data, but I haven't found a way to handle the dtmfs. Searching the internet I found a project with source in Delphi and C++ with examples to import a library called DTMFScanner.dll (https://www.3delite.hu/Object Pascal Developer Resources/download.html#dtmf) the DTMFScannerLibrary.h file is attached to this post. There are examples on how to use the external library with Delphi too I tried to modify an example of the bass library to integrate the request for the DTMFScanner.dll library but it always returns the value 0. I'm afraid I'm using the wrong library recall method This is my script: #include 'Bass.au3' #include <WinAPICOM.au3> #include <WinAPIConv.au3> #include <Array.au3> Global $hStream, $iLong, $nLeft, $nRight, $iColor Global $ID_GUI = GUICreate('BASS Audio Levels', 190, 200, -1, -1, Default, 0x00000008) GUICtrlCreateLabel('L', 52, 20, 34, 22) GUICtrlCreateLabel('R', 82, 20, 34, 22) Global $ProgressBarL = GUICtrlCreateProgress(50, 40, 14, 100, 0x04) Global $ProgressBarR = GUICtrlCreateProgress(80, 40, 14, 100, 0x04) Global $InputL = GUICtrlCreateLabel('', 50, 150, 34, 22) Global $InputR = GUICtrlCreateLabel('', 80, 150, 34, 22) Global $DtmlDLL Global $parameters = DllStructCreate("ptr FileName; dword Channel; float Treshold; int Thread; int64 User; ptr DetectCallback") Global $inputChannel = 3 ;<------- my mic input Global $result1 GUISetOnEvent(-3, '_Exit') Opt('GUIOnEventMode', 1) GUISetState(@SW_SHOW, $ID_GUI) _BASS_Startup(@ScriptDir & '\Bass.dll') If @error Then Exit MsgBox(16, 'BASS Function Error', 'EC1') _BASS_Init(16, -1, 44100, 0, 'NULL') If @error Then Exit MsgBox(16, 'BASS Function Error', 'EC2') _BASS_RecordInit(-1) If @error Then Exit MsgBox(16, 'BASS Function Error', 'EC3') ; choose input. I use n.3 in this moment _BASS_RecordSetInput($inputChannel, $BASS_INPUT_TYPE_WAVE, 1) ;~ Global $hStream = _BASS_RecordStart(44100, 2, 0, 0) Global $hStream = _BASS_RecordStart(44100, 2, $BASS_SAMPLE_FLOAT);_WinAPI_MakeLong(0, 10)) If @error Then Exit MsgBox(16, 'BASS Function Error', 'EC4') _BASS_ChannelPlay($hStream, True) If @error Then Exit MsgBox(16, 'BASS Function Error', 'EC5') While _BASS_ChannelIsActive($hStream) ;********************************* VUMETER WITH BASS.DLL ******************************************************* $iLong = _BASS_ChannelGetLevel($hStream) $nLeft = _BASS_LoWord($iLong) / 32768 * 100 $nRight = _BASS_HiWord($iLong) / 32768 * 100 $nLeft = Round($nLeft) $nRight = Round($nRight) ; $iColor = 0xFFFFFF If $nLeft > 99 Then $iColor = 0xFF0000 GUICtrlSetColor($ProgressBarL, $iColor) $iColor = 0xFFFFFF If $nRight > 99 Then $iColor = 0xFF0000 GUICtrlSetColor($ProgressBarR, $iColor) ; GUICtrlSetData($ProgressBarL, $nLeft) GUICtrlSetData($ProgressBarR, $nRight) GUICtrlSetData($InputL, $nLeft); <-- Left numeric audio level GUICtrlSetData($InputR, $nRight); <-- Right numeric audio level ; Sleep(10) ;********************************* LOAD EXTERNAL DTMFScanner.dll ******************************************************* $DtmlDLL = DllOpen("DTMFScanner.dll") if @error then ConsoleWrite("DTMFScanner.dll Load Error!!" & @CRLF) Else ConsoleWrite("DTMFScanner external Funcion ok" & @CRLF) $parameters = DllStructCreate("ptr FileName; dword Channel; float Treshold; int Thread; int64 User; ptr DetectCallback") DllStructSetData($parameters, "FileName", DllStructCreate("wchar[260]")) DllStructSetData($parameters, "Channel", $inputChannel) DllStructSetData($parameters, "Treshold", 0.5) DllStructSetData($parameters, "Thread", 0) DllStructSetData($parameters, "User", 0) DllStructSetData($parameters, "DetectCallback", "DetectCallback") $result = DllCall($DtmlDLL, "int", "DTMFScan", "ptr", DllStructGetPtr($parameters)) if @error then ConsoleWrite("error = " & @error & @CRLF) DllClose($DtmlDLL) ConsoleWrite("DTMF = " & $result[0] & " - other returned values (I don't know which ones): " & ($result[1]) & @CRLF) EndIf Sleep(40) WEnd Func _Exit() _BASS_RecordFree() _BASS_Free() GUIDelete($ID_GUI) Exit EndFunc DTMFScannerLibrary.h: //******************************************************************************************************************************** //* * //* DTMF Scanner Library 1.0.4.25 © 3delite 2023 * //* See DTMF Scanner Library ReadMe.txt for details. * //* * //* Licenses available for usege of this library: * //* Freeeware License: €15 * //* http://www.shareit.com/product.html?productid=301011183 * //* Shareware License: €25 * //* http://www.shareit.com/product.html?productid=301011182 * //* Commercial License: €125 * //* http://www.shareit.com/product.html?productid=301011181 * //* * //* https://www.3delite.hu/Object%20Pascal%20Developer%20Resources/DTMFScannerLibrary.html * //* * //* If you have any questions or enquiries please mail: 3delite@3delite.hu * //* * //* Good coding! :) * //* 3delite * //******************************************************************************************************************************** #pragma once #ifdef _WIN32 // Windows //* .dll file name #define FILENAME_DLL_DTMF_SCANNER_LIBRARY "DTMFScanner.dll" #define DTMFSLIBCALL __stdcall //* Exported function names (Windows) #define NAME_DTMFScan "DTMFScan" #endif //* Error codes #define DTMFSL_OK = 0 #define DTMFSL_ERROR = 1 #ifdef _WIN32 #include <wtypes.h> typedef unsigned __int64 QWORD; #else #include <stdint.h> #define WINAPI #define CALLBACK typedef uint8_t BYTE; typedef uint16_t WORD; typedef uint32_t DWORD; typedef uint64_t QWORD; typedef void* HANDLE; #ifndef __OBJC__ typedef int BOOL; #endif #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif #endif typedef enum { dtetStart = 0, dtetContinuing = 1, dtetEnd = 2 } TDTElementType; //* Callback typedef int(DTMFSLIBCALL *TDetectCallback)(int DTMF, TDTElementType Status, float Position, QWORD User); typedef struct { LPWSTR FileName; DWORD Channel; float Treshold; BOOL Thread; QWORD User; TDetectCallback DetectCallback; } *PDTMFScannerParameters, TDTMFScannerParameters; //* Exported functions typedef int(DTMFSLIBCALL* t_DTMFScan)(TDTMFScannerParameters* Parameters); #ifdef __cplusplus extern "C" { #endif static HMODULE DTMFScannerLibraryDLLHandle = NULL; BOOL DTMFScannerLibraryDLLLoaded = FALSE; t_DTMFScan DTMFScan = NULL; #ifdef __cplusplus } #endif BOOL InitDTMFScannerLibrary() { DTMFScannerLibraryDLLHandle = LoadLibrary(FILENAME_DLL_DTMF_SCANNER_LIBRARY); if (NULL != DTMFScannerLibraryDLLHandle) { DTMFScan = (t_DTMFScan)GetProcAddress(DTMFScannerLibraryDLLHandle, NAME_DTMFScan); if (NULL == DTMFScan) { DTMFScannerLibraryDLLLoaded = FALSE; } else { DTMFScannerLibraryDLLLoaded = TRUE; } } return DTMFScannerLibraryDLLLoaded; } BOOL FreeDTMFScannerLibrary() { if (NULL != DTMFScannerLibraryDLLHandle) { DTMFScannerLibraryDLLLoaded = !FreeLibrary(DTMFScannerLibraryDLLHandle); } return !DTMFScannerLibraryDLLLoaded; } DTMFScannerLibrary.pas: //******************************************************************************************************************************** //* * //* DTMF Scanner Library 1.0.4.25 © 3delite 2023 * //* See DTMF Scanner Library ReadMe.txt for details. * //* * //* Licenses available for usege of this library: * //* Freeeware License: €15 * //* http://www.shareit.com/product.html?productid=301011183 * //* Shareware License: €25 * //* http://www.shareit.com/product.html?productid=301011182 * //* Commercial License: €125 * //* http://www.shareit.com/product.html?productid=301011181 * //* * //* https://www.3delite.hu/Object%20Pascal%20Developer%20Resources/DTMFScannerLibrary.html * //* * //* If you have any questions or enquiries please mail: 3delite@3delite.hu * //* * //* Good coding! :) * //* 3delite * //******************************************************************************************************************************** unit DTMFScannerLibrary; interface type TDTElementType = (dtetStart, dtetContinuing, dtetEnd); type TDetectCallback = function(DTMF: Integer; Status: TDTElementType; Position: Single; User: UInt64): Integer; stdcall; type PDTMFScannerParameters = ^TDTMFScannerParameters; TDTMFScannerParameters = record FileName: PChar; Channel: Cardinal; Treshold: Single; Thread: LongBool; User: Int64; DetectCallback: TDetectCallback; end; function DTMFScan(var Parameters: TDTMFScannerParameters): Integer; stdcall; external 'DTMFScanner.dll'; implementation end. Delphi Example: unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, bass, Vcl.StdCtrls, DTMFScannerLibrary; type TForm1 = class(TForm) Memo1: TMemo; Button2: TButton; Label2: TLabel; Edit2: TEdit; ComboBoxInput: TComboBox; Label1: TLabel; Button1: TButton; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } protected procedure WndProc(var Message: TMessage); override; public { Public declarations } procedure ListDevices; end; Const MSG_DTMF_DETECTED = WM_USER * 4 + 111; var Form1: TForm1; Counter: Integer; implementation {$R *.dfm} procedure TForm1.ListDevices; var Device: AnsiString; Count: Integer; Info: BASS_DEVICEINFO; begin ComboBoxInput.Items.Clear; Count := 0; while BASS_RecordGetDeviceInfo(count, Info) do begin Device := Info.name; ComboBoxInput.Items.Add(String(Device)); Inc(Count); end; ComboBoxInput.ItemIndex := - 1; ComboBoxInput.Text := 'Select...'; end; procedure TForm1.FormCreate(Sender: TObject); begin BASS_Init(- 1, 44100, 0, Handle, nil); ListDevices; end; procedure TForm1.FormDestroy(Sender: TObject); begin BASS_Free; end; procedure TForm1.WndProc(var Message: TMessage); begin case Message.Msg of MSG_DTMF_DETECTED: begin Form1.Memo1.Lines.Append('Tone detected: ' + Char(Message.WParam)); end; else inherited WndProc(Message); end; end; function DetectCallback(DTMF: Integer; Status: TDTElementType; Position: Single; User: UInt64): Integer; stdcall; begin //* List only new detections if Status = dtetStart then begin //* This callback is called from a thread, no UI access is allowed in threads so send the params to the main thread PostMessage(Form1.Handle, MSG_DTMF_DETECTED, wParam(DTMF), 0); Inc(Counter); end; Result := 0; end; procedure TForm1.Button1Click(Sender: TObject); begin //* Freeing the channel handle automatically terminates the scanning thread BASS_RecordFree; end; procedure TForm1.Button2Click(Sender: TObject); var Parameters: TDTMFScannerParameters; ChannelInput: HRecord; begin //StopProcessing := False; BASS_RecordFree; BASS_RecordInit(ComboBoxInput.ItemIndex); //* Always use BASS_SAMPLE_FLOAT flag ChannelInput := BASS_RecordStart(11025, 1, BASS_SAMPLE_FLOAT, nil, nil); Counter := 0; Parameters.FileName := nil; Parameters.Channel := ChannelInput; Parameters.Treshold := StrToFloat(Edit2.Text); Parameters.Thread := True; Parameters.User := 0; Parameters.DetectCallback := DetectCallback; DTMFScan(Parameters); end; end. the return in debug is always 0 and another values that change: DTMFScanner external Funcion ok DTMF = 0 - other returned values (I don't know which ones): 0x02642090 DTMFScanner external Funcion ok DTMF = 0 - other returned values (I don't know which ones): 0x02642748 DTMFScanner external Funcion ok DTMF = 0 - other returned values (I don't know which ones): 0x02643A58 DTMFScanner external Funcion ok DTMF = 0 - other returned values (I don't know which ones): 0x02642860 DTMFScanner external Funcion ok DTMF = 0 - other returned values (I don't know which ones): 0x02642748 DTMFScanner external Funcion ok DTMF = 0 - other returned values (I don't know which ones): 0x02643BE8 Any idea to implement the DTMFScanner.dll? Thankyou very much! Marco DTMF_dialing.ogg bass.dll DTMFScanner.dll Bass.au3 DTMFScannerLibrary.h Unit1.pas DTMFScannerLibrary.pas
  2. Solved! I managed to get all the html it generates returned by changing the "SetRequestHeaders" and therefore also the type of response that the server provides me. Obviously now I have to redo all the response parsing work (it no longer responds in json) but I can see everything and it's what I needed. I report below the code that I changed in case it is also useful to someone else Original: $oHTTP.Open("GET", $url&"/dynamic_load/0", False) $oHTTP.SetRequestHeader("Accept", "application/json") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status Consolewrite($oReceived & @crlf) Modified: $oHTTP.Open("GET", $url&"/dynamic_load/0", False) $oHTTP.SetRequestHeader("Accept", "text/html, application/xhtml+xml, image/jxr, */*") $oHTTP.SetRequestHeader("Accept-Encoding", "zip, deflate, text/html, application/xhtml+xml, image/jxr, */*") $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko") $oHTTP.SetRequestHeader("Referer", $url) $oHTTP.Send() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status Consolewrite($oReceived & @crlf) Thanks Marco
  3. the image is taken with screenshot function. i logged into the server with chrome then pressed F12 then chose "elements" to navigate the code i don't know postman. Now I do some research. A thousand thanks Marco
  4. with ResponBody return a hex string 0x0A0A3C21444F43545950452068746D6C3E0A3C68746D6C3E0A093C686561643E0A202020200A09093C7469746C653E4F58313C2F7469746C653E0A202020203C6C696E6B2072656C3D227374796C65736865657422....... 😞 Thanks Marco
  5. Hi, unfortunately the user:password@url method doesn't work with this server. You just have to pass them via http setrequestheader or insert them in the form of the login page thanks Marco
  6. hello, first of all I hope to explain myself well because I don't speak English very well 🙂 I need to monitor a signal and the serve I have has no API to read So I tried to interface and something I managed to get. For the moment I can log in and get answered on some calls. One example of a request I make is the following: $oHTTP.Open("GET", $url&"/dynamic_load/0", False) $oHTTP.Send() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status $oUpdates = json_decode($oReceived) ConsoleWrite("channelUid:"&$oUpdates.channelUid & @crlf) ecc ecc I'm just missing the last value to read, but it's also the most important one. The problem is that the system does not return that value to me, so I should go and read directly on the page. But in the page to read I can't see the table I need, maybe because it's dynamic and inside a div? Debugging with chrome I can find the full path, but I don't understand how to read it. I'd also like it not to open the browser to be able to read the value. This is the script I've made for now: Global Const $HTTP_STATUS_OK = 200 Global $user = "myuser" Global $password = "mypassword" Global $url = "http://myremoteurl" Global $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") # Connect to remote site with user and password. This function works but $oHTTP.Open("POST", $url&"/login", False) $oHTTP.SetRequestHeader("Accept", "application/json") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send('username='&$user&'&password='&$password) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status Consolewrite($oReceived & @crlf) And this works, I'm logged The result is: <!DOCTYPE html> <html> <head> <title>ENCODER</title> <link rel="stylesheet" type="text/css" media="screen" href="/assets/stylesheets/main.css"> <link rel="stylesheet" type="text/css" media="screen" href="/assets/stylesheets/jquery-ui.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="/assets/stylesheets/jquery-ui-timepicker-addon.css"> <link rel="shortcut icon" type="image/png" href="/assets/images/favicon.png"> <script src="/assets/javascripts/jquery-3.1.1.js"></script> <script src="/assets/javascripts/jquery-ui.min.js"></script> <script src="/assets/javascripts/jquery-ui-timepicker-addon.js"></script> <script src="/assets/javascripts/jquery-swapsies.js"</script> <script src="/assets/javascripts/dash.all.min.js"></script> <script src="/assets/javascripts/main.js"></script> <style> video { width: 640px; height: 360px; } .ui-tabs-vertical { width: 55em; } .ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; } .ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; } .ui-tabs-vertical .ui-tabs-nav li a { display:block; } .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; } .ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em;} </style> <script> $(function() { $( "#pwd-dialog" ).dialog( { modal: true, autoOpen: false, buttons: { Submit: function() { // validate var pwdcurr = $("#pwd-curr").val().trim(); var pwdnew = $("#pwd-new").val().trim(); var pwdconfirm = $("#pwd-confirm").val().trim(); if (pwdcurr.length == 0 || pwdnew.length == 0) $("#pwd-msg").html("Password cannot be blank"); else if (pwdcurr == pwdnew) $("#pwd-msg").html("Cannot reuse current password"); else if (pwdnew != pwdconfirm) $("#pwd-msg").html("Password confirmation does not match"); else { $("#pwd-msg").html(""); var send_data = $('#pwdForm').serialize(); $.ajax({ type: "POST", cache: false, url: '/password', data: send_data, datatype: 'text', success: function(data) { if (data == 'success') $( "#pwd-dialog" ).dialog( "close" ); else $("#pwd-msg").html(data); } }); } }, Cancel: function() { $( this ).dialog( "close" ); } } }); $( "#pwd-link" ).click(function() { $( "#pwd-dialog" ).dialog( "open" ); }); }); </script> </head> <body> <header> <dl id="user"> <dt>admin</dt> <dd> <a id="pwd-link" href="#">Change Password</a> <a href="/logout">Logout</a> </dd> </dl> </header> <fullsection id="main"> <div id="pwd-dialog" title="Change Password"> <form action="/password" method="POST" id="pwdForm"> <table> <tr> <td>Current</td> <td><input type="password" id="pwd-curr" name="pwd-curr"/></td> </tr> <tr> <td>New</td> <td><input type="password" id="pwd-new" name="pwd-new"/></td> </tr> <tr> <td>Confirm New</td> <td><input type="password" id="pwd-confirm" name="pwd-confirm"/></td> </tr> <tr> <td colspan="2"> <span id="pwd-msg" style="color: red; font-size: small"> &nbsp; </span> </td> </tr> </table> </form> </div> <script> var inputHomeRefreshTask = null; var outputHomeRefreshTask = null; var encoderRefreshTask = null; var filearr = []; function displayMessage(msgTitle, msgContent) { if (msgContent.length > 0) { $('<div></div>').dialog({ modal: true, title: msgTitle, width: 450, height: 300, open: function() { $(this).html(msgContent); }, buttons: { Ok: function() { $( this ).dialog( "close" ); } } }); //end confirm dialog return false; } else return true; } function updateElement(elName, elVal) { var el = $("#" + elName); // Update element if it exists if (el.length) el.html(elVal); } function updateEncoderStatus(faultArr, faultElName) { var faultMsg = ""; for (idx in faultArr) { var msg = faultArr[idx]; if (msg.length > 0) { faultMsg += (msg + "<br/>"); } } if (faultMsg.length == 0) faultMsg += "No Fault detected"; $("#" + faultElName).html(faultMsg); } function refreshEncoderParams() { $.ajax({ type: "GET", cache: false, url: "/encoderstatus_load", success: function(respObj) { updateEncoderStatus(respObj.systemFaultMsg, "encVideoStatus"); updateEncoderStatus(respObj.inputFaultMsg, "encAudioStatus"); updateEncoderStatus(respObj.outputFaultMsg, "encOutputStatus"); } }); } function saveData(form_data, dest_url, cb) { //console.log(form_data); $.ajax({ type: "POST", cache: false, url: dest_url, data: form_data, datatype: 'text', success: function(data) { if (data == 'success') { displayMessage("Success", 'Data saved successfully'); if (cb && typeof cb === "function") cb(data); } else if(data) displayMessage("Error", data); else displayMessage("Error", 'Unable to save data'); } }); } // Send data with callback (cb) after completion function sendData(form_data, dest_url, cb) { var token = $('input[name="csrfToken"]').attr('value') console.log(form_data); $.ajaxSetup({ beforeSend: function(xhr) { xhr.setRequestHeader('Csrf-Token', token); } }); $.ajax({ type: "POST", cache: false, url: dest_url, data: form_data, datatype: 'text', success: function(data) { if (data != 'success') displayMessage("Error", data); if (cb && typeof cb === "function") { cb(data); } } }); } // Show or hide Select Options based on requested value function updateSelectOption(optElName, optShowIdxArr) { if ($("#" + optElName).length) { var optAvail = false; var selOpt = $("#" + optElName).val(); $("#" + optElName + " option").each(function(idx) { if ($.inArray(idx, optShowIdxArr) > -1) { $(this).show(); if (selOpt == idx) optAvail = true; } else $(this).hide(); }); // Default to first shown one if previously selected // option is no longer available if ((optShowIdxArr.length > 0) && !optAvail) $("#" + optElName)[0].selectedIndex = optShowIdxArr[0]; } } function initiateVideoRefresh() { // Do nothing for now } function initiateEncoderRefresh() { refreshEncoderParams(); // Refresh selective parameters every 1 seconds encoderRefreshTask = setInterval(refreshEncoderParams, 1000); } function sleep(ms) { return new Promise(resolve => setTimeout(resolve,ms)); } function savePageIndex(pageIndex) { $.ajax({ type: "GET", cache: false, url: "/save_page_index/" + pageIndex, success: function(respObj) { // Do Nothing } }); } $(function() { $("#tabs").tabs({ active: 0, create: function( event, ui ) { initiateVideoRefresh(); if (0 == "4") { initiateEncoderRefresh(); } }, beforeLoad: function(event, ui) { ui.jqXHR.fail(function() { ui.panel.html( "Couldn't load this tab." ); }); }, activate: function( event, ui ) { if ((ui.oldTab.index() == 0) && ( (inputHomeRefreshTask != null) || (outputHomeRefreshTask != null) )) { // Stop refresh on leaving Home tab clearInterval(inputHomeRefreshTask); clearInterval(outputHomeRefreshTask); } else if ((ui.oldTab.index() == 0) && (encoderRefreshTask != null)) // Stop refresh on leaving Encoder Status tab clearInterval(encoderRefreshTask); if (ui.newTab.index() == 0) // Start refresh on entering Home tab initiateVideoRefresh(); else if (ui.newTab.index() == 4) // Start refresh on entering Encoder Status tab initiateEncoderRefresh(); savePageIndex(ui.newTab.index()); }, 'min-height': '600px', 'overflow': 'auto' }).css({ 'min-height': '650px', 'overflow': 'auto' }); $("#tab-encoder").tabs().css({ 'min-height': '570px', 'overflow': 'auto' }); }); </script> <div id="selectFilesForm"> </div> <article> <div id="tabs"> <ul> <li><a href="/home_load" title="homeTab">Home</a></li> <li><a href="/output_load" title="tsoipTab">Configuration</a></li> <li><a href="/config_load" title="configTab">Save/Load</a></li> <li><a href="/control_load" title="controlTab">Control/Network</a></li> <li><a href="#tab-encoder" title="encoderTab">Status</a></li> <li><a href="/admin_load" title="adminTab">Admin</a></li> </ul> <div id="tab-encoder"> <ul> <li><a href="#tab2-encoder-current">Current</a></li> <li><a href="/converterstatushistory_load" title="encodeHistoryTab">Historical</a></li> </ul> <div id="tab2-encoder-current"> <table align="center" valign="top" width="100%"> <tr> <td><b>System Status</b></td> <td><b>Input Status</b></td> <td><b>Output Status</b></td> </tr> <tr valign="top"> <td id="encVideoStatus"></td> <td id="encAudioStatus"></td> <td id="encOutputStatus"></td> </tr> </table> </div> </div> </div> </article> </fullsection> </body> </html> but I need a value that I don't see (see image below): the references extrapolated from chrome are these: element: <td id="home_srtOutputConnectionStatus">Connected</td> selector: #home_srtOutputConnectionStatus js path: document.querySelector("#home_srtOutputConnectionStatus") xpath: //*[@id="home_srtOutputConnectionStatus"] full xpath: /html/body/fullsection/article/div/div[1]/div/table[1]/tbody/tr/td[2]/div/table/tbody/tr[4]/td[2] I also tried: $strHTLM = _INetGetSource($url) If @error Then ConsoleWrite("_INetGetSource ERR: " & @error & @CRLF) Exit Else ConsoleWrite($strHTLM & @CRLF) EndIf but it doesn't works because it need autentication and I searched the forum for how to read full xpaths directly but I didn't understand if it can be done without opening the browser. Some attempts I report here but it is clearly wrong. $oHTTP.Open("POST", $url&"/login", False) $oHTTP.SetRequestHeader("Accept", "application/json") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send('username='&$user&'&password='&$password) $oHTTP.Open("GET", $url&"/html/body/fullsection/article/div/div[1]/div/table[1]/tbody/tr/td[2]/div/table/tbody/tr[4]/td[2]", False) $oHTTP.SetRequestHeader("Accept", "application/json") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send() I also tried command line curl but I couldn't even log in to the site Does anyone have any advice for me? Thanks a lot and sorry for the very long post Marco
  7. unfortunately the only documentation I have is the one I wrote I tried your method (thank you very much) by entering the values of the server to which I have to send the POST and it comes back to me: "HTTP Status: 403 (Forbidden)" At this point I am afraid that the problem now may be that they have not enabled me to make calls to their server. I also tried with this script and the result is the same: 403 Forbidden Global Const $HTTP_STATUS_OK = 200 $test = HttpPost("https://XXXXXXXXXXXXXXXXXXXXXXXX/api/login", "username=myrealusername&password=]=oN9>fh2!O") Func HttpPost($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("POST", $sURL, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.SetRequestHeader("Accept", "application/json") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sData) If (@error) Then Return SetError(2, 0, 0) ConsoleWrite("$oHTTP.ResponseText= " & $oHTTP.ResponseText & @CRLF) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc Precisely it comes out written: $oHTTP.ResponseText= {"code":403,"error":"User not found","message":"The provided username/password combination was not found."}
  8. Hi, I need to send a POST request. I have this specs: So I write this code: $sBody = 'username=myrealusername&password=]=oN9>fh2!O' $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("POST", "https://XXXXXXXXXXXXXXXXXXXXXXXX/api/login", False) $oHTTP.setRequestHeader("cache-control", "no-cache") $oHTTP.SetRequestHeader("Accept", "application/json") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") ; Performing the Request $oHTTP.Send($sBody) $oHttp.WaitForResponse() ; Download the body response if any, and get the server status response code. $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status ConsoleWrite("$oReceived: " & $oReceived & @CRLF) but the response is: $oReceived: {"code":400,"error":"Validation Error","message":"Field 'password' in the body is required."} I also tried with $sBody = 'username:myrealusername&password:]=oN9>fh2!O' but it does not work; $oReceived: {"code":400,"error":"Validation Error","message":"Field 'username' in the body is required."} Do you have any suggestions? Thank you! Marco
  9. hi, thanks for your time and your help. I can't read handle I need. For now I have a workaround for my problem using a different program, but I'll continue to investigate and try. Thankyou again
  10. I think my English is worse than I thought ... I tried as you said with the _WinAPI_EnumProcessWindows () function but, as I wrote in the first post, it doesn't work! Or at least, what comes back to me isn't what I need. In the array I have 3 return values: the first for "TSetUpForm", the second for "TMainForm", and third for "TApplication" but I need the handle associated with the TListBox class: INSTANCE: 1 With ths function I read all I need, but only if I one only instance of running program: Func __ReadExternalListBox() Local $hListBox, $iItemCount $hListBox = ControlGetHandle("Software Setup", "", "[CLASS:TListBox; INSTANCE:1]") ConsoleWrite("$hListBox = " & $hListBox & @CRLF) $iItemCount = _GUICtrlListBox_GetCount($hListBox) For $i = $iStart To $iItemCount - 1 ConsoleWrite(GUICtrlListBox_GetText($hListBox,$i) & @CRLF) Next EndFunc ;==>__ReadExternalListBox Now, I ran the function. Program PID is 10248 if I use _arraydisplay(_WinAPI_EnumProcessWindows(10248)) the array is but $hListBox = ControlGetHandle("Software Setup", "", "[CLASS:TListBox; INSTANCE:1]") ConsoleWrite("$hListBox = " & $hListBox & @CRLF) $hListBox = 0x00540406 I don't need this: but I need this: if I use ControlGetHandle I read everything, but in the case of multiple open instances it returns only one and I don't know how to read the value of that handle associated with that particular pid, since I find the value through the title which is obviously identical for all instances of the program thank you all Marco
  11. hi, hi, the code I use is the one I wrote in the first post. And it works perfectly. The problem is when opening an additional instance of the program. I re-write here: Func __ReadExternalListBox() Local $hListBox, $iItemCount $hListBox = ControlGetHandle("Software Setup", "", "[CLASS:TListBox; INSTANCE:1]") ConsoleWrite("$hListBox = " & $hListBox & @CRLF) $iItemCount = _GUICtrlListBox_GetCount($hListBox) For $i = $iStart To $iItemCount - 1 ConsoleWrite(GUICtrlListBox_GetText($hListBox,$i) & @CRLF) Next EndFunc ;==>__ReadExternalListBox for the moment my program is very basic. Before continuing to develop it I wanted to figure out if I could use it with multiple instances, but the above code works great. I read everything I need from the program compiled in Delphi.
  12. the problem that i don't use pid to locate windows. I use "title". I know that "Software Setup" is the Window Title where TListBox is in. I found with Autoit Info. I use title and class with th function that i wrote in my first post: Func __ReadExternalListBox() Local $hListBox, $iItemCount $hListBox = ControlGetHandle("Software Setup", "", "[CLASS:TListBox; INSTANCE:1]") ConsoleWrite("$hListBox = " & $hListBox & @CRLF) $iItemCount = _GUICtrlListBox_GetCount($hListBox) For $i = $iStart To $iItemCount - 1 ConsoleWrite(GUICtrlListBox_GetText($hListBox,$i) & @CRLF) Next EndFunc ;==>__ReadExternalListBox I know the process pid because I use a run process to start it, but i don't need for read TListBox $pid = Run(@ComSpec & ' /c programmDelphi.exe', $sPercorsoEncoder, @SW_HIDE) The problem is when I need to start a second, or third programDelphi.exe. I could knows their pids, but title is the same for all istances. I can associate title with pid. Sorry but my english is not very good. I don't know if I can explain my problem Thanks Marco
  13. It don't works. The TlistBox is not in the main window. If I use Autoit Windows Info (see pictures above) then you can see that handle that I need is in "control tab" 😔
  14. ciao I have a Delphi compiled program that I use for work and I can read some logs with this function: Func __ReadExternalListBox() Local $hListBox, $iItemCount $hListBox = ControlGetHandle("Software Setup", "", "[CLASS:TListBox; INSTANCE:1]") ConsoleWrite("$hListBox = " & $hListBox & @CRLF) $iItemCount = _GUICtrlListBox_GetCount($hListBox) For $i = $iStart To $iItemCount - 1 ConsoleWrite(GUICtrlListBox_GetText($hListBox,$i) & @CRLF) Next EndFunc ;==>__ReadExternalListBox I can find pid and full path of the process. The problem is when I must open another process: I can't read the new ListBox because the title of the window to read is the same and the function $hListBox = ControlGetHandle("Software Setup", "", "[CLASS:TListBox; INSTANCE:1]") return me only one handle. With Autoinfo I can read handle: is, for this instance, 0x0001099C and is $hListBox But I need to automize some function and I can't always change in runtime this values. Ideas? Is there e method to read this title windows associated to a determined pid? PS: I don't need the handle from the pid windows application, but from its control if I use _WinAPI_EnumProcessWindows() the function return me window handle, not Control handle I In this case Windows Handle is 0x001007DA but I need Control Handle that is 0x0001099C Thankyou Marco
  15. ciao, Hi, I tried to do what you told me, but I can not understand the syntax I have to use. I'm trying to study how c ++ works but it's very different from autoit and so I have a lot of difficulties For the moment I did only this with success: $oIBMDSwitcher.GetProductName($nome) Global Const $sCLSID_CBMDSwitcherDiscovery = "{F2DC5149-9599-47E4-84B9-054C78A1A46D}" Global Const $sIID_IBMDSwitcherDiscovery = "{A676047A-D3A4-44B1-B8B5-31D7289D266A}" Global Const $sTag_IBMDSwitcherDiscovery = "ConnectTo hresult(bstr;ptr*;int*);" Global Const $sIID_IBMDSwitcher = "{3D480E2F-3CF4-474B-92E7-B7907EE83B41}" Global Const $sTag_IBMDSwitcher = "ConnectTo hresult(bstr;ptr*;int*);" Global Const $sTag_IBMDSwitcher_CreateIterator = "CreateIterator hresult(ptr*;int*);" Global Const $sIID_IBMDSwitcherMixEffectBlockIterator = "{930BDE3B-4A78-43D0-8FD3-6E82ABA0E117}" Global Const $sTag_IBMDSwitcherMixEffectBlockIterator = "Next hresult(int*);" Global Const $sIID_IBMDSwitcherMixEffectBlock = "{11974D55-45E0-49D8-AE06-EEF4D5F81DF6}" Global Const $sTag_IBMDSwitcherMixEffectBlock = "CreateIterator hresult(REFIID, LPVOID*);" Global Const $sIID_IBMDSwitcherInputIterator = "{275E9888-2F65-4B2E-9434-1937A72B9EC4}" Global Const $sTag_IBMDSwitcherInputIterator = " GetById hresult (int,int*);" Global Const $sTag_IBMDSwitcher_GetProductName = "GetProductName hresult(bstr*);" Global Const $sTag_IBMDSwitcher_Creator = "CreateIterator hresult(lpvoid*);" Global $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Local $oCBMDSwitcherDiscovery = ObjCreateInterface($sCLSID_CBMDSwitcherDiscovery, $sIID_IBMDSwitcherDiscovery, $sTag_IBMDSwitcherDiscovery) ConsoleWrite("IsObj($oCBMDSwitcherDiscovery): " & IsObj($oCBMDSwitcherDiscovery) & @CRLF) $sFileWithDefinition = ObjName($oCBMDSwitcherDiscovery) ConsoleWrite($sFileWithDefinition & @CRLF) Local $sDeviceAddress = "192.168.1.37" Local $pIBMDSwitcher = 0 Local $iConnectToFailure = 0 $oCBMDSwitcherDiscovery.ConnectTo($sDeviceAddress, $pIBMDSwitcher, $iConnectToFailure) ConsoleWrite("$pIBMDSwitcher: " & $pIBMDSwitcher & @CRLF) ConsoleWrite("$iConnectToFailure: " & $iConnectToFailure & @CRLF) ConsoleWrite("-------" & @CRLF) ;~ Output console: ;~ IsObj($oCBMDSwitcherDiscovery): 1 ;~ InterfaceDispatch ;~ $pIBMDSwitcher: 72569844 ;~ $iConnectToFailure: 0 ;~ ------- local $iterator,$nome Local $oIBMDSwitcher = ObjCreateInterface($pIBMDSwitcher,$sIID_IBMDSwitcher,$sTag_IBMDSwitcher_GetProductName);$sTag_IBMDSwitcher_Creator) ConsoleWrite("IsObj($oIBMDSwitcher): " & IsObj($oIBMDSwitcher) & @CRLF) $sFileWithDefinition = ObjName($oIBMDSwitcher) ConsoleWrite($sFileWithDefinition & @CRLF) ConsoleWrite("-------" & @CRLF) ;~ Output console: ;~ IsObj($oIBMDSwitcher): 1 ;~ InterfaceDispatch ;~ ------- $oIBMDSwitcher.GetProductName($nome) ConsoleWrite("$oIBMDSwitcher.GetProductName: " & $nome & @CRLF) ConsoleWrite("-------" & @CRLF) ;~ Output console: ;~ $oIBMDSwitcher.GetProductName: ATEM 1 M/E Production Switcher ;~ ------- Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc I'd like to set a preview input and after do a cut transition From a c++ script: result = mSwitcher->CreateIterator((IID_IBMDSwitcherInputIterator, (void**)&inputIterator); but I can't understand how to obtain (void**)&iterator and how to declare it from SDK is IBMDSwitcher::CreateIterator method HRESULT CreateIterator (REFIID iid, LPVOID* ppv); iid [in] = Iterator Interface ID to create an iterator for ppv [in] = Pointer to return interface object. result = mSwitcher->CreateIterator(IID_IBMDSwitcherInputIterator, (void**)&inputIterator); I tried with $return = $oIBMDSwitcher.CreateIterator($sIID_IBMDSwitcherInputIterator,$pIBMDSwitcher) ConsoleWrite("$oIBMDSwitcher.CreateIterator: " & $return & @CRLF) ConsoleWrite("-------" & @CRLF) ;~ Output console: ;~ atem.au3 (109) : ==> COM Error intercepted ! ;~ err.number is: 0x80020006 ;~ err.windescription: Nome sconosciuto. ;~ err.description is: ;~ err.source is: ;~ err.helpfile is: ;~ err.helpcontext is: ;~ err.lastdllerror is: 0 ;~ err.scriptline is: 109 ;~ err.retcode is: 0x00000000 but is wrong, of course! from SDK I need to: IBMDSwitcher::CreateIterator to get an IBMDSwitcherInputIterator object interface For each IBMDSwitcherInput returned by IBMDSwitcherInputIterator::Next retrieve the input’s unique Id using IBMDSwitcherInput::GetInputId and retrieve other properties of the input, such as the input’s name, using IBMDSwitcherInput::GetString or IBMDSwitcherInput::GetInt Use IBMDSwitcher::CreateIterator to get an IBMDSwitcherMixEffectBlockIterator object interface Obtain an IBMDSwitcherMixEffectBlock object interface using IBMDSwitcherMixEffectBlockIterator::Next Use IBMDSwitcherMixEffectBlock::SetInt to configure the Program and Preview inputs to the mix effect block by assigning the input Ids returned by IBMDSwitcherInput::GetInputId Perform a transition between Program and Preview inputs by calling IBMDSwitcherMixEffectBlock::PerformTransition Install a callback using IBMDSwitcherMixEffectBlock::AddCallback and receive IBMDSwitcherMixEffectBlockCallback::PropertyChanged callbacks to determine progress through the transition and when the transition is complete Thanks marco
  16. yes, of course!! I zipped dll file because the maximum forum upload file size Grazie marco BMDSwitcherAPI.zip
  17. Yes, the problem is I don't know how to understand if is a COM Visible method. the result of Global Const $sCLSID_CBMDSwitcherDiscovery='{F2DC5149-9599-47E4-84B9-054C78A1A46D}' Local $oObject=ObjCreate($sCLSID_CBMDSwitcherDiscovery) ConsoleWrite('IsObj($oObject): ' & IsObj($oObject) & @CRLF) in console is: IsObj($oObject): 0 I'll try with ObjCreateInterface. I'll study the sintax. My problem is that I do not have the knowledge of c ++ to understand how it works. I'll try Thankyou for your time! Marco
  18. Hi, I Have pdf Backmagic SDK. You can find it in attachment here Thankyou Marco Blackmagic Switchers SDK.pdf
  19. Ciao I would like to control an ATEM Video Mixer from autoit. I downloaded his SDK which is written in c ++ and I found the sequences to interface, but I was not able to convert the script to self. The instructions say to follow this sequence: and to connectTo with C++ is: string address = "192.168.1.240"; _BMDSwitcherConnectToFailure failureReason = 0; IBMDSwitcher switcher = null; var discovery = new CBMDSwitcherDiscovery(); discovery.ConnectTo(address, out switcher, out failureReason); From Blackmagic SDK: IBMDSwitcherDiscovery::ConnectTo method The ConnectTo method connects to the specified switcher and returns an IBMDSwitcher object interface for the switcher. Syntax HRESULT ConnectTo (string deviceAddress, IBMDSwitcher** switcherDevice, BMDSwitcherConnectToFailure* failReason); Parameters: deviceAddress in Network hostname or IP address of switcher to connect to. switcherDevice out IBMDSwitcher object interface for the connected switcher. failReason out Reason for connection failure as a BMDSwitcherConnectToFailure value. So, I have I tried these solutions but with non success: $DllName =@ScriptDir&"\BMDSwitcherAPI.dll" $result = DllCall($DllName, "none", "IBMDSwitcherDiscovery::ConnectTo" & @CRLF) ConsoleWrite("DLLCall Result: " & $result & @CRLF) and I have tried also create an Object (That I think is the best way solution): #include <MsgBoxConstants.au3> $oSwitcher=ObjCreate("IBMDSwitcher") If IsObj($oSwitcher) Then MsgBox(64, "", "Object $oSwitcher created successfully") EndIf $oAtem=ObjCreate("IBMDSwitcherDiscovery") If IsObj($oAtem) Then MsgBox(64, "", "Object $oAtem created successfully") EndIf $failureReason =ObjCreate("_BMDSwitcherConnectToFailure") If IsObj($failureReason) Then MsgBox(64, "", "Object $failureReason created successfully") EndIf $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ; Install a custom error handler Global $errore,$oSwitcher1 $oAtem.ConnectTo("192.168.1.36",$oSwitcher,$failureReason); ; This is the custom error handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) MsgBox(0, "", "We intercepted a COM Error !" & @CRLF & _ "Number is: " & $HexNumber & @CRLF & _ "Windescription is: " & $oMyError.windescription & @CRLF & _ "Source is: " & $oMyError.source & @CRLF & _ "Description is: " & $oMyError.description & @CRLF & _ "Helpfile is: " & $oMyError.helpfile & @CRLF & _ "Helpcontext is: " & $oMyError.helpcontext & @CRLF & _ "Lastdllerror is: " & $oMyError.lastdllerror & @CRLF & _ "Scriptline is: " & $oMyError.scriptline) EndFunc ;==>MyErrFunc But the result is: We intercepted a COM Error ! Number is: 000000A9 Windescription is: Variable must be of type 'Object'. Source is: Description is: Helpfile is: Helpcontext is: Lastdllerror is: 0 Scriptline is: 17 The BMDSwitcherAPI.dll is registered in system. Can someone help me? Grazie Marco
  20. ciao, the source image circle.png is attached in this post. My result is 1.png, 2.png, etc (see 10.png attached like example). I'd like to write numbers on the circle. I upload a combined I did with a graphics program (result.png) I know I need to dispose other objects, but this was a extract of all the code I wrote Thanks
  21. Ciao, I tried to write a text on a transparent png file, but I write text but without background. This is my script: #include <GDIPlus.au3> _GDIPlus_Startup() Global $circle_base = "circle.png" for $sString = 1 to 90 $hBrushNumber = _GDIPlus_BrushCreateSolid(0xFF014990) $hImagetemp = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\" & $circle_base) $iPenWidth = 0 $hPenNumber = _GDIPlus_PenCreate(0xFF014990, $iPenWidth) $hAttribute_Alpha = _GDIPlus_ImageAttributesCreate() $tColorMatrix = _GDIPlus_ColorMatrixCreateTranslate(0, 0, 0, 0) ;0 = opaque, -1 = transparent _GDIPlus_ImageAttributesSetColorMatrix($hAttribute_Alpha, 0, True, DllStructGetPtr($tColorMatrix)) $g_aDim = _GDIPlus_ImageGetDimension($hImagetemp) $g_hImage2 = _GDIPlus_BitmapCreateFromScan0($g_aDim[0], $g_aDim[1]) $g_hGfx = _GDIPlus_ImageGetGraphicsContext($g_hImage2) $hFamily = _GDIPlus_FontFamilyCreate("Uni Sans Heavy CAPS") ;Create font family object $hPath = _GDIPlus_PathCreate() ;Create new path object $tLayout = _GDIPlus_RectFCreate(0,0) ;Create string bounding rectangle X=0, Y=0 _GDIPlus_GraphicsSetSmoothingMode($g_hGfx, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ;Sets the graphics object rendering quality (antialiasing) _GDIPlus_PathAddString($hPath, $sString, $tLayout, $hFamily, 0, 63, 0) ;Add the outline of the string to the path $aBounds = _GDIPlus_PathGetWorldBounds($hPath) ;Get bounding rectangle of the path X-Y-Width-Height $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix,(($g_aDim[0] - $aBounds[2])/2)-$aBounds[0], (($g_aDim[1] - $aBounds[3])/2)-$aBounds[1]) ;translate the matrix _GDIPlus_PathTransform($hPath, $hMatrix) ;apply the above transofrmation _GDIPlus_GraphicsDrawPath($g_hGfx, $hPath, $hPenNumber) ;Draw path to graphics handle _GDIPlus_GraphicsFillPath($g_hGfx, $hPath, $hBrushNumber) ;Fill path with solid color _GDIPlus_ImageSaveToFile($g_hImage2, @ScriptDir & "\numbers\"&$sString&".PNG") Next _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_BrushDispose($hBrushNumber) _GDIPlus_GraphicsDispose($g_hImage2) _GDIPlus_Shutdown() Thankyou Marco
  22. Ciao, I need to choose the source port when I send an UDP string. I tried some workaround but with Windows 10 they don't work ( I tried also with the packetsender.com CLI $CMD = 'packetsender.com -b ' & $LocalOutPort & ' -u ' & $IP & ' ' & $Port & ' ' ;& '&$StringaRichiestaPlaylist&' RunWait('"' & @ComSpec & '" /c' & $CMD & '"' & $String & '"', @ScriptDir,@SW_HIDE) but it doesn't work all the time Is there another solution? Thanks marco
  23. ok, thanks. I think is a good point to start. Now I'll try to adapt it to my script thankyou very much for your time! marco
  24. ArrayDisplay($aDecoderStatus) is Row|Col 0|Col 1|Col 2|Col 3|Col 4 [0]||0||| [1]|A25112|0|0x002D01C6|0x08A06FE8|0x08A07618 [2]|F20C01|0|0x00D10604|0x08A07CE8|0x08A083A8 [3]|789213|0|0x003E0FF0|0x08A08A78|0x08A09138 [4]|152201|0|0x00BC1104|0x08A09808|0x08A09EC8 [5]|156879|0|0x002C0FDC|0x08A0A598|0x08A0AC58 [6]|F8AEW8|0|0x00201032|0x08A0B328|0x08A0B9E8
  25. i don't know why but SetBitMap($aDecoderStatus[5][2], $aDecoderStatus[5][4], 255) doesn't works
×
×
  • Create New...