Jump to content

Search the Community

Showing results for tags 'Get'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

  1. Hello, how to get the path of selected files from the active explorer tab? this code works, but it is not friendly with tabs windows 11 $hExplorer = WinGetHandle( "[REGEXPCLASS:^(Cabinet|Explore)WClass$]" ) If Not $hExplorer Then Exit $oShell = ObjCreate( "Shell.Application" ) For $oWindow In $oShell.Windows() If $oWindow.HWND() = $hExplorer Then ExitLoop Next For $oItem In $oWindow.Document.SelectedItems() ConsoleWrite( $oItem.Path() & @CRLF ) Next if you open a new tab in Explorer, this code gives you a list of the selected files of the first tab, and not the new (active) one
  2. Version 1.0.6

    378 downloads

    AT Command UDF - for control AT Modems, send SMS, get SMS Changelog: #cs 1.0.0 2020/10/03 . First version - Danyfirex + mLipok 1.0.1 2020/10/04 . Added - Function - _ATCmd_IsPINReady - Danyfirex . Added - Function - _ATCmd_IsPINRequired - Danyfirex . Added - Function - _ATCmd_IsSIMInserted - Danyfirex . Added - Function - _ATCmd_IsSenderSupported - Danyfirex . Added - Function - _ATCmd_OnPINReques - Danyfirex . Added - Function - _ATCmd_SMS_ListTextMessages - Danyfirex . Added - Function - _ATCmd_SetPIN - Danyfirex . Added - Function - __ATCmd_GetPINCounter - Danyfirex - Added - ENUM - $ATCmd_ERR_PIN - Danyfirex - Added - ENUM - $ATCmd_ERR_SIM - Danyfirex . Changed - __ATCmd_ComposePDU() - using _ATCmd_UseUCS2() internally instead parameter - Danyfirex . Suplemented - #CURRENT# - Danyfirex . . 1.0.2 2020/10/05 . Added - ENUM - $ATCmd_MSGLIST_* - mLipok . Added - ENUM - $ATCmd_STATUS__* - mLipok - Added - ENUM - $ATCmd_ERR_PARAMETER - mLipok . Added - _ATCmd_UsePDU() - parameter validation - mLipok . Added - _ATCmd_UseUCS2() - parameter validation - mLipok . Added - more error logs . Changed - MagicNumber replaced with Standard UDF constants - mLipok . Small refactoring - mLipok . . 1.0.3 2020/10/05 . CleanUp - Danyfirex . . 1.0.4 2020/10/05 . Small refactoring - Danyfirex . CleanUp - Danyfirex . . 1.0.5 2020/10/23 . _ATCmd_FullLoging - mLipok . _ATCmd_CMEESetup() ... @WIP - mLipok . $ATCMD_STATUS_11_SUBSCRIBERNUMBER - mLipok . . 1.0.6 2020/10/25 . __ATCmd_CMSErrorParser() - mLipok . . @LAST https://www.nowsms.com/gsm-modem-cms-error-code-list https://m2msupport.net/m2msupport/at-command-to-enable-error-codes/ https://www.micromedia-int.com/en/gsm-2/73-gsm/669-cme-error-gsm-equipment-related-errors https://assets.nagios.com/downloads/nagiosxi/docs/ATCommandReference.pdf https://www.maritex.com.pl/product/attachment/40451/15b4db6d1a10eada42700f7293353776 https://www.multitech.net/developer/wp-content/uploads/2010/10/S000463C.pdf https://www.telit.com/wp-content/uploads/2017/09/Telit_AT_Commands_Reference_Guide_r24_B.pdf https://docs.rs-online.com/5931/0900766b80bec52c.pdf PDU Format / Testers / Encoders / decoders https://m2msupport.net/m2msupport/sms-at-commands/#pduformat http://smstools3.kekekasvi.com/topic.php?id=288 #ce Saludos
  3. hello autoit team please i need your help i found that the youtube provide a way to get any video informations with this link https://youtube.com/get_video_info?video_id=id but it incoded i can not read it can any one tell me how to decode that please?
  4. Hi, I am new to Autoit, Kindly guide me. I wanted to send a message with HTTP/GET to the URL https://ghsff.it/. How to do so?
  5. hello sirs, please i created a tool witch get the focused control in a window and play a audio file linked with this controls e.g buttons, checkBoxes, radios, comboboxes, and others i know that their is a function that give us the control focus but it return the classNN i want to get the class name to use it with a switch and because their are more than class e.g button tbutton timagebutton tnewButton... please can any one help me to get the class name not the classnn thanks in advance
  6. Hello friends, i have a working curl command that show informations about my account on binance.com, but_it dont work with autoit code without curl.exe. I want to do it without curl, because the whole process much Slower_ with StdoutRead (I want get the response in variable.) My Curl command in Autoit: This 2 are works, but_ i would like to do it without curl.exe $apikey="XYZ" sCommand = @ScriptDir & '\curl.exe -k -H "X-MBX-APIKEY: ' & $apikey & '" -X GET "https://api.binance.com/api/v3/account?' & $request the same in .bat file curl.exe -k -H "X-MBX-APIKEY: XYZ" -X GET "https://api.binance.com/api/v3/account?timestamp=1514917812000&signature=85bdee77e53cd521e1d5229fbfb459d53799c42b3fa4596d73f1520fad5f965a" (I use curl with -k option which allows curl to make insecure connections, because there is problem with the sites certificate, (cURL error 60)) I tried many variations, this is the latest... I cant get the same response. curl $error message (I changed ): {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action."} autoit version $error message (Response code:400): Mandatory parameter 'timestamp' was not sent, was empty/null, or malformed. $request = $query & '&signature=' & $signature $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "https://api.binance.com/api/v3/account", False) $oHTTP.SetRequestHeader("X-MBX-APIKEY", $apikey) $oHTTP.Send($request) $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status If $oStatusCode <> 200 then MsgBox(4096, "Response code", $oStatusCode) EndIf thanks
  7. I'm trying to get data from http://poe.trade/ - disclaimer, although this site is about a game, my script will not in any way interact directly with the game in any way. The script is just to get data from the site. To explain how it works - you submit a POST request and a custom URL is returned, then you do a GET request on that URL and you get the final URL you want. First issue: Now, I've tried doing so by using https://apitester.com/ and the first phase works. Here's how it looks like at APITester: Request Headers POST /search HTTP/1.1 Host: poe.trade Accept: */* User-Agent: Rigor API Tester Content-Length: 43 Content-Type: application/x-www-form-urlencoded Request Body online=x&name=kaom%27s%20heart&league=incursion When I submit this, the response I get is this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>Redirecting...</title> <h1>Redirecting...</h1> <p>You should be redirected automatically to target URL: <a href="http://poe.trade/search/ioritewoteteme">http://poe.trade/search/ioritewoteteme</a>. If not click the link. So I then do a GET request for 'http://poe.trade/search/ioritewoteteme', which results in this response: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>Redirecting...</title> <h1>Redirecting...</h1> <p>You should be redirected automatically to target URL: <a href="http://poe.trade/search/inamotezuakito">http://poe.trade/search/inamotezuakito</a>. If not click the link. Great, this link (http://poe.trade/search/inamotezuakito) is exactly what we want. However, when I try to do the same in autoit, the result is quite different: Global Const $HTTP_STATUS_OK = 200 $test = HttpPost("http://poe.trade/search", "/online=x&name=kaom%27s%20heart&league=incursion") ClipPut($test) MsgBox(1, "", $test) 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("Host", "poe.trade") $oHTTP.SetRequestHeader("User-Agent", "Rigor API Tester") $oHTTP.SetRequestHeader("Accept", "*/*") $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sData) If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc The code above returns: ' 謟 ' Any ideas as to what I am doing incorrectly? Second issue: Once I get the final link using APITester and do a GET on that i get a bunch of hieroglyphs. A friend of mine advised that the data is GZiped, which is a pain in the butt to be honest. However, apparently curl can uncompres that. How would I go about it? Thanks
  8. Well an Implementation of IPortableDeviceManager Interface to get all Portable Device conected to our pc. #include <Array.au3> #include <WinAPICom.au3> Opt("MustDeclareVars", 1) Global Const $sCLSID_PortableDeviceManager = "{0af10cec-2ecd-4b92-9581-34f6ae0637f3}" Global Const $sIID_IPortableDeviceManager = "{a1567595-4c2f-4574-a6fa-ecef917b9a40}" Global Const $sTagIPortableDeviceManager = "GetDevices hresult(ptr;dword*); RefreshDeviceList hresult(); " & _ "GetDeviceFriendlyName hresult(wstr;wstr;dword*); GetDeviceDescription hresult(wstr;wstr;dword*); " & _ "GetDeviceManufacturer hresult(wstr;wstr;dword*); GetDeviceManufacturer hresult(wstr;wstr;ptr;dword*dword*); " & _ "GetPrivateDevices hresult(ptr;dword*)" Global Enum $eDevID, $eDevName, $eDevManufacturer, $eDevDescription Local $aPnPDevices = GetPortableDevices() If IsArray($aPnPDevices) Then _ArrayDisplay($aPnPDevices) ;~ Success: Return 0 ;~ Failure: Return 2DArray [n][4] |;[n][0]$eDevID, [n][1]$eDevName, [n][2]$eDevManufacturer,[n][3] $eDevDescription Func GetPortableDevices() Local $aDevicesInfo[0][0] ;[n][0]$eDevID, [n][1]$eDevName, [n][2]$eDevManufacturer,[n][3] $eDevDescription Local $oPortableDeviceManager = 0 Local $SizeofArray = 0 Local $hr = 0x80004005 ;E_Fail Just to Initialized <0 Local $taPnPDeviceIDs = 0 Local $tName = 0 $oPortableDeviceManager = ObjCreateInterface($sCLSID_PortableDeviceManager, $sIID_IPortableDeviceManager, $sTagIPortableDeviceManager) If Not IsObj($oPortableDeviceManager) Then Return 0 If FAILED($oPortableDeviceManager.GetDevices(Null, $SizeofArray)) Then Return 0 If $SizeofArray < 1 Then Return 0 $taPnPDeviceIDs = DllStructCreate("ptr[" & $SizeofArray & "]") If FAILED($oPortableDeviceManager.GetDevices(DllStructGetPtr($taPnPDeviceIDs), $SizeofArray)) Then Return 0 ReDim $aDevicesInfo[$SizeofArray][4] For $i = 0 To $SizeofArray - 1 $tName = DllStructCreate("wchar[512]", DllStructGetData($taPnPDeviceIDs, 1, $i + 1)) $aDevicesInfo[$i][$eDevID] = DllStructGetData($tName, 1) $aDevicesInfo[$i][$eDevName] = _GetFriendlyName($oPortableDeviceManager, $aDevicesInfo[$i][$eDevID]) $aDevicesInfo[$i][$eDevManufacturer] = _GetDeviceManufacturer($oPortableDeviceManager, $aDevicesInfo[$i][$eDevID]) $aDevicesInfo[$i][$eDevDescription] = _GetDeviceDescription($oPortableDeviceManager, $aDevicesInfo[$i][$eDevID]) $tName = 0 _WinAPI_CoTaskMemFree(DllStructGetData($taPnPDeviceIDs, 1, $i + 1)) Next Return $aDevicesInfo EndFunc ;==>GetPortableDevices Func _GetDeviceManufacturer($oInterface, $PnPDeviceID) Local $sString = "" $oInterface.GetDeviceManufacturer($PnPDeviceID, $sString, 128) Return $sString EndFunc ;==>_GetDeviceManufacturer Func _GetDeviceDescription($oInterface, $PnPDeviceID) Local $sString = "" Local Const $Size = 128 $oInterface.GetDeviceDescription($PnPDeviceID, $sString, 128) Return $sString EndFunc ;==>_GetDeviceDescription Func _GetFriendlyName($oInterface, $PnPDeviceID) Local $sString = "" Local Const $Size = 128 $oInterface.GetDeviceFriendlyName($PnPDeviceID, $sString, 128) Return $sString EndFunc ;==>_GetFriendlyName Func _GetProperty($oInterface, $PnPDeviceID) Local $sString = "" Local Const $Size = 128 $oInterface.GetDeviceFriendlyName($PnPDeviceID, $sString, 128) Return $sString EndFunc ;==>_GetProperty Func FAILED($hr) Return ($hr < 0) EndFunc ;==>FAILED Saludos
  9. Hi all, I have a bit of code that works on my old Win10 PC, that fails on my new Win10 PC, and I think the only significant difference is the version of Autoit - old PC has 3.3.12, new has 3.3.14. I couldn't find anything mentioned in the change logs though, so perhaps I'm wrong. Anyway, the code to replicate my issue is: Test('username', 'DOMAIN') ; THIS ERRORS: ;Test('localun', 'DOMAIN') ; THIS ERRORS: ;Test(' ', ' ') ; THIS ERRORS: ;Test('', '') ; THIS ERRORS: ;Test('localun', '') ; THIS ERRORS: ;Test('', 'DOMAIN') Func Test($un, $dom) $compName = 'PCNAME' $FullName = '.' $Description = '.' ; get the WIM object $objWMIService = ObjGet("winmgmts:\\" & $compName & "\root\cimv2") ; get default user full name and description $objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'") If IsObj($objAccount) Then $FullName = $objAccount.FullName $Description = $objAccount.Description EndIf ConsoleWrite($FullName & @CRLF) ConsoleWrite($Description & @CRLF) Return EndFunc On my old PC this code will output just . and . for each of those line currently commented out. Which is fine. On my new PC any of those commented out lines of code cause an error, and the script won't even compile. $objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $un & "',Domain='" & $dom & "'") $objAccount = $objWMIService^ ERROR I'm very much a newb with the WMI stuff and objects, but it looks like the .Get property is failing when either $un or $dom aren't valid in v3.3.14, whereas in 3.3.12 the .Get would fail to return an object, which is then caught by the If statement. Am I on track with this? Is there some new/better way to code the example so that 3.3.14 will compile it?
  10. Hi all I want a way to get the last key pressed. I have a program that works with keyboard shortcuts and I want to give the permission for the user to edit shortcut keys depending on what suits him i want to make read-only edit box and the program writes the latest shortcut key pressed Please help me, greetings to all And thanks in advance
  11. hello guys how are youØŸ I hope to be fine. I have a question please how do I get the menu item that was pressed without that contains a variableØŸ For example I have a menu of Favorites and I want the script recognizes the existing path in the pressed item i'll repeat to tell the item does not contain a variable Is there any solution if you want to explain more I could write an example of what I want. Greetings to all, thanks in advance
  12. Hello my friends I have an urgent question, please help. How do I select all the text in the edit or input And how to get the currently selected text Please help urgently Greetings and thanks for all
  13. Hello i have problem with function PixelGetColor. On my computer it working fine but in some cases it not working. And Im clicking on the active window on red color and it give me the same color still. But in other computers when clicking on the same color red it gives other values and returned color in MsgBox is not red. Dont know is it a real main thing what causing problem but, I noticed that problem was on one windows 10. I have windows 8 and working well. On other windows 10 works well to Maybe it is caused by windows aero or something like that How to deal with it? There is a code HotKeySet("{PAUSE}", "MouseCord") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func MouseCord() Global $MousePos = MouseGetPos() $clickedColor = PixelGetColor($MousePos[0], $MousePos[1]) MsgBox(0, "Done", $clickedColor) EndFunc
  14. Hi All, I've coded the small script below, but it can't seem to get the instance of Windows Media player as it keeps going to @error, I've not used com objects before so any assistance would be appreciate. I already have WMP open and minimised. I retrieved "WMPlayerApp" from the AutoIT info tool, I've included a copy below. I'm using these sources: https://msdn.microsoft.com/en-us/library/dd564085.aspx https://msdn.microsoft.com/en-us/library/dd564018.aspx $oWMP = ObjGet("", "WMPlayerApp") If @error Then MsgBox(0, "Can't get WMP", "Couldn't connect to the WMP instance") Exit EndIf $wmpPlayState = $oWMP.playState MsgBox(0, "Play State", $wmpPlayState) $wmpSongName = $oWMP.currentMedia.name MsgBox(0, "Play State", $wmpSongName) I've also seen references to the below, but I want to get an existing open WMP: ObjCreate("wmplayer.OCX") and have looked at the WMP.udf but can't see how it will do either of the functions I've coded above.
  15. Hi All, I run multiple AutoIT scripts concurrently, is there a way of distinguishing between them? When I look under Details in task manager I just see a bunch of "AutoIt3.exe" processes. Under the processes tab I again just see a bunch of "AutoIt v3 Script" or "AutoIt v3 Script (32 bit)" applications. When I hover my mouse over the tray icon I can see the tooltip "AutoIt - Current Time.au3" but am not sure how to reference this. For example if I run a script called "Current Time.au3", how can I determine from another au3 script if this "Current Time.au3" script is running and grab it's handle (using WinGetHandle() or similar)? Following from that l'd even like to pause/resume the script, if that's possible.. Cheers!
  16. Just very simple but universal/usefull function to get all content of TreeView from external application. It's not optimized for speed and error testing is missing, it's just for very simple code ;-) #Include <String.au3> #Include <GuiTreeView.au3> ; "C:\Program Files (x86)\Resource Kit\oleview.exe" ; COM Library Objects --> ClassMoniker $sAll = _TreeView_GetAll('OLE/COM Object Viewer', '', 'SysTreeView322') FileDelete('treeview_get_all.txt') FileWrite('treeview_get_all.txt', $sAll) ;~ClipPut($sAll) Func _TreeView_GetAll($title, $text, $classNN, $expand = False, $indent = ' ', $bullet = '') ; $bullet = '- ' $sAll = '' $hWnd = ControlGetHandle($title, $text, $classNN) If $expand Then _GUICtrlTreeView_Expand($hWnd) ; Expand All $hItem = _GUICtrlTreeView_GetFirstItem($hWnd) While $hItem <> 0x00000000 $sItem = _GUICtrlTreeView_GetText($hWnd, $hItem) $level = _GUICtrlTreeView_Level($hWnd, $hItem) $sIndent = _StringRepeat($indent, $level) $sAll &= $sIndent & $bullet & $sItem & @CRLF $hItem = _GUICtrlTreeView_GetNext($hWnd, $hItem) WEnd Return $sAll EndFunc Hope it can help somebody ...
  17. How can I get a list of all the headings in a Microsoft Word document by using AutoIt? I tried: #include <Word.au3> #include <MsgBoxConstants.au3> Global Const $wdRefTypeHeading = 1 ; Heading $Headings = $oDoc.GetCrossReferenceItems($wdRefTypeHeading) $Count = UBound($Headings) MsgBox($MB_SYSTEMMODAL, "Debug", $Count) But it did not function well.. For example, it just get 1 heading from my rich document that have many headings! I also tried this: #include <Word.au3> #include <MsgBoxConstants.au3> $Count = $oDoc.Paragraphs.Count For $i = 0 To $Count - 1 $oRange = _Word_DocRangeSet($oDoc, -1, $wdParagraph, $i, $wdParagraph, 1) If StringInStr($oRange.text, "Header Text") Then MsgBox($MB_SYSTEMMODAL, "Debug", $oRange.Style) EndIf Next And this: #include <Word.au3> #include <MsgBoxConstants.au3> $Count = $oDoc.Paragraphs.Count For $i = 0 To $Count - 1 $oRange = _Word_DocRangeSet($oDoc, -1, $wdSentence, $i, $wdSentence, 1) If StringInStr($oRange.text, "Header Text") Then MsgBox($MB_SYSTEMMODAL, "Debug", $oRange.Style) EndIf Next But the Range.Style property didn't work in AutoIt.. Could someone help me how to get a list of all the headings in a Word document?
  18. How to select a folder and assign the path value to a variable in autoit? ; Selecting a file and assigning that to $sPath value) Case $file $sPath = FileOpenDialog("Open a file", @desktopdir, "Cabinet Files (*.cab)",$FD_MULTISELECT) GUICtrlSetData($file, $sPath) ; How to do the same with a folder? Case $folder $sPath = FileSelectFolder($sPath, "")Need the selected folder path to be used in the $sPath section for further implementation. Or a method to Select Folder or Files at once.
  19. Hi. I want to get the page with socks 5. I has been search for 2 days but didnot found I see winHttp but it only support proxy Any one can help me please? Socks 5 or 4 not proxy please Thank for reading and im sorry about my stupid English
  20. Hey, I created a Date- and Timepicker in my GUI, I can get the date I selected (GUICtrlRead), but I want to compare it with the current date. I got this far: Func AddEntry() $hours = GUICtrlRead($input_hour) $minutes = GUICtrlRead($input_minutes) $seconds = GUICtrlRead($input_seconds) $date = GUICtrlRead($Date1) If @HOUR = $hours and @MIN = $minutes and @SEC = $seconds then MsgBox(0, "", "Time is right") ; @WDAY, @MON, @MDAY, @YEAR just give out number and I dont know how I can compare them with the "Monday, January 1, 2015" outputHope you can help!
  21. Hello, I need help, I have created couple small pictures(about 200) in one GUI, I need to move them fast about 1-5 pixels every picture somehow. There are only pictures in GUI, no other controls. I tried this, but it's too slow: Global Const $AC_SRC_ALPHA = 1 For $ii = 0 To $size For $iii = 0 To $size GUICtrlSetPos(_ArrayGet($data, $ii, $iii, 1), ControlGetPos($GUI, "", _ArrayGet($data, $ii, $iii, 1))[0] + 2, ControlGetPos($GUI, "", _ArrayGet($data, $ii, $iii, 1))[1] + 2) Next Next Func _ArrayGet(ByRef $aArray, $i1, $i2 = 0, $i3 = 0, $i4 = 0, $i5 = 0, $i6 = 0, $i7 = 0, $i8 = 0, $i9 = 0, $i10 = 0, $i11 = 0, $i12 = 0, $i13 = 0, $i14 = 0, $i15 = 0, $i16 = 0, $i17 = 0, $i18 = 0, $i19 = 0, $i20 = 0) ;Function made by ProgAndy Local $iDims = UBound($aArray, 0) #forceref $i1, $i2, $i3, $i4, $i5, $i6, $i7, $i8, $i9, $i10, $i11, $i12, $i13, $i14, $i15, $i16, $i17, $i18, $i19, $i20 Local $NULL If Not IsArray($aArray) Then Return SetError(1, 1, $NULL) Local $sAccess = "$aArray" For $i = 1 To $iDims Local $iIndex = Int(Eval("i" & $i)) If $iIndex >= UBound($aArray, $i) Then Return SetError(3, $i, $NULL) $sAccess &= '[' & $iIndex & ']' Next If @NumParams - 1 > $iDims Then For $i = $iDims - 1 To @NumParams $sAccess &= ", $i" & $i Next Local $vResult = Execute("_ArrayGet(" & $sAccess & ")") If @error Then SetError(@error, @extended + $iDims) Return $vResult Else Return Execute($sAccess) EndIf EndFunc ;==>_ArrayGetI didn't wrote all script, becouse it's huge. It took about 1200 - 1600 milisecounds, I need that pictures would move much faster. It's possible to make it much faster, that it would took about 2-10 milisecounds? Thanks.
  22. Well Another Function. For Get de Drive letter marked as write enabled. Global Const $sCLSID_CDBurn = "{fbeb8a05-beee-4442-804e-409d6c4515e9}" Global Const $sIID_ICDBurn = "{3d73a659-e5d0-4d42-afc0-5121ba425c8d}" Global Const $sTagCDBurn = "GetRecorderDriveLetter hresult(wstr;uint); Burn hresult(hwnd); HasRecordableDrive hresult(bool*)" MsgBox(0, "", _GetRecorderDriveLetter()) Func _GetRecorderDriveLetter() Local $sDriveLetter = "" Local $HasRecordableDrive = False Local $oCDBurn = ObjCreateInterface($sCLSID_CDBurn, $sIID_ICDBurn, $sTagCDBurn) If Not IsObj($oCDBurn) Then Return $sDriveLetter If SUCCEEDED($oCDBurn.HasRecordableDrive($HasRecordableDrive)) Then $oCDBurn.GetRecorderDriveLetter($sDriveLetter, 4) EndIf Return $sDriveLetter EndFunc ;==>_GetRecorderDriveLetter Func SUCCEEDED($hr) Return ($hr >= 0) EndFunc ;==>SUCCEEDED
  23. I was needing to check all my connected networks and check if there is internet connection. so I wrote this function. #include <MsgBoxConstants.au3> #include <Array.au3> Global $NLM_ENUM_NETWORK_CONNECTED = 0x01 ;~ Global $NLM_ENUM_NETWORK_DISCONNECTED = 0x02 ;~ Global $NLM_ENUM_NETWORK_ALL = 0x03 Global Enum $eName, $eIsConectedtoInternet Local $aNetworks = GetNetWorks() If @extended Then For $i = 0 To @extended - 1 ConsoleWrite("NetWork Name: " & $aNetworks[$i][$eName] & "| IsConectedToInternet: " & $aNetworks[$i][$eIsConectedtoInternet] & @CRLF) Next _ArrayDisplay($aNetworks, "NetWork Name|NetWork Is Conected to Internet") EndIf ;~ Success: Return an 2DArray[][] and sets @extended Ubound of Array ;~ Failure: Return 0 and set @extended 0 Func GetNetWorks($NLM_ENUM_NETWORK = $NLM_ENUM_NETWORK_CONNECTED) Local $aNetworks[0][2] ;[n][0]NetWorks Name|[n][1]isConnectedtoInternet Local $INetworks = 0 Local $ReDim = 0 Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Local $oINetworkListManager = ObjCreate("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}") ;Create INetworkListManager Object by CLSID If Not IsObj($oINetworkListManager) Then Return 0 $INetworks = $oINetworkListManager.GetNetworks($NLM_ENUM_NETWORK) If Not IsObj($INetworks) Then Return 0 For $INetwork In $INetworks $ReDim = UBound($aNetworks, 1) + 1 ReDim $aNetworks[$ReDim][2] $aNetworks[$ReDim - 1][0] = $INetwork.GetName $aNetworks[$ReDim - 1][1] = $INetwork.isConnectedtoInternet Next $oINetworkListManager = 0 ;Free Return SetExtended($ReDim, $aNetworks) EndFunc ;==>GetNetWorks ; User's COM error function. Will be called if COM error occurs 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 Saludos
  24. Hello. I am working in a clipboard manager which I will release to autoit's example scripts. The problem is that I have no Idea how to get currently selected text WITHOUT sending ^c... I've already check out some other similar topics in the forum but nothing.. Any ideas? Thanks in advance. ( Also getting the selected text outside autoit's form, for example getting selected text not from Autoit's GUI but from another window, like Notepad. )
×
×
  • Create New...