 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
GreatKent
Joined: 05 Oct 2004 Posts: 20
|
Posted: Wed Mar 02, 2005 11:43 pm Post subject: BAT script |
|
|
Hi all,
is it possible to pass arguments into a BAT file? ie:
run.bat myfile.java
-------- run.bat -------------
javac myfile.java
java myfile
--------- end ---------
Thx!!  |
|
| Back to top |
|
 |
Gehn
Joined: 02 Mar 2005 Posts: 13 Location: Terminus of Tears
|
Posted: Thu Mar 03, 2005 12:00 am Post subject: |
|
|
Yes. %1 is the first argument, %2 is the second, and so on. I believe it goes up to %99. However, %0 isn't the number of arguments, like in AutoHotkey, it's the command that invoked the batch file (for instance, if the batch file is called foo.bat, then this would be 'foo' if you just typed foo to invoke it, or it'll be 'foo.bat' if you used its extension when you invoked it.) _________________ The dumber people think you are, the more surprised they're going to be when you kill them. |
|
| Back to top |
|
 |
Dave Campbell
Joined: 09 Jun 2005 Posts: 25 Location: Clearwater, Florida
|
Posted: Mon Jun 13, 2005 9:49 pm Post subject: Batch file setup |
|
|
| Gehn wrote: | | Yes. %1 is the first argument, %2 is the second, and so on. I believe it goes up to %99. However, %0 isn't the number of arguments, like in AutoHotkey, it's the command that invoked the batch file (for instance, if the batch file is called foo.bat, then this would be 'foo' if you just typed foo to invoke it, or it'll be 'foo.bat' if you used its extension when you invoked it.) |
Hi Gehn,
I have a short script:
#X::filesettime 2020,D:\foo.xls,,1,0
That gives the file a modified date of 1-1-2020
I understand batch files and the substitution rule. I substituted the fully qualified file name with %1 and tried putting the ahk into the sendto but it doesn't honor it.
I would like to use this ahk syntax to changed the date on other files without having to type the file name into the ahk file each time.
Any advice on how I can achieve that?
Thanks. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|