Recently Browsing 0 members
No registered users viewing this page.
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
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.
While ObjectAutoit.WinExists("",WindowHeader) Cycle
After upgrade I get that this line code
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.
I'm trying to be able to switch back and forth between multiple excel spreadsheets and I can't seem to get the WinActivate function to work, and bring the desired window the be the active window.
Could I please get some assistance, I've tried a few things and nothing seems to work quite right. Below is a test case where I'm just trying to make the first excel sheet that was opened become the active window, and testing it by grabbing a cell value off that workbook. The message box produces the correct answer if both files are closed before running but the 2nd test file will appear to be the active window. If the code is run again without closing the excel files, nothing works (file does not appear to be active and message box will not give an answer).
#include <Excel.au3> Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase ;Open Test1 Excel Workbook local $oExcel = _Excel_open() Local $ofile = @ScriptDir & "\test1.xlsx" Local $oWorkbook = _Excel_BookOpen($oExcel,$ofile) ;Open Test2 Excel Workbook local $mExcel = _Excel_open() Local $mfile = @ScriptDir & "\test2.xlsx" Local $mWorkbook = _Excel_BookOpen($mExcel,$mfile) ; This workbook is completely blank WinActivate($oWorkbook); should make Test1 the active window local $read1 = _Excel_RangeRead($oWorkbook,Default,"B2"); Cell B1 in Test1 workbook contains the word Test MsgBox(0,0,$read1);Should returns the word test
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.
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