Jump to content

Search the Community

Showing results for tags 'AutoIt'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


  • 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


  • Forum
  • AutoIt


  • Community Calendar

Found 531 results

  1. Hello friends, I have a simple question, can I have a variable that is not reset, even if my program is closed?That is, I want to make a program that can only be opened once, have a variable $ ini = 0, when it is opened for the first and only time it becomes $ ini = 1, so that it can not use the program a second time, as if it was a test software.I do not want the variable to depend on a reading of an external file that is easily manipulated. Thank you.
  2. My program has to first search for names in Column D that do not match up with column C. I got that search to work using arrays. It was slow and I could not figure out how to delete them so I just manually put coded the names that do not belong. I found their cell location but I do not know how to store that location and delete it. This is what I have so far. Local $NameToDelete1[6]  = _Excel_RangeFind($OpenWorkbook, "Smith, Bill") _ArrayDisplay($NameToDelete1, "Excel UDF: _Excel_RangeFind Example 1", "", 0, "|", "Sheet|Name|Cell|Value|Formula|Comment") _Excel_RangeDelete($OpenWorkbook.ActiveSheet, $NameToDelete1[2], $xlShiftUp) Please help, I wanted to have this program done yesterday but I did not see this problem until yesterday.
  3. So Im trying to make a simple 2d game and make some sort of collision detection so why not to make a 2 dimensional array but i have no clue how to write it in multiple lines Global $map[5,5] = [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0 _ [0,0,0,0,0] something like this but it doesn't work
  4. #include "..\Include\Array.au3" #include "..\Include\File.au3" #include "..\Include\AutoItConstants.au3" Local $aRetArray Local $sFilePath = "n.csv" _FileReadToArray($sFilePath, $aRetArray, ",") ; _FileReadToArray($sFilePath, $aRetArray, $FRTA_COUNT, ",") _ArrayDisplay($aRetArray, "Original", Default, 8) The above code shows two versions of _FileReadToArray and both don't work as expected. The first one doesn't use the comma as a delimiter. (so I get a single column array) I tried adding "Default" between $aRetArray and "," then it told me it had an incorrect number of parameters. I looked again at the documentation: #include <File.au3> _FileReadToArray ( $sFilePath, ByRef $vReturn [, $iFlags = $FRTA_COUNT [, $sDelimiter = ""]] ) And I with or without the flags params I should be getting a 2D array due to my file being a csv. I then tried a regular flag, $FRTA_COUNT, and it tells me that I'm using a variable $FRTA_COUNT while it's not declared. Tried putting in 1 instead and it told me again, incorrect number of params.
  5. I need to perform a subtotal in excel and I would like to automate this process using Autoit if possible like always any and all help will be greatly appreciated. I can not find a good example but the two from Microsoft. Here is one of the two from msdn.microsoft.com/en-us/vba/excel-vba/articles/range-subtotal-method-excel I do not really understand how to translate this into AutoIt, but I gave it a try and here is what I have. $OpenRange      = "A1:E200" $xlSum          = -4157 $Added_Array[2] = [2, 3] $OpenRange.Subtotal("B1", $xlSum, $Added_Array, True, False, True) I just need to perform a subtotal on a range based on a header called department, and then perform a sum on the results.
  6. How to use _Excel_RangeSort to sort my excel file by three different headers Column A1, B1, and C1 have headers on which I want to sort by. The headers on which I want to sort are department, employee type, and name. I still really new to AutoIt so I do not actually know how to properly start this line or lines of code, to be honest. The example code is the best I can do. _Excel_RangeSort($OpenWorkbook, Default, "A1:C1", "1:1", $xlDescending, Default, $xlYes, Default, $xlSortRows) I just need to sort by those three headers in that order of department, employee type, and name, plus in descending order. any and all help would be greatly appreciated. Thank you!
  7. Hello, Using SQLite, I was trying to select a specific column with having duplicate entries removed by using the DISTINCT function. Local $sQuery = "SELECT DISTINCT supervisor, COUNT(DISTINCT employee_name) FROM data_db What the above snippet does is just list only one supervisor but with the total count of unique employee names in the whole database when it should be listing out all supervisor entries from the database and list the total count of employees per each supervisors. If I remove the COUNT function, it does list out all unique entries of supervisor names from the list. Attached is a screenshot of an example database as well. Any help will be much appreciated. Thank you!
  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. Hello to all. I would like to make automation for LabView compiled project exe. Actually I just need to get values (results) from labview textboxes. But since labview not using MS componenents, is that possible. I spend lot of time by googling and tried some scripts but without success. Is this possible at all? Also, I cannot read text properties window by any spy tool? here is what I have from AutoIt Info: Class: LVDChild Position: -8, -8 Size: 1456, 876 Style: 0x17CF0000 ExStyle: 0x00040300 Handle: 0x001F041C >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 1256, 267 Cursor ID: 0 Color: 0xFAFAFA >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<<
  10. I have a string that look like this: WIFI 13.8 26.59 BCRX 9.6 13.34 GTES 8.5 11.15 DFRG 5.9 33.02 GIL 5.5 12.08 How can I simply build an Array with it?
  11. 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 
  12. hi I have a problem with the IP address field I want to enter the indicated page on the Internet after entering the IP address, but it does not work pops up all the time, " Make sure that the web address is correct. "From the input field everything works, but I want to write in this field only the IP address, I used to enter the ES_Numbers style it works, but I can only write the number, dots do not work.I have read the help file about  _GUICtrlIpAddress_Create but it did not help me,anyone can help? here is code #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <GuiIPAddress.au3> #Region ### START Koda GUI section ### Form=C:\Users\Marcin\Desktop\Projekty Oficjalne\AutoLogin\AutoLog.kxf $Form1 = GUICreate("Internet Login", 542, 181, 339, 261) $Group3 = GUICtrlCreateGroup("IP ADDRESS E.G..", 16, 40, 161, 49) $IpAddress = _GUICtrlIpAddress_Create($Form1, 24, 56, 145, 21) $gPin = GUICtrlCreateInput("", 216, 56, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $gHaslo = GUICtrlCreateInput("", 216, 112, 105, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $Btn_Zaloguj = GUICtrlCreateButton("Log In", 216, 152, 97, 25) $Group1 = GUICtrlCreateGroup("Your Pin", 208, 40, 121, 49) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Your Password", 208, 96, 121, 49) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $oIE = _IECreateEmbedded() $object=GUICtrlCreateObj($oIE,336, 8, 201, 169) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() if $msg=-3 Then Exit If $msg=$Btn_Zaloguj Then Btn_Zaloguj() WEnd Func Btn_Zaloguj() $read1=GuiCtrlread($IpAddress) _IENavigate($oIE,$read1) EndFunc
  13. 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 .
  14. Autoit version: System: Windows 10 Home x64 C++ IDE: Code::Blocks 17.12 When I call the Dll that I wrote it give me how return value -1073741819 and exit value 3221225477, I tried changing variables type but it didn't work. This is the Autoit code: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** $dll = DllOpen(@ScriptDir & "\Test.dll") DllCall($dll, "NONE", "TestFunction", "STR", "1 string", "STR", "2 string", "STR", "3 string", "INT", 1) ;Here crash and doesn't show the MsgBox MsgBox(0, "", @error) DllClose($dll) This is the main.cpp code: #include <iostream> #include <Windows.h> #include "main.h" using namespace std; extern "C" { DECLDIR void TestFunction(std::string string1, std::string string2, std::string string3, int number1) { std::cout << string1 << std::endl; std::cout << string2 << std::endl; std::cout << string3 << std::endl; std::cout << number1 << std::endl; } } And that is the main.h: #ifndef _DLLTEST_H_ #define _DLLTEST_H_ #define DLL_EXPORT #if defined DLL_EXPORT #define DECLDIR __declspec(dllexport) #else #define DECLDIR __declspec(dllimport) #endif extern "C" { DECLDIR void TestFunction(std::string string1, std::string string2, std::string string3, int number1); } #endif And the values of the variables that write to the SciTe console ae completely different. Here I attach the console output of the SciTe editor: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\DragonFighter\Desktop\Dll test.au3" /UserParams +>10:30:08 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v. Keyboard:00000410 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0410) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\DragonFighter\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\DragonFighter\AppData\Local\AutoIt v3\SciTE >Running AU3Check ( from:C:\Program Files (x86)\AutoIt3 input:C:\Users\DragonFighter\Desktop\Dll test.au3 +>10:30:08 AU3Check ended.rc:0 >Running:(\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\DragonFighter\Desktop\Dll test.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop �Á+���Uø‰q�‰A�‹O`ÆEÿ�èèÖÿÿƒÄ €}ÿ!>10:30:10 AutoIt3.exe ended.rc:-1073741819 +>10:30:10 AutoIt3Wrapper Finished. >Exit code: 3221225477 Time: 3.414 Thanks in advance for every reply.
  15. So I've made this script that detects how long i have held down my left mouse button for and stores the information in an array and then sorts its using _ArraySort but the output is half sorted half broken. Here's my script: HotKeySet("{F1}","_exit") #include <Misc.au3> #include <Timers.au3> #include <Array.au3> Local $dll = DllOpen("user32.dll") $on = False Global $array[0] While(1) If _IsPressed(01,$dll) Then $timer = _Timer_Init() While _IsPressed(01,$dll) Sleep(1) WEnd $time = _Timer_Diff($timer) _ArrayAdd($array,"Time: " & Floor($time) & " ms") ;~ ConsoleWrite("Time: " & Floor($time) & " ms" & @CRLF) EndIf Sleep(50) WEnd Func _exit() _ArraySort($array) _ArrayDisplay($array) Exit EndFunc And the output: See how its not sorted? What is the problem here?
  16. Hello guys! I have a problem with capturing higher resolution using the _UIA_action("capture"). I need to capture my taskbar using the said code. It works perfectly fine with 1366 x 768 resolution. But when I tried to to a higher resolution, the capturing is a bit off. Is it possible to get the screen resolution first before capturing the taskbar? This is my code. Func _Get_TaskBar($FileName) Local $sPic_Name = $sFileName _UIA_setVar("Taskbar.mainwindow", "title:=Taskbar;classname:=Shell_TrayWnd") Local $sTaskBarPic = $logPath"\TaskBar_"&$sPic_Name ;store of pics _UIA_action("Taskbar.mainwindow", "capture", $sTaskBarPic) Return $sTaskBarPic EndFunc EDIT: Does the _UIA_action("capture") have limitation on capturing base on resolutions?
  17. I am trying to search in a web browser dates XX/XX/XXXX that are also links. I want to click them after and remove them from the array. This is all I have so far. Nothing shows up. What am I doing wrong? ControlFocus ("Customer Center", "", "") Local $aArray = StringRegExp('(..)/(..)/(....)', '(..)/(..)/(....)', $STR_REGEXPARRAYFULLMATCH) For $i = 0 To UBound($aArray) - 1 MsgBox($MB_SYSTEMMODAL, "RegExp Test with Option 2 - " & $i, $aArray[$i]) Next
  18. Hello, i am new to AUTO IT development , I would like one help to read value from a POP up. i am able to read below values using inspect tool , information given below, I tried to create a script to read value but that does not help. any help is appreciated. Available Controls POPUP window Controls Auto Id = "UpdateNow_Btn" Name = Update Now Invoke - Button Control Below Controls i get when i move inspector tool to the text which i need to read. i need to read the text Name . Currently with my code i get only blank text Auto Id = timeOutLb ClassName = TextBlock LegacyIAccess = GetName Name = Read Value for Name My code.
  19. hello there! Is it possible for me to search only the file extensions in my directory? Say in my Desktop, I want to search for files having ".zip" extensions. How will I do it? FileExists needs the file name so I wont be able to use it. Any idea?
  20. I have this psexec command working fine Local $sMachine = InputBox("Input PC name", "Enter Computer Name") psexec \\$sMachine -u $sDomain\$sUserName -p $sPassword \\NetworkFLD\FILENAME.cmd > C:\Temp\TT\My.log I wanted to converted to AutoIT script Cloud you help, please !?
  21. Hello I am a first time user of AutoIT with little coding experience and I would REALLY really appreciate your help. I work in a warehouse where I am responsible for data entry along with a slew of other different tasks such as auditing and managing paperwork. Most of my time is tied up entering info to close receipts of product orders (8-12+ hours for thousands of products). The quantity actually produced by the warehouse is sometimes different from the quantity listed on the reciept (in this case 20). I need to change all the build qty for sublocation "1-WIP" from 20 to the actual quantity 22 and set all other numbers as 0. The form is an iframe coded with jQuery and freezes for 1-2 seconds after every entry and refreshes. As such, it doesn't allow me to use tab and I need to click and type every incorrect field. I have attached an image as an example from the webapp, FinaleInventory. I'm thinking that I probably need a macro that has a message box entry where I can type the corrected number entry I want. Then it uses image/character recognition (Tesseract?) to find "WIP" sublocation =, Move the mouse over to the right to "Quantity" relative to location of WIP If quantity number = entry, then move to next "WIP" image (Not quite sure how to make Tesseract "find next") Elseif quantity number ≠ entry then click quantity number of "WIP" and type corrected entry Scroll down Loop until bottom of page I would greatly appreciate any help, ideas or pointers for this project. Thank you! -A newbie scripter
  22. <a href="index.php=4143b27b41db0a40c499202865c3e24d" class="menuitem " target="\_self"> "Menu Item 1" </a> Can you tell me if it´s possible to click this menu button? If yes, how? Cause I have no idea, I think i should use _IETagNameGetCollection
  23. hello, I want to set in the inputbox field random key from the keyboard to which the function will be assigned, for example F4 function start notepad ALT + A function start notepad for one function. Thank you for any help.
  24. Help with GUI

    Cambiar a español Hello friends, I need help with a problem I have, I want to know if there is any way to update a GUI already running, that is I have a GUI of a certain size and with a button I would like to enlarge it: example: $ form1 = GUICreate ("", 200,100,0,0) When you press the button, the gui increases its size, and actuates the new size.

    While 1 / / / A whole bunch of codes found in help and here: https://www.autoitscript.com/autoit3/docs/ / / / WEnd OR: HotKeySet("{ESC}", "Terminate") While 1 MouseClick("Right",674,422) MouseClick("Left",673,447) Sleep(2000) / / / A whole bunch of codes found in help and here: https://www.autoitscript.com/autoit3/docs/ / / / MouseClick("Left",675,339) SLeep(3000) WEnd Func Terminate()     Exit 0 EndFunc Sorry if i should't let this here to be found by newbies like me -.-'