Jump to content

Click on a file in the current window


PMGSI
 Share

Recommended Posts

Hi there

New 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:

sample%20file%20list_zpsofvyg1qr.jpg

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.

Link to comment
Share on other sites

@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

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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...