Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/26/2016 in Posts

  1. Hello fellas! The other night night i was converting a Msdn function to autoit and I stumbled across this topic Which inspired me like crazy and I decided to take it a step further and require the user to make almost ZERO effort to export a c++ Msdn function and or a Structure to AutoIt Shoutout to toasterking So after 18-20 effective hours: The GUI is really simple, all you need is a link to a MSDN page and the program does the rest, most of the options is just for user preferences. On the inside I have spent a decent amount of work to make sure the code come out correctly, any particular event during the conversion will get fed-back to the user, so he or she will know if anything noticeable happen. Regular DllCall example http://i.imgur.com/HZLijeu.png Struct example http://i.imgur.com/l3j6wTR.png Expand spoiler for more pictures In the "Msdn Examples" folder you will find some examples of code i have generated, in most of them I only manually added 2-3 lines to make them work. If you dont know where to get these functions you can browse the MSDN Library https://msdn.microsoft.com/en-us/library/ee663300(v=vs.85).aspx and look for any function refrence, or just google "somethingsomething msdn" and the first result will almost always contain the function you are looking for. Here is some functions you can play around with https://msdn.microsoft.com/en-us/library/windows/desktop/ms724390(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/ms633519(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx I would really appreciate any kind of feedback, improvements or requests If you get any type of error just post the MSDN url + the error message and ID and I will troubleshoot it. Update 0.2 Fixed some minor issues Added highlight for a more pleasent view Fixed minor bugs Made it run faster when working with the same URL (It dosent load the page entierly) No struct search is now done when no POINTER is used in the call Added more options for the user Update 0.3 Removed _IeNavigate and fixed the template for DllCall not including function name Update 0.4 Switched method to InetGet from _Ie* H0tfix3s Update 0.5 Added more options for function-layout Removed old code Added more auto detection Now using @TmpDir instead of @ScriptDir for html files etc. Update 0.6 More Output logic added Added a detection for SAL aswell, since it seems to be inconsistent according to MSDN community and myself. Better feedback on what happend with parse Code cleanup / Removed old code /Tarre DllCall and Struct Generator V 0.6.zip DllCall and Struct Generator V 0.5.zip DllCall and Struct Generator V 0.4.zip
    1 point
  2. AutoBert

    checkbox not work

    Declare the Global vars before using func Gui() is the solution.
    1 point
  3. Melba23

    Show/Hide password

    Brostafa, No sorcery, just a bit of experience. M23 P.S. Welcome to the AutoIt forums.
    1 point
  4. BrewManNH

    Show/Hide password

    Try here
    1 point
  5. It's exactly the kind of mistake I'm looking for here in the first version. Thank you. I had forgot all about the $LVS_EX_HEADERDRAGDROP extended style to rearrange columns. Zip in first post updated. $LVS_EX_HEADERDRAGDROP extended style is added to all listviews and the code is updated so that it actually works. For the examples with the edit box I've retained the old scripts. Then you can compare the code and see how easy it is to add support for the $LVS_EX_HEADERDRAGDROP style. And it's easy because the code is based on $iSubItem to handle columns. A command like _GUICtrlListView_GetItemText( $hWnd, $iIndex [, $iSubItem = 0] ) with $iSubItem = 0 can be used to get the text of an item in first column. If the first column is dragged to another position you still use $iSubItem = 0 to get the text. This means that you don't have to change anything in the code. Rearranging the columns is handled internally by the code in ComCtl32.dll. In the examples with keyboard support _GUICtrlListView_GetColumnOrderArray is used to get the left-to-right order of the columns. This is necessary to select the current cell properly in column order with left/right arrow keys (and not in a more or less random $iSubItem order if the columns have been rearranged). I'll test the code more carefully over the weekend for any unforeseen side effects.
    1 point
  6. Func FileInstallWithProgress($sSource, $sDest, $iFlag = 0) FileInstall($sSource, $sDest, $iFlag) GUICtrlSetData($PROGRESS, GUICtrlRead($PROGRESS) + 1) ; assuming you increase progress by 1% EndFunc ;==>FileInstallWithProgress this function "wraps" the FileInstall call, hence "wrapper". call this function in your main script instead of calling FileInstall.
    1 point
  7. LarsJ

    ListView Column Order

    What do you mean exactly by looping through the columns in ascending sequence? Do you mean to loop through the columns from the leftmost column to the rightmost column? But this is not the usual opinion (at least not the MicroSoft opinion) of running through the columns in ascending order. The normal way to loop through the columns in ascending sequence and the way which is supported by MicroSoft code in the header and the listview controls is to use $iSubItem from $iSubItem = 0 to $iSubItem = $iColumns - 1. Looping through the columns in this way works for a large majority of all listview commands whether the columns have been dragged to other positions or not. $iSubItem always refers to the same column whether the columns have been rearranged or not. If two or more columns have been dragged to other positions the sequence from $iSubItem = 0 to $iSubItem = $iColumns - 1 does of course not match the left to right order of the columns. If you insists of looping through the columns in a left to right order (which changes every time the columns are rearranged) you need to use _GUICtrlListView_GetColumnOrderArray. But don't do that. You should use $iSubItem to loop through the columns. _GUICtrlListView_GetSubItemRect is an example of a command in which there is a problem when columns have been rearranged. It only works for $iSubItem > 0. For $iSubItem = 0 you must use _GUICtrlListView_GetItemRect. In this example I have only used _GUICtrlListView_GetSubItemRect. That's the reason why it doesn't work for the column with $iSubItem = 0, if that column has been dragged to a new position. I'll fix it. Conclusion: If you use $iSubItem to keep track of columns, you can usually add the $LVS_EX_HEADERDRAGDROP extended style to support rearranging of columns without changing any code at all.
    1 point
  8. Just took asking to spur me on to more searching. Thanks to a post from Firefox I figured out all I had to do was something like this: #include <GUIConstantsEx.au3> #include <ScreenCapture.au3> Example() Func Example() _GDIPlus_Startup() ;initialize GDI+ Local Const $iWidth = 600, $iHeight = 600 Local $hIA = _GDIPlus_ImageAttributesCreate() ;create an ImageAttribute object ; Local $tColorMatrix = _GDIPlus_ColorMatrixCreateNegative() ;create negative color matrix Local $tColorMatrix = _GDIPlus_ColorMatrixCreateGrayScale() ;create grayscale color matrix _GDIPlus_ImageAttributesSetColorMatrix($hIA, 0, True, $tColorMatrix) ;set negative color matrix Local $hHBmp = _ScreenCapture_Capture("", 0, 0, $iWidth, $iHeight) ;create a GDI bitmap by capturing an area on desktop Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hHBmp) ;convert GDI to GDI+ bitmap _WinAPI_DeleteObject($hHBmp) ;release GDI bitmap resource because not needed anymore Local $hGraphics = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsDrawImageRectRect($hGraphics, $hBitmap, 0, 0, $iWidth, $iHeight, 0, 0, $iWidth, $iHeight, $hIA) ;draw the bitmap while applying the color adjustment _GDIPlus_ImageSaveToFile($hBitmap, "test.jpg") ;cleanup GDI+ resources _GDIPlus_ImageAttributesDispose($hIA) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() EndFunc ;==>Example
    1 point
  9. $wmic = Run(@ComSpec & " /c" & @ComSpec & ' /c ' & "wmic diskdrive get serialnumber","", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $Output = "" While 1 $Output &= StdoutRead($wmic) If @error Then ExitLoop Wend $sOutput=StringSplit($Output,@CR) for $a=1 to $sOutput[0] ConsoleWrite($sOutput[$a]) next $vol = Run(@ComSpec & " /c" & @ComSpec & ' /c ' & "vol C:","", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $Output = "" While 1 $Output &= StdoutRead($vol) If @error Then ExitLoop Wend $sOutput=StringSplit($Output,@CR) for $a=1 to $sOutput[0] ConsoleWrite($sOutput[$a]) next
    1 point
  10. After playing around with EditControlKeyboard.au3, I discovered that dragging the first column to a different location prevents this from working correctly. _GUICtrlListView_SetExtendedListViewStyle( $idListView, BitOr($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP) ) If you drag the first column back to its original location, it starts working again. Edit: This only seems to affect column 0. I don't intend to allow my row index column to be dragged anyway, but not everyone uses a hidden row index column, so you might want to try and fix this.
    1 point
  11. Could you try this: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 #Tidy_Parameters=/sort_funcs /reel #include <array.au3> #include <date.au3> #include <MsgBoxConstants.au3> #include "XML.au3" ; This COM Error Hanlder will be used globally (excepting inside UDF Functions) Global $oErrorHandler = ObjEvent("AutoIt.Error", ErrFunc_CustomUserHandler_MAIN) #forceref $oErrorHandler ; This is SetUp for the transfer UDF internal COM Error Handler to the user function _XML_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler_XML) Example_1__XML_SelectNodes() #Region XML__Examples.au3 - Function Func Example_1__XML_SelectNodes() ; first you must create $oXmlDoc object Local $oXMLDoc = _XML_CreateDOMDocument(Default) If @error Then MsgBox(0, '_XML_CreateDOMDocument @error:', XML_My_ErrorParser(@error)) Else ; Load file to $oXmlDoc Local $sXML_Content = "" & _ "<Checkin>" & _ "<Item CatalogID='ID_15674'>" & _ " <SUPPLIER_NAME_STRING id='ID1014_161'/>" & _ " <BRANDNAME_STRING id='ID1043_111'/>" & _ " <QRYTEXT_STRING id='ID1082_8519'/>" & _ " <RARITY_STATUS id='ID1164_2'/>" & _ " <ARTID value='27700'/>" & _ " <SUPPLIER_NUMBER value='127700'/>" & _ " <OFFSET_ID value='ID_22265'/>" & _ " <STAMP value='256/350'/>" & _ " <STYLE value='1'/>" & _ " <IS_PROMOTIONAL value='0'/>" & _ "</Item>" & _ "<Item CatalogID='ID_15675'>" & _ " <SUPPLIER_NUMBER value='389844'/>" & _ " <OFFSET_ID value='ID_15674'/>" & _ " <IS_COMPLETED/> " & _ "</Item>" & _ "</Checkin>" & _ "" _XML_LoadXml($oXMLDoc, $sXML_Content) If @error Then MsgBox(0, '_XML_Load @error:', XML_My_ErrorParser(@error)) MsgBox(0, '', _XML_ErrorParser_GetDescription($oXMLDoc)) Else ; simple display $oXmlDoc - for checking only Local $sXmlAfterTidy = _XML_TIDY($oXMLDoc) If @error Then MsgBox(0, '_XML_TIDY @error:', XML_My_ErrorParser(@error)) Else MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, 'Example_1__XML_SelectNodes', $sXmlAfterTidy) EndIf ; selecting nodes _XML_SelectNodes($oXMLDoc, "//Item") If @error Then MsgBox(0, '_XML_SelectNodes @error:', XML_My_ErrorParser(@error)) MsgBox(0, '', _XML_ErrorParser_GetDescription($oXMLDoc)) Else Local $iNodesCount = @extended MsgBox(0, '$iNodesCount ', $iNodesCount) For $iItem_idx = 1 To $iNodesCount Local $oChilds_Coll = _XML_SelectNodes($oXMLDoc, '//Checkin/Item[' & $iItem_idx & ']/*') Local $aNodesColl = _XML_Array_GetNodesProperties($oChilds_Coll) If @error Then MsgBox(0, '_XML_Array_GetNodesProperties($oNodesColl)', XML_My_ErrorParser(@error)) Else ; display array _ArrayDisplay($aNodesColl, 'Example_1__XML_SelectNodes ' & $iItem_idx) EndIf Next EndIf EndIf EndIf EndFunc ;==>Example_1__XML_SelectNodes #EndRegion XML__Examples.au3 - Function #Region XML__Examples.au3 - XML DOM Error/Event Handling Func ErrFunc_CustomUserHandler_MAIN($oError) ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : MainScript ==> 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_CustomUserHandler_MAIN Func ErrFunc_CustomUserHandler_XML($oError) ; here is declared another path to UDF au3 file ; thanks to this with using _XML_ComErrorHandler_UserFunction(ErrFunc_CustomUserHandler_XML) ; you get errors which after pressing F4 in SciTE4AutoIt you goes directly to the specified UDF Error Line ConsoleWrite(@ScriptDir & '\XML.au3' & " (" & $oError.scriptline & ") : UDF ==> 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_CustomUserHandler_XML ; #FUNCTION# ==================================================================================================================== ; Name ..........: XML_My_ErrorParser ; Description ...: Changing $XML_ERR_ ... to human readable description ; Syntax ........: XML_My_ErrorParser($iXMLWrapper_Error, $iXMLWrapper_Extended) ; Parameters ....: $iXMLWrapper_Error - an integer value. ; $iXMLWrapper_Extended - an integer value. ; Return values .: description as string ; Author ........: mLipok ; Modified ......: ; Remarks .......: This function is only example of how user can parse @error and @extended to human readable description ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func XML_My_ErrorParser($iXMLWrapper_Error, $iXMLWrapper_Extended = 0) Local $sErrorInfo = '' Switch $iXMLWrapper_Error Case $XML_ERR_OK $sErrorInfo = '$XML_ERR_OK=' & $XML_ERR_OK & @CRLF & 'All is ok.' Case $XML_ERR_GENERAL $sErrorInfo = '$XML_ERR_GENERAL=' & $XML_ERR_GENERAL & @CRLF & 'The error which is not specifically defined.' Case $XML_ERR_COMERROR $sErrorInfo = '$XML_ERR_COMERROR=' & $XML_ERR_COMERROR & @CRLF & 'COM ERROR OCCURED. Check @extended and your own error handler function for details.' Case $XML_ERR_ISNOTOBJECT $sErrorInfo = '$XML_ERR_ISNOTOBJECT=' & $XML_ERR_ISNOTOBJECT & @CRLF & 'No object passed to function' Case $XML_ERR_INVALIDDOMDOC $sErrorInfo = '$XML_ERR_INVALIDDOMDOC=' & $XML_ERR_INVALIDDOMDOC & @CRLF & 'Invalid object passed to function' Case $XML_ERR_INVALIDATTRIB $sErrorInfo = '$XML_ERR_INVALIDATTRIB=' & $XML_ERR_INVALIDATTRIB & @CRLF & 'Invalid object passed to function.' Case $XML_ERR_INVALIDNODETYPE $sErrorInfo = '$XML_ERR_INVALIDNODETYPE=' & $XML_ERR_INVALIDNODETYPE & @CRLF & 'Invalid object passed to function.' Case $XML_ERR_OBJCREATE $sErrorInfo = '$XML_ERR_OBJCREATE=' & $XML_ERR_OBJCREATE & @CRLF & 'Object can not be created.' Case $XML_ERR_NODECREATE $sErrorInfo = '$XML_ERR_NODECREATE=' & $XML_ERR_NODECREATE & @CRLF & 'Can not create Node - check also COM Error Handler' Case $XML_ERR_NODEAPPEND $sErrorInfo = '$XML_ERR_NODEAPPEND=' & $XML_ERR_NODEAPPEND & @CRLF & 'Can not append Node - check also COM Error Handler' Case $XML_ERR_PARSE $sErrorInfo = '$XML_ERR_PARSE=' & $XML_ERR_PARSE & @CRLF & 'Error: with Parsing objects, .parseError.errorCode=' & $iXMLWrapper_Extended & ' Use _XML_ErrorParser_GetDescription() for get details.' Case $XML_ERR_PARSE_XSL $sErrorInfo = '$XML_ERR_PARSE_XSL=' & $XML_ERR_PARSE_XSL & @CRLF & 'Error with Parsing XSL objects .parseError.errorCode=' & $iXMLWrapper_Extended & ' Use _XML_ErrorParser_GetDescription() for get details.' Case $XML_ERR_LOAD $sErrorInfo = '$XML_ERR_LOAD=' & $XML_ERR_LOAD & @CRLF & 'Error opening specified file.' Case $XML_ERR_SAVE $sErrorInfo = '$XML_ERR_SAVE=' & $XML_ERR_SAVE & @CRLF & 'Error saving file.' Case $XML_ERR_PARAMETER $sErrorInfo = '$XML_ERR_PARAMETER=' & $XML_ERR_PARAMETER & @CRLF & 'Wrong parameter passed to function.' Case $XML_ERR_ARRAY $sErrorInfo = '$XML_ERR_ARRAY=' & $XML_ERR_ARRAY & @CRLF & 'Wrong array parameter passed to function. Check array dimension and conent.' Case $XML_ERR_XPATH $sErrorInfo = '$XML_ERR_XPATH=' & $XML_ERR_XPATH & @CRLF & 'XPath syntax error - check also COM Error Handler.' Case $XML_ERR_NONODESMATCH $sErrorInfo = '$XML_ERR_NONODESMATCH=' & $XML_ERR_NONODESMATCH & @CRLF & 'No nodes match the XPath expression' Case $XML_ERR_NOCHILDMATCH $sErrorInfo = '$XML_ERR_NOCHILDMATCH=' & $XML_ERR_NOCHILDMATCH & @CRLF & 'There is no Child in nodes matched by XPath expression.' Case $XML_ERR_NOATTRMATCH $sErrorInfo = '$XML_ERR_NOATTRMATCH=' & $XML_ERR_NOATTRMATCH & @CRLF & 'There is no such attribute in selected node.' Case $XML_ERR_DOMVERSION $sErrorInfo = '$XML_ERR_DOMVERSION=' & $XML_ERR_DOMVERSION & @CRLF & 'DOM Version: ' & 'MSXML Version ' & $iXMLWrapper_Extended & ' or greater required for this function' Case $XML_ERR_EMPTYCOLLECTION $sErrorInfo = '$XML_ERR_EMPTYCOLLECTION=' & $XML_ERR_EMPTYCOLLECTION & @CRLF & 'Collections of objects was empty' Case $XML_ERR_EMPTYOBJECT $sErrorInfo = '$XML_ERR_EMPTYOBJECT=' & $XML_ERR_EMPTYOBJECT & @CRLF & 'Object is empty' Case Else $sErrorInfo = '=' & $iXMLWrapper_Error & @CRLF & 'NO ERROR DESCRIPTION FOR THIS @error' EndSwitch Local $sExtendedInfo = '' Switch $iXMLWrapper_Error Case $XML_ERR_COMERROR, $XML_ERR_NODEAPPEND, $XML_ERR_NODECREATE $sExtendedInfo = 'COM ERROR NUMBER (@error returned via @extended) =' & $iXMLWrapper_Extended Case $XML_ERR_PARAMETER $sExtendedInfo = 'This @error was fired by parameter: #' & $iXMLWrapper_Extended Case Else Switch $iXMLWrapper_Extended Case $XML_EXT_DEFAULT $sExtendedInfo = '$XML_EXT_DEFAULT=' & $XML_EXT_DEFAULT & @CRLF & 'Default - Do not return any additional information' Case $XML_EXT_XMLDOM $sExtendedInfo = '$XML_EXT_XMLDOM=' & $XML_EXT_XMLDOM & @CRLF & '"Microsoft.XMLDOM" related Error' Case $XML_EXT_DOMDOCUMENT $sExtendedInfo = '$XML_EXT_DOMDOCUMENT=' & $XML_EXT_DOMDOCUMENT & @CRLF & '"Msxml2.DOMDocument" related Error' Case $XML_EXT_XSLTEMPLATE $sExtendedInfo = '$XML_EXT_XSLTEMPLATE=' & $XML_EXT_XSLTEMPLATE & @CRLF & '"Msxml2.XSLTemplate" related Error' Case $XML_EXT_SAXXMLREADER $sExtendedInfo = '$XML_EXT_SAXXMLREADER=' & $XML_EXT_SAXXMLREADER & @CRLF & '"MSXML2.SAXXMLReader" related Error' Case $XML_EXT_MXXMLWRITER $sExtendedInfo = '$XML_EXT_MXXMLWRITER=' & $XML_EXT_MXXMLWRITER & @CRLF & '"MSXML2.MXXMLWriter" related Error' Case $XML_EXT_FREETHREADEDDOMDOCUMENT $sExtendedInfo = '$XML_EXT_FREETHREADEDDOMDOCUMENT=' & $XML_EXT_FREETHREADEDDOMDOCUMENT & @CRLF & '"Msxml2.FreeThreadedDOMDocument" related Error' Case $XML_EXT_XMLSCHEMACACHE $sExtendedInfo = '$XML_EXT_XMLSCHEMACACHE=' & $XML_EXT_XMLSCHEMACACHE & @CRLF & '"Msxml2.XMLSchemaCache." related Error' Case $XML_EXT_STREAM $sExtendedInfo = '$XML_EXT_STREAM=' & $XML_EXT_STREAM & @CRLF & '"ADODB.STREAM" related Error' Case $XML_EXT_ENCODING $sExtendedInfo = '$XML_EXT_ENCODING=' & $XML_EXT_ENCODING & @CRLF & 'Encoding related Error' Case Else $sExtendedInfo = '$iXMLWrapper_Extended=' & $iXMLWrapper_Extended & @CRLF & 'NO ERROR DESCRIPTION FOR THIS @extened' EndSwitch EndSwitch ; return back @error and @extended for further debuging Return SetError($iXMLWrapper_Error, $iXMLWrapper_Extended, _ '@error description:' & @CRLF & _ $sErrorInfo & @CRLF & _ @CRLF & _ '@extended description:' & @CRLF & _ $sExtendedInfo & @CRLF & _ '') EndFunc ;==>XML_My_ErrorParser #EndRegion XML__Examples.au3 - XML DOM Error/Event Handling
    1 point
  12. Probably the easiest way: Run(@ComSpec & " /k " & "netsh wlan show drivers") If the radio type supported shows N or A/C it is a good bet it supports 5GHz I would think you could do it from WMI as well, something like this (pseudo): $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $oWMI = ObjGet("winmgmts:\\.\root\cimv2") $oItems = $oWMI.ExecQuery("SELECT * FROM Win32_NetworkAdapter", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) For $item In $oItems ConsoleWrite("Caption: " & $item.Caption & ", Max Speed of: " & $item.MaxSpeed & @CRLF) Next I can't test at the moment, but you may be able to use the MaxSpeed parameter to determine what bands you have access to.
    1 point
  13. JohnOne

    Any udf to record sound?

    This works for me WIN 7 32 $sExe = "C:\Windows\system32\soundrecorder.exe /file C:\Users\john\Desktop\sndrectest\wav.wav /duration 00:00:30" Run($sExe)
    1 point
×
×
  • Create New...