Jump to content
Sign in to follow this  

How to capture drag-and-dropped file's name

Recommended Posts

G'day everyone

I want to write a program launcher script (compiled to an EXE file) that works with an INI type of file that the user has to drag to the launcher to launch the program. In the INI file, the user specifies various things which the script should perform once it has launched the program.

I know I can launch an AutoIt script by dragging any TXT file to it, but how can I tell the script to capture the name of the file which was dragged onto it by the user?

Thanks in advance


Share this post

Link to post
Share on other sites

Found it!

Compile a script with the following code in it:

MsgBox (0, "The file", "The file is named " & $CmdLine[1], 10)

...and see what happens when you drop a file onto it. :-)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...