This topic is now closed to further replies.
Recently Browsing 0 members
No registered users viewing this page.
As I am still finding my feet with AutoIT, I thought that I would do a quick test.
I therefore created some HTML code to create a small yellow non-functioning test button on a web page.
#include <Misc.au3> #include <Msgboxconstants.au3> LOCAL $sPos LOCAL $sColor LOCAL $sYellow = "#FFFF00" While 1 $sPos = MouseGetPos() $sColor = Hex(PixelGetColor($sPos, $sPos)) $sColor = "#" & StringMid($sColor,3) ToolTip($sColor) If (_IsPressed("01") = True) And ($sColor = $sYellow) Then MsgBox (262144,"Found it","X=" & $sPos & " Y=" & $sPos) EndIf Wend The code correctly detects when I click on the button.
However, it also highlights on anything else yellow (e.g. a yellow background) that I click on, not just the button.
I did change the link from "empty" to "www.google.com" and then checked if the current browser URL changed also, thereby indicating that I clicked on a yellow link rather than just a yellow background. That worked fine.
However, as it is about improving my knowledge of AutoIT rather than for a specific project, can anyone think of another way which I could do it?
Detecting a URL change is fine, but I then end up on a new page i.e. www.google.com.
I would like to see if I can do it without changing the size.
help to Identify a Specific Client Application, take screen capture, save the jpeg file to UNC locationBy vargheseg
I am new to AutoIT but I do use Sikuli. Decided to use AutoIT for this project as all the required can be created in an .exe file, does not need Java like Sikuli.
Also which can be pushed to tool bar of Windows 10 desktop.
Our users will interact with a client/server application and normally work on dual screen. The script needs to detect the c/s application from the dual screen, needs to do three mouse clicks based of image/pixel comparison, will need to wait till the click object is available and then finally take screen capture of the top 40 rows and save the .jpeg file to windows file share location.
once the file save is completed, pop up message - the screen capture is completed. Then the users can do their regular work.
Potentially other factor that will play are the screen resolution.
Can anyone guide me to some relevant scripts already in the forum. In the meantime I am learning the basics of the tool.
Appreciate feedback and any help
[SOLVED] Can I run an Autoit script that requires focus and mouse clicks in the background and do work?By nooneclose
Good morning, I have been thinking about trying to make my Autoit script run in the background. I found out today that it is impossible due to the UIA and mouseclick functions that I use. However, while reading other posts about running Autoit scripts in the background I saw a reply mentioning how a script like mine might be able to run on a VM while still giving me the ability to work on my Host OS. Can someone confirm this?
Here is a link to the thread where I saw VM mentioned.
the person who mentioned it was @ViciousXUSMC
I'm writing a script that interacts with a webpage.
The contents of the webpage depend on the size of the browser window.
To get the (for me) correct contents from the page, the browser window must be maximized.
However, I also don't need or want to see the browser window when the script creates it, so it should be invisible.
At first I created the browser window with simply this:
$oIE = _IECreate ($url ,0 ,0 ,1 ,0) However, from the results I can see that the invisible browser window isn't maximized.
So I changed the code to maximize the window, but then it becomes visible.
Now I have this:
$oIE = _IECreate ($url ,0 ,0 ,1 ,0) $hIE = _IEPropertyGet($oIE, "hwnd") WinSetState($hIE, "", @SW_MAXIMIZE) WinSetState($hIE, "", @SW_HIDE) ...but then I do see the browser window shortly when it is maximized.
I could live with that if it were just a single browser window. But the script is opening (and closing) quite a few browser windows, and I don't wait to see them flicker, nor do I want to (be able to accidentally) interact with these windows.
Any ideas on how to create and invisible yet maximized IE windows?