ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Post New Requests Here

Command-Line Shooter

(1/2) > >>

I have a list of 'things' I want to execute.  Let's say, 300+.

One 'order' per line.

Presently all 300+ are in one long text file.

Imagine, as metaphor, all 300+ are like bullets on a belt.

Command-Line Shooter

I need the 'gun'.

In other words, I'd like to rip off the top, say, 10.  Put them in the gun.  Pull the trigger.

Boom, boom, boom.....

All ten lines get executed, one after another.

Okay, I could make up separate batch files for each group.  But it would be faster to do it some other way.

Enter:  Command-Line Shooter

Thoughts appreciated.

Nicholas Kormanik

Good day nkormanik,

I do not fully understand your slang text.
Could you be nice and re-write it in a more technical specific way?

What I understood is, you like to execute something.
What I understood is, you have alot of commands.

What is missing:
What should your request do? Technical informations are required.
(Load a text file "file.txt" and parse each line to interpreter?)

Best would be, upload an example file with content that you like to execute/shoot/bang boom zang

Should your request become a GUI or would a command line version fit?
How should program work?
Commandline version example:
"shooter.exe /file=input.txt /begin=10 /end=100"
stand for "use input.txt" "from line 10" up to "line 100" execute.
Is such what you need?

Then you must hope that everything you wish to execute this way is correctly formatted. If not, it messes up the ability of shooter.exe to finish completing the set of (single line) command.

If there are 300+ single line batch commands to execute...there has to be some logic behind them. Because if not, it will become a mess. Maybe not today, but in the near future it will.

If there are 300+ single line batch commands to execute...when is the optimum time to execute these? If based on certain conditions, it won't be easy. In fact, you'll need a separate interpreter for the conditions as well. Not only shooter.exe, but also ammobox.exe. And by that time you are creating software akin to AHK or AutoIt. While KodeZwerg might like to create AHKodeZwerg or something similar, nkormanik is too hung up on using batch scripts for anything.

If there are 300+ single line batch commands to execute...nkormanik should store these as snippets instead and create simple batch scripts that CALL the appropriate snippet at the optimum time. Or start to learn about PowerShell, which is much better equipped to handle his request than the interpreter.

If it's as simple as you're saying, you don't even need a program to do it for you.  It's already built into windows.

--- Code: PowerShell ---Get-Content -Path "path-to-text-file.txt" | ForEach-Object {    $args = $_.Split(' ', 2)    Start-Process -FilePath $args[0] -ArgumentList $args[1]    }
Open a text editor, put that code snippet in, name it something.ps1, create a text file with your commands in it, and it will run them in order, spawning them in different processes.  If you want them to be dependent on each other, that's a different problem.  But each bullet in a bandolier isn't dependent on the others, so this fits the analogy.  ;) :Thmbsup:

i was just thinking about this last week.
What I ended up going with is mouser's launchbar commander...
I create a button for the commands or group of commands i'd want to launch.  Works great!
It will take some time setting up, but then you can a menu and buttons to do whatever you want.

I think AHK is also good for this sort of thing, but I'm a gui guy.


[0] Message Index

[#] Next page

Go to full version