Jump to content

Search the Community

Showing results for tags 'autoitx'.

  • 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. The following files are provided to allow .NET use: AutoItX3.Assembly.dll - The .NET Assembly for using AutoItX.AutoItX3.Assembly.xml - The Visual Studio Intellisense help file for the .NET Assembly.AutoItX3.dll - The main AutoItX DLL (x86)AutoItX3_x64.dll - The main AutoItX DLL (x64)Using the Assembly from VB/C# within in Visual Studio is very easy: Add a reference to AutoItX3.Assembly.dll to your projectAdd a using AutoIt; statement in the files you want to use AutoIt functionsWrite code like this C# example:using AutoIt; ... // Wow, this is C#! AutoItX.Run("notepad.exe"); AutoItX.WinWaitActive("Untitled"); AutoItX.Send("I'm in notepad"); IntPtr winHandle = AutoItX.WinGetHandle("Untitled"); AutoItX.WinKill(winHandle);Distribute your final executable with the files AutoItX3.Assembly.dll, AutoItX3.dll, AutoItX3_x64.dll.
  2. Hello everyone. I always try to work with old Windows 10 versions as much as possible because I know mane compatibility issues with Windows 10 upgrading. But I couldn't do anything else (I got drivers problem), and nothing couldn't help me besides upgrading, so I upgraded from 1807 to 1903. And...get another problem 😃 I use AutoitX library in external project like this. ObjectAutoIt=New COMObject("AutoItX3.Control"); ObjectAutoIt.AutoItSetOption("WinTextMatchMode",2); While ObjectAutoit.WinExists("",WindowHeader) Cycle ObjectAutoIt.WinClose("",WindowHeader); EndCycle; After upgrade I get that this line code While ObjectAutoit.WinExists("",WindowHeader) become extremely low - ~ 20 seconds even if 10 windows open. But before upgrade it takes 0.5 s for a max. And every time that this code line passes through - it takes ~20s, (20.115, for example), not less, not more. Something pauses it to work. How can I diagnose, what is that? I tried reinstall whole AutoIt, but no results. Thanks to all.
  3. This is a quick start guide to using the AutoIt PowerShell Cmdlets. The best bits of AutoIt directly from PowerShell The files you need are as follows (get them from the zip file or the Program Files folder after installation): AutoItX.psd1AutoItX3.PowerShell.dllAutoItX3.Assembly.dllAutoItX3.dllAutoItX3_x64.dllTo use the Cmdlets open a PowerShell cmd prompt and enter: Import-Module .\AutoItX.psd1 Now you can get a list of available AutoIt Cmdlets by doing Get-Command *AU3*: PS> Get-Command *AU3* Name Category Module ---- -------- ------ Invoke-AU3MouseWheel Cmdlet AutoItX Move-AU3Mouse Cmdlet AutoItX Invoke-AU3MouseClickDrag Cmdlet AutoItX Get-AU3MouseCursor Cmdlet AutoItX Invoke-AU3MouseUp Cmdlet AutoItX Assert-AU3WinActive Cmdlet AutoItX Assert-AU3WinExists Cmdlet AutoItX Assert-AU3IsAdmin Cmdlet AutoItX Invoke-AU3Shutdown Cmdlet AutoItX Send-AU3ControlKey Cmdlet AutoItX Invoke-AU3MouseDown Cmdlet AutoItX Invoke-AU3MouseClick Cmdlet AutoItX Invoke-AU3ControlTreeView Cmdlet AutoItX Invoke-AU3ControlListView Cmdlet AutoItX Invoke-AU3ControlCommand Cmdlet AutoItX Invoke-AU3ControlClick Cmdlet AutoItX Move-AU3Control Cmdlet AutoItX Set-AU3ControlText Cmdlet AutoItX Show-AU3Control Cmdlet AutoItX Hide-AU3Control Cmdlet AutoItX Get-AU3ControlText Cmdlet AutoItX Get-AU3ControlFocus Cmdlet AutoItX Set-AU3ControlFocus Cmdlet AutoItX Disable-AU3Control Cmdlet AutoItX Enable-AU3Control Cmdlet AutoItX Get-AU3StatusbarText Cmdlet AutoItX Invoke-AU3RunAsWait Cmdlet AutoItX Invoke-AU3RunAs Cmdlet AutoItX Invoke-AU3RunWait Cmdlet AutoItX Invoke-AU3Run Cmdlet AutoItX Set-AU3Clip Cmdlet AutoItX Get-AU3Clip Cmdlet AutoItX Set-AU3WinTrans Cmdlet AutoItX Set-AU3WinTitle Cmdlet AutoItX Set-AU3WinState Cmdlet AutoItX Set-AU3WinOnTop Cmdlet AutoItX Move-AU3Win Cmdlet AutoItX Show-AU3WinMinimizeAllUndo Cmdlet AutoItX Show-AU3WinMinimizeAll Cmdlet AutoItX Get-AU3WinState Cmdlet AutoItX Get-AU3WinProcess Cmdlet AutoItX Get-AU3WinClassList Cmdlet AutoItX Get-AU3WinCaretPos Cmdlet AutoItX Get-AU3WinClientSize Cmdlet AutoItX Get-AU3ControlPos Cmdlet AutoItX Get-AU3ControlHandle Cmdlet AutoItX Get-AU3MousePos Cmdlet AutoItX Get-AU3WinPos Cmdlet AutoItX Get-AU3WinHandle Cmdlet AutoItX Get-AU3ErrorCode Cmdlet AutoItX Initialize-AU3 Cmdlet AutoItX Show-AU3WinActivate Cmdlet AutoItX Close-AU3Win Cmdlet AutoItX Wait-AU3WinClose Cmdlet AutoItX Wait-AU3WinNotActive Cmdlet AutoItX Set-AU3Option Cmdlet AutoItX Send-AU3Key Cmdlet AutoItX Wait-AU3Win Cmdlet AutoItX Wait-AU3WinActive Cmdlet AutoItX Get-AU3WinTitle Cmdlet AutoItX Get-AU3WinText Cmdlet AutoItX I’ll show how to use the Cmdlets using a simple example that will open notepad.exe and modify the edit window by setting the text and simulating some keystrokes. First create a blank PowerShell script called notepad_example.ps1 in the same folder as the AutoItX components above and open it for editing. Now we want to import the PowerShell module which is AutoItX.psd1. Enter the following in the script: Import-Module .\AutoItX.psd1 We want to run notepad.exe: Invoke-AU3Run -Program notepad.exe After notepad opens we want to wait for the notepad “Untitled -Notepad” window to appear. You might need to change the title for non-English versions of Windows: $notepadTitle = "Untitled - Notepad" Wait-AU3Win -Title $notepadTitle $winHandle = Get-AU3WinHandle -Title $notepadTitle Get-AU3WinHandle returns a native Win32 handle to the notepad window. We can use this handle in many other AutoIt functions and it uniquely identifies the window which is much more reliable than constantly using a windows title. If you have obtained a window handle using any other Win32 function you can use it with AutoIt. After obtaining the handle to the notepad window we want to ensure that the window is active and then get a handle to the Edit Control. Using the AU3Info.exe tool that comes with AutoIt we can find that the name of the edit control in notepad is Edit1. Show-AU3WinActivate -WinHandle $winHandle $controlHandle = Get-AU3ControlHandle -WinHandle $winhandle -Control "Edit1" Now that we have a handle to the edit control we can set text in two ways: Directly (Set-AU3Controltext) or with simulated keystrokes (Send-AU3ControlKey): Set-AU3ControlText -ControlHandle $controlHandle -NewText "Hello! This is being controlled by AutoIt and PowerShell!" -WinHandle $winHandle Send-AU3ControlKey -ControlHandle $controlHandle -Key "{ENTER}simulate key strokes - line 1" -WinHandle $winHandleNow let’s see what the entire script looks like: # Import the AutoIt PowerShell module Import-Module .\AutoItX.psd1 # Run notepad.exe Invoke-AU3Run -Program notepad.exe # Wait for an untitled notepad window and get the handle $notepadTitle = "Untitled - Notepad" Wait-AU3Win -Title $notepadTitle $winHandle = Get-AU3WinHandle -Title $notepadTitle # Activate the window Show-AU3WinActivate -WinHandle $winHandle # Get the handle of the notepad text control for reliable operations $controlHandle = Get-AU3ControlHandle -WinHandle $winhandle -Control "Edit1" # Change the edit control Set-AU3ControlText -ControlHandle $controlHandle -NewText "Hello! This is being controlled by AutoIt and PowerShell!" -WinHandle $winHandle # Send some keystrokes to the edit control Send-AU3ControlKey -ControlHandle $controlHandle -Key "{ENTER}simulate key strokes - line 1" -WinHandle $winHandle Send-AU3ControlKey -ControlHandle $controlHandle -Key "{ENTER}simulate key strokes - line 2" -WinHandle $winHandle Send-AU3ControlKey -ControlHandle $controlHandle -Key "{ENTER}{ENTER}" -WinHandle $winHandle This is how the notepad window should look if everything is working correctly:
  4. Hi, everyone. I have python code for kill window, but sometimes it does not working . My code is : import subprocess import time import ctypes au3_dll = ctypes.windll.LoadLibrary(r'D:\AutoIt\AutoItX3.dll') def close_ie(title): subprocess.Popen(f"C:/Program Files (x86)/Internet Explorer/iexplore.exe https://cn.bing.com/?mkt=zh-CN") time.sleep(2) au3_dll.AU3_Opt("WinTitleMatchMode", 2) ret = au3_dll.AU3_WinKill(title, "") print(ret) if __name__ == '__main__': title = '必应 - Internet Explorer' for i in range(10): close_ie(title) My expectation is that all IE windows will be closed, but there will always be a few windows still there. My env: win10 64bit python3.6.4 autoit v3.3.14.2 Any suggestions would be appreciated
  5. Hi All, I am new to this AUTO IT and I have created a script that will open an app,enter pin and copy the code generated to clipboard. My java code call this autoIT script and use the copied generated code from clipboard. This works fine when server window is on focus. My server is an windows server. But when I minimize or disconnect the server, the script opens the app.exe but doesn't copy any value to clipboard. Can anyone help me on this 😐 Run("C:\Program Files (x86)\RSA SecurID Software Token\SecurID.exe") Local $hWnd=WinWait("abc - RSA SecurID Token") ; waits until the window is the active window $hWin = WinGetHandle("abc - RSA SecurID Token"); ControlSend($hWnd,"","","1111") ; simulates pressing the Home key ControlSend($hWnd,"","","{ENTER}"); ControlSend($hWnd,"","","^c"); Sleep(1000) ; ControlSend($hWnd,"","","^c");
  6. I need to replace a desktop applications functionality. I'll call it App "A". The application has defined 2 hot keys one that toggles between it and another window, App "B", and one that triggers keystrokes to App "B" to get data where App "A" can access it. Then tells app "A" to fire off processing of data.. Unfortunately when App "B" is a 64bit application this functionality no longer works. For now I've hobbled together a work a round solution by using 2 apps with what appears to be similar abilities. AutoIt and a desktop application that allows me to define the 2 hot keys. The SutoItX Dll is great for my processes within App "A" as it uses VBA for event driven tasks. The second app allows me to define the Hot keys and which windows they belong to. My fail is on how to use AutoIT to define the hot Keys and link to specific windows. So as I see this working: App "A" launches and fires off internal VBA code that in turn sets up HotKeys. If App "B" is not found code shuts down without enabling the hotkeys. A hot key of CTRL-F1 toggles, activates window, back and forth between App "A and "B" So the hotkey is captured only when either App "A" or "B" is currently the active focus. and swaps the active focus application window. A hot key of CTRL-F2 from App "B", Send Key strokes to App "B" to place App "B" windows' content into windows clip board then switch to App "A" and send a keystroke, CTRL-F3, to trigger processing the clip board through App "A"'s normal event handlers. App "A" already knows that CTRL-F3 means to run custom VBA code to process the clipboard. Any help would be appreciated here, thanks.
  7. Just wanted to share this for those of us that work with AutoItx3.dll with our Delphi apps. I hand coded the first header file from a C .h header file, but could only get about 60% of the routines to work (my fault, not autoit) I recently went back, and with many hours work and testing, finally came up with this. autoitx3.pas
  8. I see couple of ways to import module , one with specifying absolute path of the file to get imported, by this logic i believe to import a specific module will be like #include <c:\modulepath\duplicatemodule.au3> but i see some registry changes also made in this link , can someone explain why that registry change is really required.
  9. I am trying to execute a exe file in auto it as elevated previlage , but not successful till now . below are the methods i tried till now. Disabled UAC access from windows and selected run only as administrator from executable properties. i logged in as administrator but still exe needs to launch as run as administrator. Used Below methods from forum still no luck. anything i missing? i tried to use powershell.ps1 intead of exe as well. 1. Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, $RUN_LOGON_NOPROFILE, "c:\Exec.exe", "", @SW_SHOWMAXIMIZED) 2. RunWait("C:\Automation\TestScripts\Writefilter.exe", @WindowsDir, @SW_MAXIMIZE) - Std out error This command gives out put as running with admin rights #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #RequireAdmin Example() Func Example()     ; Change the username and password to the appropriate values for your system.     Local $sUserName = "Admin"     Local $sPassword = "PASSWORD"     Local $iPID = RunAs($sUserName, @ComputerName, $sPassword, 0, "noetpad.exe", "", @SW_SHOWMAXIMIZED)     ; Run Notepad with the window maximized. Notepad is run under the user previously specified. ;~     RunWait(@WindowsDir & "C:\automation\TestScripts\Writefilter.exe", @WindowsDir, @SW_MAXIMIZE) EndFunc 
  10. Hello, I have below code which execute well when all prerequisite met, when window pop up is not available its throwing an error. i want to capture error instead of error out. error handling added in the code to capture it but it does not work still giving me error saying Variable must be of type "Object". $oCurWin.FindAll($treescope_subtree, $oCondition, $pElements) $oCurWin^ ERROR How to catch error properly .
  11. Hello, I have to execute below block of code in elevated previllage, as that particular wmic class will work only with admin previlage. i am getting out put when i launch autoit as administrator, but i will not be able to launch autoit as admin in this particular case but my user have admin rights. is there any better way i can run those command as administrator.? tried below steps: i have tried #RequireAdmin but that creates a user prompt Tried using Runas command but gives error as wrong username or password , stuck with that step.
  12. Hi UPDATED Notes: =============================================================================== UPDATED: My main and second questions answered. Here the answers: To add/access WinMenuSelectItem you need to [Thanks to Fernando_Marinho]: Add AutoItX.Dotnet in Manage NuGet Packages Right Click in your Project -> Add -> Reference... -> COM ( Type Libraries )than, check the option AutoItX3 1.0 Type Library using AutoItX3Lib; AutoItX3 au3 = new AutoItX3(); au3.WinMenuSelectItem("", ...) My full source code in C# exists in 11 posts in below. How to access those overloaded methods in AutoitX3 that are not accessible via above method!? Or how to fix AutoitX3 DLL Registration need in target computers without Autoit pre-installed on them!? Please check my post at 14 posts below! =============================================================================== Original Post: I was writing a small app in Autoit to close µTorrent app. It was working. Then I try to import AutoItX into C#, but unfortunately this method WinMenuSelectItem Couldn't find by IntelliSense and If I typed completely it still give me this message: Please check the image. I Google it and I found this QA at stackoverflow: Autoit error within C# application I saw they use this line: au = new AutoItX3Lib.AutoItX3Class(); I figure it how to add 'AutoItX3Lib' to project (by adding 'AutoItX3.dll' to reference) but again! When I use this line: var au = new AutoItX3Class(); I got this error message: Interop type 'AutoItX3Class' cannot be embedded. Use the applicable interface instead. My system info: Visual Studio 2017 Enterprise - v15.5.4 X64 Windows 10 Enterprise 1607 Thanks in advanced IgImAx
  13. Hi all, Below is my script, Pls advise me if any wrong on that....File exit in location but the return -1. FileOpen($file, 0) $line = FileReadLine($file) MsgBox(0,'',$line) FileClose($file) Local $aArray = _FileListToArrayRec($serverpath, "*|*.txt", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_SORT, $FLTAR_NOPATH) If @error Then MsgBox($MB_SYSTEMMODAL, "Ooops!", "No files found") Else ;_ArrayDisplay($aArray, "Sorted tree") Local $hSearch = FileFindFirstFile($line) MsgBox(0,'',$hSearch)
  14. I need to select an item from a SAP combobox, could anyone help me or did something like that? I tried to use some AutoIt functions but without success. When i try to identify the combobox with au3Info, this is the return: Could anyone help me with this challange?
  15. I recently tried to use ControlClick method to send a mouse click command to a button in a application, but I noticed that it is not working when I give first parameter as a window handle (HWND). But, when I give class name or window title, it works fine. I used AutoItX3 and VBScript. Following are the commands I tried in VBScript: Dim WINAPI: Set WINAPI = WScript.CreateObject("WinAPIWrapper.WINAPI") Dim AutoItX3: Set AutoItX3 = WScript.CreateObject("AutoItX3.Control") Dim WindowHandle: WindowHandle = WINAPI.WinAPI_FindWindow("my window title", "my window class") 'Window handle obtains fine by my wrapper function 'Above window handle is obtained as a hexadecimal string. (I.E. - 0x00000000) I tried it like: WScript.Echo CStr(AutoItX3.ControlClick(WindowHandle, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK WScript.Echo CStr(AutoItX3.ControlClick(CLng("&h" + Replace(WindowHandle, "0x", "")), "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK WScript.Echo CStr(AutoItX3.ControlClick(000000, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK WScript.Echo CStr(AutoItX3.ControlClick(0x00000000, "", "[CLASS:Button; INSTANCE:1]")) // DOES NOT WORK Only following commands work: WScript.Echo CStr(AutoItX3.ControlClick("[CLASS:my window class]", "", "[CLASS:Button; INSTANCE:1]")) // WORKS FINE WScript.Echo CStr(AutoItX3.ControlClick("My window title", "", "[CLASS:Button; INSTANCE:1]")) // WORKS FINE If any of your suggestions don't work, I will have to write a wrapper function myself to send mouse click commands. I chosen AutoIt V3 because it is good specially when comes to send keystrokes to applications. Please tell me why this won't work when I give window handle as first parameter. Thanks in advance.
  16. Hi experts. I'm trying to get this to work: https://www.autoitscript.com/forum/topic/173949-using-the-autoit-powershell-cmdlets/ but I get an error: error: syntax error (illegal character) "Import-Module .\" Can anyone help me?
  17. Hi Experts, I want to integrate AutoIT with Eclipse to write my code in java for automating the desktop base application, i have integrate jacob 1.18 and verify the dll's also but i am getting How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51 issue. I am using 32 bit windows xp with java 1.6 version. Java 1.7 is unsupported in 32 bit windows xp. is there any solution for the same.
  18. Hi Experts, I am getting error: _ExcelBookOpen() undefined function in auto IT scite whenever i execute any program using functions. i defined the functions name also but this error is not getting resolved. _ExcelBookOpen(): undefined function _ExcelReadCell():undefined function require your inputs to fix this issue. I'm going through the forums and examples, but can't find anything and follow the suggestions but this issue hasn't got resolved.
  19. I am trying to automate the windows GUI application, in the main window of this application i have one gridview control in it, and when you click on the any row of the gridview separate windows will be opened based on the selection of the row. we have our existing framework implemented using the core java, i have used AutoITX4java.jar file to automate the above application. and controlCommandListView options used to click on grid view row item. nothing is working. my question is AutoIT can be used/called directly from java file??? instead of using the AutoITX4java.jar file??? AutoIT supports GridView automation??? like gridview count and gridivew row item click event automation ect...???? Any help would be really appricate!! Thanks Srini srini20483@gmail.com
  20. Hi, I am trying to use ControlMove function AU3 DLL in VBA. The function instead of moving the control just makes it disappear. It only appears when I resize notepad manually. Can anybody please help me and let me know whats the miss here Here's the code I am working on: Private Declare PtrSafe Function AU3_ControlMove Lib "C:\Program Files\AutoIt3\AutoItX\AutoItX3.dll" (ByVal szTitle As LongPtr, ByVal szText As LongPtr, ByVal szControl As LongPtr, ByVal nX As Integer, ByVal nY As Integer, nWidth As Integer, nHeight As Integer) As Long Private Function ControlMove(szTitle As String, szControl As String, nX As Integer, nY As Integer, Optional nWidth As Integer = -1, Optional nHeight As Integer = -1, Optional szText As String = "") As Long ControlMove = AU3_ControlMove(StrPtr(szTitle), StrPtr(szText), StrPtr(szControl), nX, nY, nWidth, nHeight) End Function Sub test() ControlMove "Untitled - Notepad", "[CLASS:Edit; INSTANCE:1]", 0, 0, 150, 150 End Sub The Edit Box in Notepad just disappears.
  21. I am trying to use pixel search using VBA but it is returning Bad DLL calling convention error. I don't know where this is going wrong Hoping that you may be able to help. Here's my code: Public Function PixelSearch(lX1 As Long, lY1 As Long, lX2 As Long, lY2 As Long, lColor As Long, Optional lVariations As Long = 0, Optional lStep As Long = 1) As String Dim Rect As LPRECT, szResult As String, pos As Integer 'szResult = String(255, vbNullChar) Rect.X = lX1 Rect.Y = lY1 Rect.Width = lX2 Rect.Height = lY2 'Private Declare Sub AU3_PixelSearch Lib "AutoItX3.dll" (ByRef LRECT As LPRECT, ByVal nColor As Long, ByVal nVariations As Long, ByVal nStep As Long, ByVal szResult As LongPtr, ByVal nBufSize As Long) AU3_PixelSearch Rect, lColor, lVariations, lStep, StrPtr(szResult), Len(szResult) If pos > 0 Then szResult = Left(szResult, pos - 1) End If PixelSearch = Trim(szResult) End Function
  22. Hello every body!!! I was try this code is work in AutoIt (au3) #include <MsgBoxConstants.au3> #include <GuiListView.au3> Global $hWndWindow = WinGetHandle("Form1") Global $hWndLv = ControlGetHandle($hWndWindow, "", "WindowsForms10.SysListView32.app.0.bf7771_r11_ad11") MsgBox($MB_SYSTEMMODAL, "", ControlListView($hWndWindow, "", $hWndLv, "GetItemCount")) _GUICtrlListView_ClickItem($hWndLv, 1, "left", False, 2) But now, I want to use _GUICtrlListView_ClickItem in C#. I was add reference AutoItX3.dll and AutoItX3.Assembly.dll for my project but i could not found any function which same _GUICtrlListView_ClickItem from them. Please help me
  23. later , I will add more functions , please note that the main requirement is to have Nmap already installed in your machine ; ******Nmap UDF! v1.0.1******* ;Added and created by Pionner ;Chilean-Brazilian Developer ;Notice that you've nmap already installed in your machine ;In this case I dont add preventers or even error handlers, such as network connection fail or detect if nmap is already installed. #include-once #include <Array.au3> #include <StringConstants.au3> ;#include Global Const $NMAP_RAW_OUT = 0 Global Const $NMAP_ARRAY_OUT = 1 Global Const $NMAP_FILE_TXT = 2 Global Const $NMAP_FILE_XML = 3 ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_SingleScan ; Description ...: Performs an scan to retrieve open ports using @comspec and child process ; Syntax ........: _Nmap_SingleScan($ip_address, $output = 0 , $dir = @ScriptDir) ; Parameters ....: $ip_address - A valid IpV4 address as string. ; $output - [optional] Select how the result will be displayed. it can be... ; $NMAP_RAW_OUT [0] - raw results with all headers into a string.(default) ; $NMAP_ARRAY_OUT[1] - a simple 2D array indicating port/protocol, status and Service ; $NMAP_FILE_TXT[2] - Save the Results to .txt file into a custom folder (default @ScriptDir) ; $NMAP_FILE_XML[3] - Save the Results to .xml file into a custom folder (default @ScriptDir) ; $dir - [optional] Set The folder to save your output file ; Return values .: success: return the results as specified above ; Author ........: Pionner ; Modified ......: ; Remarks .......: take in count that It will take several seconds to accomplish without notifications ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _Nmap_SingleScan($ip_address, $output = 0 , $dir = @ScriptDir) Local $Raw, $ix, $pSS Dim $NwArOut[3][3] Select Case $Output = 2 $fileOuput = StringReplace($ip_address, ".", "_") & ".txt" Case $Output = 3 $fileOutput = StringReplace($ip_address, ".", "_") & ".xml --no-stylesheet" Case Else $fileOutput = "" EndSelect $ports = Run(@ComSpec & " /c nmap " & $ip_address & " " & $fileOutput , $dir , @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($ports) $ArOutcome = StdoutRead($ports) Switch $output Case 0 Return $ArOutcome Case 1 local $iw=0 $Raw = StringSplit($ArOutcome,@CRLF,$STR_ENTIRESPLIT) For $ix = 7 to $Raw[0]-3 $pSS = StringSplit(StringRegExpReplace($Raw[$ix],"\ +","|"), "|") $NwArOut[$iw][0]= $pSS[1] $NwArOut[$iw][1]= $pSS[2] $NwArOut[$iw][2]= $pSS[3] ReDim $NwArOut[$iw+2][3] $iw = $iw + 1 Next Return $NwArOut Case Else Return True EndSwitch EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_MultiScanByArray ; Description ...: Scan multiple ips at once retrieve an Array pack with results ; Syntax ........: _Nmap_MultiScanByArray($ip_array, $pipe) ; Parameters ....: $ip_pack - An Array/String. ; $pipe - The separator string (dafault is coma) ; $output - [optional] Select how the result will be displayed. it can be... ; $NMAP_RAW_OUT [0] - raw results with all headers into a string.(default) ; $NMAP_ARRAY_OUT[1] - complex 2D array 1st Col = Ip's 2nd to nth Col... port/protocol ; $NMAP_FILE_TXT[2] - Save the Results to .txt file into a custom folder (default @ScriptDir) ; $NMAP_FILE_XML[3] - Save the Results to .xml file into a custom folder (default @ScriptDir) ; $dir - the path to save the results ; Return values : a XML file with speciific Format into your @scriptdir directory ; Author ........: Your Name ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Nmap_MultiScanByArray($ip_pack, $pipe="|", $dir = @ScriptDir) Local $ipCalc = StringReplace($ip_pack,$pipe," ") $ports = Run(@ComSpec & " /c nmap " & $ipCalc , $dir , @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($ports) $ArOutcome = StdoutRead($ports) Select Case "" Return $ArOutcome Case 1 $ver = StringSplit($ArOutcome,"" & @CRLF,$STR_ENTIRESPLIT) $lUp = _ArrayFindAll($ver,"report",0,0,0,1) Dim $OutArrMult[1][2] Dim $ips[1] For $ix=0 to UBound($lUp)-1 $ips[$ix] = StringReplace($ver[$lUp[$ix]],"Nmap scan report for ","") Local $in = ($lUp[$ix]+4) Local $iCol = 1 $OutArrMult[$ix][0] = $ips[$ix] ReDim $ips[UBound($ips)+1] While $ver[$in + $iCol] <> "" $iRow = StringSplit(StringRegExpReplace($ver[$in + $iCol],"\ +","|"),"|") $OutArrMult[$ix][$iCol] = $iRow[1] ReDim $OutArrMult[$ix+2][UBound($OutArrMult,2)+1] $iCol = $iCol + 1 WEnd Next Return $OutArrMult EndSelect EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_MultiScanByList ; Description ...: Use a .txt with a list of lots of ipv4 addresses and make it hapen! ; Syntax ........: _Nmap_MultiScanByList($file) ; Parameters ....: $file - the Full path of file that contains the ipv4 list. ; $dir - the destination fiolder ; Return values .: ; Author ........: Pionner ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Nmap_MultiScanByList($file, $dir) $ports = Run(@ComSpec & " /c nmap -iL " & $file , $dir , @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($ports) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_ScanByRange ; Description ...: ; Syntax ........: _Nmap_ScanByRange($ip, $range) ; Parameters ....: $ip - An integer value. ; $range - An unknown value. ; Return values .: None ; Author ........: Your Name ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Nmap_ScanByRange($ip, $range) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_ScanEntireSubnet ; Description ...: ; Syntax ........: _Nmap_ScanEntireSubnet($ip_loc) ; Parameters ....: ; Return values .: None ; Author ........: Your Name ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Nmap_ScanEntireSubnet($ip_loc) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_ScanAgressiveMode ; Description ...: Make a Agressive Scan to a Ip address (no stealth mode) ; Syntax ........: _Nmap_ScanAgressiveMode($ip_address) ; Parameters ....: $ip_address - A Valid Ipv4 address. ; Return values .: Open ports for given IP ; Author ........: Pionner ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Nmap_ScanAgressiveMode($ip_address) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_ScanIpv6Target ; Description ...: ; Syntax ........: _Nmap_ScanIpv6Target($ip_address) ; Parameters ....: $ip_address - A Valid Ipv6 address ; Return values .: None ; Author ........: Your Name ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Nmap_ScanIpv6Target($ip_address) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_ARPPing ; Description ...: Ping a host with ARP script ; Syntax ........: _Nmap_ARPPing($ip_address) ; Parameters ....: $ip_address - A valid Ipv4 address. ; Return values .: Open Ports of given ; Author ........: Your Name ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _Nmap_ARPPing($ip_address) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_ScanFastMode ; Description ...: Scan the given Ipv4 address in Turbo mode with minimal verbosing info ; Syntax ........: _Nmap_ScanFastMode($ip_address) ; Parameters ....: $ip_address - An integer value. ; Return values .: None ; Author ........: Your Name ; Modified ......: ; Remarks .......: ; Related .......: ; Example .......: No ; =============================================================================================================================== Func _Nmap_ScanFastMode($ip_address) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _Nmap_ExecuteNSEscript ; Description ...: ; Syntax ........: _Nmap_ExecuteNSEscript($ip_address, $sname[, $sarguments = ""[, $fileoutput = ""]]) ; Parameters ....: $ip_address - An integer value. ; $sname - A string value. ; $sarguments - [optional] A string value. Default is "". ; $fileoutput - [optional] A boolean value. Default is "". ; Return values .: None ; Author ........: Your Name ; Modified ......: ; Remarks .......:list of interesting nse scripts ; nmap -sU -p 161 -T4 -d -v -n -Pn --script snmp-interfaces & ip -- get the remote MAC address ; nmap -sU -script=nbstat.nse -p137 --open 172.192.10.0/23 -oX 172.192.10.0.xml | grep MAC * | awk -F";" {'print $4'} ; Related .......: ; Link ..........: ; Example .......: Yes ; ; =============================================================================================================================== Func _Nmap_ExecuteNSEscript($ip_address, $sname,$sarguments = "", $fileoutput= "") EndFunc
  24. Good day!!! In the process of the script vbs I use as an information window function ToolTip, example: Set objAutoItTT = WScript.CreateObject("AutoItX3.Control") strTT = "Update Adress Book. " & VbLf & "#############################" & VbLf objAutoItTT.ToolTip strTT & "Preparation, checks." , 50, 50In the process of writing the script used AutoitX3.dll library version 3.3.8.1 Everything worked great. After upgrading to version 3.3.14.2 of the library, the script works, but the windows are not displayed tooltip. Help me please!!!
  25. Hi, im new to autoit and i have a little problem i have to do a app to start some web pages and some windows base programs oane of them is Skype, the problem is that Skype starts but only in system tray and i do not know how to appear on desktop the code i use is below: public static String jvmBitVersion(){ return System.getProperty("sun.arch.data.model"); } private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) { String jacobDllVersionToUse; if (jvmBitVersion().contains("32")){ jacobDllVersionToUse = "jacob-1.18-M2-x86.dll"; } else { jacobDllVersionToUse = "jacob-1.18-M2-x64.dll"; } File file = new File("lib", jacobDllVersionToUse); System.setProperty(LibraryLoader.JACOB_DLL_PATH, file.getAbsolutePath()); AutoItX x = new AutoItX(); x.run("C:\\Program Files (x86)\\Skype\\Phone\\Skype.exe"); x.sleep(2000); x.winWaitActive("Skype"); x.winActivate("Skype"); }
×
×
  • Create New...