Commandline capabilities

New releases and general discussions.

Post » Sun Aug 23, 2009 3:52 pm

I'm currently building an automation application, and for that purpose it is pretty much necessary that I can use the program via command line, basically by doing something like this:
[code:2lb4pubd]application.exe -i input -o output[/code:2lb4pubd]
However, no kind of functionality exists to read commandline switches, which is why I request this could be implemented in some form.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Sun Aug 23, 2009 8:56 pm

Additionally, functionality to run other commandline programs and read their stdout would be very useful. For example, I'd like to use this little utility called dumpsuid.exe that dumps the SegmentUID of a Matroska media file, with the simple usage of dumpsuid file.mkv. Since there's really no way to achieve this functionality within Construct (nor would it be really necessary), having the ability to use cmd utilities / software like this would be great.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Sun Aug 23, 2009 9:46 pm

Construct can't do this right now - you could have a shot at making a plugin to do it, or ask another coder to try. Construct wasn't really designed for this, it's primarily oriented as a game creator.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sun Aug 23, 2009 9:49 pm

[quote="Daiz":2xlzfwyi]I'm currently building an automation application, and for that purpose it is pretty much necessary that I can use the program via command line, basically by doing something like this:
[code:2xlzfwyi]application.exe -i input -o output[/code:2xlzfwyi]
However, no kind of functionality exists to read commandline switches, which is why I request this could be implemented in some form.[/quote:2xlzfwyi]

Maybe, AutoIt can help?
B
2
S
1
G
3
Posts: 102
Reputation: 1,304

Post » Mon Aug 24, 2009 5:55 am

[quote="Ashley":2shzgw55]Construct wasn't really designed for this, it's primarily oriented as a game creator.[/quote:2shzgw55]
I know, but it's a shame if Construct will continue to be a lackluster choice for application development. I would say commandline switches are quite vital for this side of development.

[quote="Yaraslau":2shzgw55]Maybe, AutoIt can help?[/quote:2shzgw55]
Might be, but it'd add one more software required for using the thing via commandline, which is quite inconvenient in terms of distributing the software - there are many people that would benefit a lot about this software if it were easily usable via commandline.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Mon Aug 24, 2009 11:52 am

Daiz, you can join several .exe's into one .exe. Then you can distribute a single file. The main problem - you must write the tasks (=code) for doing something that you want (and be familiar with some kind of scripting). Try AutoIt (free), vTask (shareware, but really powerfull) or xStarter (shareware for all, but for Russian speaking people - free :D).

By the way, tasks can be very complicated (it depends ONLY on your skill). In case you familiar with Russian - I can post one more nice prog for automation, which has some underground features (written by real cracker from my country).

P.S. maybe I misunderstand, but do you want to use Construct as automation script? Or as automation shell for end-user? What exactly you would like to automate (file operations, scores, inputs, patching...)?
B
2
S
1
G
3
Posts: 102
Reputation: 1,304

Post » Mon Aug 24, 2009 7:28 pm

I would like to use the program completely via commandline, so that I can use it in a batch file that has some time-consuming operations that do not need to be monitored when they're running, which is why it would be ideal that no input is needed from the user when the program actually runs, as everything is defined already in the batch file.

Basically I want to use my program like this:
[code:hh7yzyxg]app.exe -t template -i input -o output[/code:hh7yzyxg]

What it would do is to open the program, load the input, do things to the input based on the template, save the output to the specified file and terminate the program.
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Tue Aug 25, 2009 11:07 am

It could be done quite easily via a plugin, there's numerous command line parsing classes which could be implemented fairly simply.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Fri Aug 28, 2009 10:10 pm

not to derail but I'm really curious:

Why not do it with a traditional language instead? is this program something that would be easily done with Construct?

Now, on topic: write a proxy program that creates a text file with the options, and read them within your construct app.
As Yaraslau said, you can then merge the .exe files, but I have no idea how.

Yaraslau if you can explain or point to a resource that does, that'd be great.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Sat Aug 29, 2009 9:47 am

[quote="Madster":2fz3z80w]Why not do it with a traditional language instead?[/quote:2fz3z80w]

Because I don't have basically any C/C++ coding capabilities :?
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 6 guests