![]() ![]() SerialList = cat(1, WindowsComProperties, foundString) = regexp(strcat(rep), '/(COM\d )/') // using strindex instead of regexp to make it ScosLab compatible = unix_g("mode") //unix_g, unix, host are scicoslab compatible SerialList = unix_g("WMIC Path Win32_SerialPort Get DeviceID, Description, MaxBaudRate, ProviderType") // cmd / batch alternative SerialList = powershell(" Get-WMIObject Win32_SerialPort | Select-Object DeviceID, Description, MaxBaudRate, ProviderType")(2:$-2) = powershell("Get-WMIObject Win32_SerialPort | Select-Object DeviceID") SerialList = powershell("::getportnames()")' //-> This solution considers the ports opned by powershell as available while there are in fact opened internally as explained () If isempty(find(PortLists = PortList)) thenĮrror("Supported options for PortList are: " strcat(PortLists, ", ")) The syntax has been changed in a way to be more consistent and concise.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |