Sign in to follow this  
Followers 0
leuce

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

2 posts in this topic

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

Samuel

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)
Exit

...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  
Followers 0