Jump to content

Drop Like a Batch File


Recommended Posts

I want to have a au3 script that acts like a powerful batch file. I want to have this file sitting on my desktop and it would allow me to drop a file (or multiple files) onto it and have the script run, reading the command line parameters and acting on them.

I have tried this and the script does not seem to start when I drop a file onto it. Is there a way to do this?

Also, when I installed AutoIT I set it so that double clicking edits the file. How can I change it so that double clicking rus the file?

Thanks

Steven

Link to comment
Share on other sites

I want to have a au3 script that acts like a powerful batch file. I want to have this file sitting on my desktop and it would allow me to drop a file (or multiple files) onto it and have the script run, reading the command line parameters and acting on them.

I have tried this and the script does not seem to start when I drop a file onto it. Is there a way to do this?

Also, when I installed AutoIT I set it so that double clicking edits the file. How can I change it so that double clicking rus the file?

Thanks

Steven

Can you post your script or an example script so we can see what you've tried/why it doesn't look like the script is running?

You need to read the filenames passed to it using the $CmdLine array, have you read the help file about this variable?

Edit: Note you can't drag files onto an uncompiled script and expect it to run...Windows will only trigger executable files when another file is dragged onto it. Have you compiled your script?

Edit 2: By the way, welcome to AutoIt :-)

Edited by james3mg
"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

...Also, when I installed AutoIT I set it so that double clicking edits the file. How can I change it so that double clicking rus the file?...

I'm sure that there is a better answer than the one that I'm going to suggest, but just re-install AutoIt and make the selection you want. :-)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

...maybe you can

I stand corrected :)

Compiling it worked great. Thanks

Glad to be of service! :D
"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

I stand corrected :) ...

I was in agreement with you right up until I found that post. I did not know that you could do that either. I just found it while searching thru the forum for info to contribute to this thread.

Like CyberSlug said, it might come in handy when debugging a script.

-MSP-

[size="1"][font="Arial"].[u].[/u][/font][/size]

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