ineedh3lp Posted December 21, 2011 Posted December 21, 2011 Hello! Is it possible to automatically select files within a file manager using AutoIt? I want to be able to do it without simulating mouse/keyboard gestures. Probably through dll calls, but I have no solid clue about how to do it. Let's say there's a Windows Explorer window displaying 3 files. After running the script, I'd like to have 2 of them selected (as if ctrl+clicked) based on parameters passed to the script (like file base names). Thank you!
Moderators JLogan3o13 Posted December 21, 2011 Moderators Posted December 21, 2011 (edited) Hi, ineedh3lp. Are you opening the Explorer window or is another program? If you are opening it, you can use the FileOpenDialog function. Check the Helpfile, but I believe option 4 allows you to multi-select. Edited December 21, 2011 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
KaFu Posted December 21, 2011 Posted December 21, 2011 This excellent post by Ascend4nt should contain all you need: OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
ineedh3lp Posted December 21, 2011 Author Posted December 21, 2011 Thanks for the suggestion, JLogan, but I do not want to initiate an Open File Dialog, jut automatically select one or more files present in the current view of a folder in Windows Explorer (or another file manager). Thank you for the resource, KaFu. I will check it and report back.
ineedh3lp Posted December 21, 2011 Author Posted December 21, 2011 KaKu, I have tested the code and it works well selecting a single item, but is it possible to select multiple items? I know how to process an array or string of items, I only want to know if the procedure can be modified to allow multiple item selection. Or selecting one item, selecting all and deselecting all are the only possible methods?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now