-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By shelly
I have to press tab to reach a selected button then double click on that
Here's my script but its not working:
WinActivate("Policy Decisions -- Webpage Dialog","")
Sleep(3000)
Send("{TAB}")
Send("{TAB}")
Send("{TAB}") // at this point its working according to my need but double click is not working
Mouseclick("Left",510, 320, 2, 0)
-
By cruisepandey
Hi There !
I have a script here :
;Launch CMD
Run("C:\Windows\System32\cmd.exe")
sleep(2000)
$cmdHandle = WinActivate("C:\Windows\System32\cmd.exe")
Sleep(2000)
;Sending document
ControlSend($cmdHandle, "", "", "ftp" & @CRLF)
ControlSend($cmdHandle, "", "", "open" & @CRLF)
Sleep(2000)
ControlSend($cmdHandle, "", "", "first command" & @CRLF)
Sleep(2000)
ControlSend($cmdHandle, "", "", "second-coomand" & @CRLF)
first-command and second-command I can't provide cause it's internal. I have complied this .au3 file into an exe and it does the work. But I need to invoke this with Java. Java code I have tried is :
ProcessBuilder pb = new ProcessBuilder("C:\\Users\\username\\eclipse-workspace\\Examples\\src\\com\\own\\examples\\etc.exe");
pb.start();
Thread.sleep(5000);
Through java it just launches the cmd and nothing happens after that. Please help !!
-
By Raj0813
Launch the web application which has security certificate associated. On launching we get "Select a Certificate from the list of certificates" . how to handle this certificates using AutoIT and certificates are in a drop down. i have only chrome browser to launch the application. do i need to install autoIt or just the add jar files and dll to it. it is not a pop up.
Tried adding the certificate to trusted source dint work..
Please find the screenshot attached for the screen obtained.
-
By ags911
I have a script that has to work on multiple resolutions but each resolution has slightly different co-ordinates due to automatic UI scaling. I have had to make separate files for each but would like to implement them all in one script. I have a similar program written for Java which uses else if statements to use different co-ordinates for each resolution after it has been detected. I'm not good with Java so I would like to implement this on AutoIt before later making a Java version.
This is a snippet of the autoit code I have.
ToolTip("1 - Search")
MouseClick("Left", @DesktopWidth *0.823, @DesktopHeight *0.925, 1, 25)
ToolTip("2 - Buy Now")
MouseClick("Left", @DesktopWidth *0.83, @DesktopHeight *0.798, 1, 27)
ToolTip("3 - OK")
MouseClick("Left", @DesktopWidth *0.555, @DesktopHeight *0.596, 1, 15)
ToolTip("4 - OK Clear Error")
MouseClick("Left", @DesktopWidth *0.49, @DesktopHeight *0.597, 1, 30)
ToolTip("5 - Back to Search")
MouseClick("Left", @DesktopWidth *0.161, @DesktopHeight *0.108, 1, 15)
This is a snippet of a java code I used.
Thanks.
private static void goToSearch(double maxX, double maxY, Robot bot) throws InterruptedException { int currentX = 0; int currentY = 0; if (maxX == 2650 && maxY == 1440) { currentX = 734; currentY = 1316; } else if (maxX == 1920 && maxY == 1200) { currentX = 551; currentY = 1096; } else if (maxX == 1920 && maxY == 1080) { currentX = 551; currentY = 1042; } else if (maxX == 1680 && maxY == 1050) { currentX = 482; currentY = 959; } else if (maxX == 1440 && maxY == 900) { currentX = 413; currentY = 822; } else if (maxX == 1366 && maxY == 768) { currentX = 392; currentY = 741; } else if (maxX == 1280 && maxY == 800) { currentX = 367; currentY = 731;
-
By Psyllex
I have a super simple login screen I'm trying to access that is written in java. My java testing tools can't access the login screen because it's a modal window. So I figured I'd see if AutoIt can manipulate 'something' on it. I can enter text within the text boxes for user name and password. But I can't see to click on the login button. I've tried just tabbing to it and hitting the enter key (as I really wouldn't have to be completely interacting with the frame). But that didn't work. I was hoping to throw it some coordinates and just double click in that relative area, but when I get the whole " ==> Subscript used on non-accessible variable.:" when I attempt to use ControlGetPos() I'm assuming because it can't truly interact with the Java frame. So I'm kind of stuck here...can't use AutoIt, can't use a Java automation testing tool to do this due to the modal issues. Does anyone have any ideas? My code is below though I think it's less to do with code and more what AutoIt can and can't do.
#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Local $hWnd = WinActivate("[CLASS:sunawtframe]", "Login") Local $aPos = ControlGetPos($hWnd, "[CLASS:SUNAWTFRAME]", "Login") Local $myXPos = $aPos[0] + 420 Local $myYPos = $aPos[1] + 270 Send("guest") Send("{TAB}") Send("guest") Send("{TAB}") ;Tried Control Click it failed ControlClick($hWnd, "", "Login") ;Tried Mouse Click and that failed MouseClick("Left", $myXPos, $myYPos, 2)
Thanks for any help!
-