PMGSI Posted January 5, 2016 Posted January 5, 2016 Hi thereNew user here - just wondered if someone could tell me if this is possible please:What I'm after is to be able to simulate what happens when you click on a file in a windows explorer window to highlight the file. In other words I pass the file name 'file 3.txt' to a script and get this result:I then intend want to go on and prompt for a rename by the user, which I assume I can do by simply using Send to pass an F2 keypress.Thanks in advance for any guidance.
orbs Posted January 5, 2016 Posted January 5, 2016 @PMGSI, welcome to AutoIt and to the forum!yes that is possible. however...in general, you'll find that when you want to automate tasks, you would prefer doing it "behind the scene" rather then automating a GUI, which is prone to issues. how bout using InputBox() for asking the user for the new name, and FileMove() for the rename operation itself? Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates WinPose - simultaneous fluent move and resize Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Magic Math - a math puzzle Demos: Title Bar Menu - click the window title to pop-up a menu
PMGSI Posted January 5, 2016 Author Posted January 5, 2016 Hi orbsThanks for your quick reply.I was hoping to do it behind the scenes as you say, so don't want a GUI. I'll check out Filemove. Cheers
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