Sign in to follow this  
Followers 0
Bunny_Ding

How to image search and click on an activeWindow

7 posts in this topic

Hi All, I'm really new to AutoIt. Now i'm facing one issue while doing the automation scripting for one project. 

Here are steps I need to follow eg:

1. Open FireFox - Done

2. Go to FireFox Options window - Done

3. Inside the Options window, need to search for some option to click - Facing Issue right now.

My problem is FireFox those options buttons can not be get the information from Winodws Tool Info. It was made as a whole panel so that I can not select the individual buttons to do.

My idea case was using the image search, find the matched the image then mousemove to the location and set to click on it. During the research I could find out the image search method, but could not use on my case. Because the ImageSearch.aus file is searching the desktop width and length.  The scripting I'm creating right now is not only use on my own PC, so that just to select the image location is not safe. I wish to find out a stable method to do this action. 

Very appreciate for the helps. Thanks a lot.

The screenshot is the example that I want to do. Thanks very much if someone can figure it out.

FF want to do Options.jpg

Share this post


Link to post
Share on other sites



What are you trying to set in Firefox?

You can probably set it by modifying the configuration file (prefs.js) for Firefox rather than trying to automate the window.

 


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

          Hi BrewManNH, thanks a lot for the reply. What i want to do is viewing or importing certificates into FireFox. Is it anyway can make it automation?  

Share this post


Link to post
Share on other sites

What's the difference between using the gui and certutil.exe?

 

I'd rather use command line than a gui.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Hi jdelaney,

I agreed with you. But for FireFox, I could not find out the command line for doing such actions.

Share this post


Link to post
Share on other sites

I would think it all pulls from the same global areas...use the certutil.exe


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Look at the documentation of certutil.exe and -addstore option.

I tried
certutil -addstore "Root" "c:\cacert.cer"

and it worked well (meaning The certificate landed in Trusted Root of LocalMachine store).


EDIT:
If there are multiple certificates in a pfx file (key + corresponding certificate and a CA certificate) then this command worked well for me:

certutil -importpfx c:\somepfx.pfx


Certutil –addstore –f "TrustedPublisher" <pathtocertificatefile> 
Certutil –addstore –f "CA" <pathtocertificatefile>

Certutil.exe -addstore root cert.cer


Regards,
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0