Sign in to follow this  
Followers 0
tjolley

Selecting Windows Icon in active window

5 posts in this topic

I have a question about being able to focus on a specifc icon within a Windows XP SP window. Example window would be Windows Explorer. Icons in this window does not seem to have a class ID. Is there a way to call a focus or select command based on the name of the icon? For example. if you want to have a script access the My Documents folder and then be able to select and highligh "My Pictures", how could this be done? let me know

Share this post


Link to post
Share on other sites



I have a question about being able to focus on a specifc icon within a Windows XP SP window. Example window would be Windows Explorer. Icons in this window does not seem to have a class ID. Is there a way to call a focus or select command based on the name of the icon? For example. if you want to have a script access the My Documents folder and then be able to select and highligh "My Pictures", how could this be done? let me know

Oh boy... :whistle:

The folders in Windows Explorer are not "icons". If you use the AutoIt Info tool, you'll see that these folders are visually displayed in controls (either a TreeView or a ListView). If you want to know how to manipulate these controls (and Windows Explorer in general), there are several demo scripts in the Auto3Lib library that can help you out.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Oh boy... :whistle:

The folders in Windows Explorer are not "icons". If you use the AutoIt Info tool, you'll see that these folders are visually displayed in controls (either a TreeView or a ListView). If you want to know how to manipulate these controls (and Windows Explorer in general), there are several demo scripts in the Auto3Lib library that can help you out.

Thanks Paul, I pulled down the AutoITLib. It is way to advance for me at this time. :)

To give you more details of what I am trying to do, I am trying to automate the wireless configuration settings on Windows XP SP2 for WPA2 and want to be able to select the wireless adaptor "icon" (do not know what you would call it, control, someting) on the Network Connections window. (ncpa.cpl). I found a few other scripts on here that allow me to access to Network Connections windows however the next step is for the script to focus in on or select the Wireless Network Connection "icon" so that I then can send the Send ("^,TAB) to get to the properties to run through my script. I found similar script that use SEND (RIGHT), Send (DOWN), etc however I would like to be more precise since the position of the Wireless Network Connection "icon" may not always be in the same postion. Thus Right, down, commands do not always work. Suggestions?

Share this post


Link to post
Share on other sites

Thanks Paul, I pulled down the AutoITLib. It is way to advance for me at this time. :whistle:

To give you more details of what I am trying to do, I am trying to automate the wireless configuration settings on Windows XP SP2 for WPA2 and want to be able to select the wireless adaptor "icon" (do not know what you would call it, control, someting) on the Network Connections window. (ncpa.cpl). I found a few other scripts on here that allow me to access to Network Connections windows however the next step is for the script to focus in on or select the Wireless Network Connection "icon" so that I then can send the Send ("^,TAB) to get to the properties to run through my script. I found similar script that use SEND (RIGHT), Send (DOWN), etc however I would like to be more precise since the position of the Wireless Network Connection "icon" may not always be in the same postion. Thus Right, down, commands do not always work. Suggestions?

If you have Auto3Lib, there is a demo that shows how to set the network connections. If you can't use that, you'll have to build a script that sends the appropriate key strokes to do what you want.

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

I worked round this problem by creating a short-cut folder containing shortcuts for LAN, Hard Drives, Etc.

This way I can use "#r" to open RUN and enter the address of the short-cut folder and have the 'icons' in known positions or sub-directories.

Hope this helps,

Wid.

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