stevendm Posted April 27, 2007 Posted April 27, 2007 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
james3mg Posted April 27, 2007 Posted April 27, 2007 (edited) 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?ThanksStevenCan 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 April 27, 2007 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
xcal Posted April 27, 2007 Posted April 27, 2007 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?Associate your .au3 files with AutoIt3.exe. How To Ask Questions The Smart Way
herewasplato Posted April 27, 2007 Posted April 27, 2007 ...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]
herewasplato Posted April 27, 2007 Posted April 27, 2007 Associate your .au3 files with AutoIt3.exe.Here is something that I rambled on about a while back:http://www.autoitscript.com/forum/index.ph...st&p=304943 [size="1"][font="Arial"].[u].[/u][/font][/size]
stevendm Posted April 27, 2007 Author Posted April 27, 2007 Thanks to all for the very quick responses. I cheated. I made a batch file that called my au3 script, passing the parameters. Dirty, but it works. I am going to compile it and see if that works.
herewasplato Posted April 27, 2007 Posted April 27, 2007 ...Edit: Note you can't drag files onto an uncompiled script and expect it to run...See this post: http://www.autoitscript.com/forum/index.ph...;showtopic=2025...maybe you can [size="1"][font="Arial"].[u].[/u][/font][/size]
herewasplato Posted April 27, 2007 Posted April 27, 2007 Compiling it worked great. ThanksIf you ever want a pure AutoIt solution:http://www.autoitscript.com/forum/index.ph...st&p=153955...but I mix in batch files all the time - you see, I'm old.-MSP- [size="1"][font="Arial"].[u].[/u][/font][/size]
james3mg Posted April 27, 2007 Posted April 27, 2007 ...maybe you canI stand corrected Compiling it worked great. ThanksGlad to be of service! "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
herewasplato Posted April 27, 2007 Posted April 27, 2007 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]
NELyon Posted April 27, 2007 Posted April 27, 2007 (edited) Heres a script i made that demonstrates how you can drag files onto the compiled executable and it sends it to the "Abyss Web Server" directory. It's how i got used to CmdLine params and file movementhttp://www.autoitscript.com/forum/index.ph...c=43188&hl= Edited April 27, 2007 by Senton-Bomb
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