Jump to content
Sign in to follow this  
lionelsiu

Select an item in the Folder View

Recommended Posts

lionelsiu

Is it possible to write a script to select an item in the Folder View?

For example,given in the screenshot below, I want to select (perform a single left click) on folder named "system32".

Thank you!

 

post-80970-0-47053500-1376040230_thumb.p

Share this post


Link to post
Share on other sites
orbs

AutoIt offers much more powerful methods to handle filesystem objects then simulating mouse clicks and keystrokes in the GUI.

what are you trying to do, that forces you into using the GUI?

Share this post


Link to post
Share on other sites
water

Have a look at functions FileSelectFolder and FileOpenDialog.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
lionelsiu

Thanks for the replies. 

However, I am still confusing.. this file dialog is popped up from an application.

The functions mentioned are from AutoIt side, how is it possible to pass the selected items into my application?

Share this post


Link to post
Share on other sites
orbs

ok, if you are forced to using this dialog popped by your app, then follow this route:

step 1:

use the AutoIt Window Info tool (Start > Programs > AutoIt3) to determine the Control ID of:

the element presenting the list of folders & files

   - or - 

the InputBox where you can type the file name

step 2:

use ControlSend() to pass to this Control ID the folder/file name you want to use. (if it's in the list, then the focus will go to the folder as you type. you can try it manually).

step 3:

Send("{ENTER}")

you know, if you give us a little background on what you are doing and why, we may better understand your issue, and suggest more suitable solutions. but hey, feel free to stop us from helping you anytime :-)

Edited by orbs
  • Like 1

Share this post


Link to post
Share on other sites
lionelsiu

Thank you for your detailed answer, It helped me solving the problem. =]

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  

×