 |
|
|
 |
|
 |
I Love it, too !
|
|
|
|
 |
|
 |
Hello,
I was wondering if I could add stuff to this program, like as you type in the compiler it gives you suggestions, varible names, system names, options/commands; if you mis-spell or type in something that does not exist it gives you are warning or an error; error/warning/information message box center, like in Microsoft Visual Basic 2010 Express Edition.
Like all I'm asking is, if I could add some major features to the compiler, remaster it and make it a whole lot easier and better to .BAT programmers out there. If you agree/or like to help it would be appreciated...
Regards,
Brandon T. H.
Codeproject.com Member
|
|
|
|
 |
|
 |
i dont' want that dos window show when exe run ? is it possible
|
|
|
|
 |
|
 |
Freiend if we make exe then open it edit command whole batch file are seen and find logic we want fully encripted exe in our requiremnet
thaks
|
|
|
|
 |
|
 |
This is real a unusefull piece,
the naming is not correct, no dynamic bat creation,
and for what reason will i add a simple batch file, which can work
without any executable in a .Net Program, which has additional dependicies ,
such as .Net Framework etc.
Simply i would prefer todo the same stuff with VB 6.0 as a unmanaged program,
or just use the batch file simply.
|
|
|
|
 |
|
 |
Read my suggestion above your comment at the very top of these comments...maybe you agree with me and could help make this better, cause there is not too many features on here.
|
|
|
|
 |
|
 |
Thanks
|
|
|
|
 |
|
 |
Great idea!
But ... to be nitpicking..
info.FileName = Environment.GetEnvironmentVariable("TEMP") + "\\it.bat";
should be replaced by Path.GetTempFileName(), methinks?
|
|
|
|
 |
|
 |
The file created by Path.GetTempFileName() has .tmp extension but the program needs .bat extension
|
|
|
|
 |
|
 |
But, the problem is that if you hard-code the temp filename, you can't run more than one batch file application at a time.
Maybe you could use Path.GetTempFileName() + ".bat" or +".cmd" to get a temporary filename and then allow people to run more than one batch file at the same time.
|
|
|
|
 |
|
 |
WPF - Imagineers Wanted
Follow your nose using DoubleAnimationUsingPath
|
|
|
|
 |
|
 |
Thanks
|
|
|
|
 |
|
 |
Well, I was hoping it really did compile the BAT file. Then I saw it doesn't, so I thought the thing rather silly. But then, of course, much of what I do may be thought silly.
If it solves a problem you and others experience, then that's great, I probably never would have thought of it, I'd likely put them in a database.
It looks like decent code too, but I'll nitpick a little:
if (res.Errors.Count > 0)
{
result = false;
}
else
result = true;
might be better as
result = ( res.Errors.Count == 0 ) ;
(The parentheses aren't required; I use them for clarity.)
And
option += " " + "/win32icon:" + "\"" + Properties.Settings.Default.iconpath + "\"";
can be simplified to
option += " /win32icon:\"" + Properties.Settings.Default.iconpath + "\"";
or
option += string.Format ( " /win32icon:\"{0}\"" , Properties.Settings.Default.iconpath ) ;
|
|
|
|
 |
|
 |
Thanks for the reply, I will take your points into consideration
|
|
|
|
 |
|
 |
hey,
why on earth compress multi line logic down to a single and in my opinion more confusing line of code.
will it run faster?? (dont think so)
I much prefer the idea of expanding to "pascalese" rather than compressing to C like.
do you get a prize for the most comlplex single line of code ??
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
 |
|
 |
MartyK2007 wrote: do you get a prize for the most comlplex single line of code ??
I dont think it has anything to do with that. Its the redundancy of saying:
if boolean check set boolean true else set boolean false
which is much easier to read as
set boolean value equal to boolean check
|
|
|
|
 |
|
 |
I disagree I guess,
I find the if else easier to read
it just reminds me of the "bad ol days " of c coding where we crammed as much logic into one line to show how "brilliant" we were with no thought for the poor maintenance guy who followed along
- happy dayz
Martin
life is a bowl of cherries
go on take a byte
|
|
|
|
 |
|
 |
What you consider to be "bad old days" other remember as "good old days" Apart from that, the "theory" says that the same amount of information is easier to understand if delivered in less data. In plain English, "use fewer, shorter words". I would guess that you find the more verbose option easier simply because you didn't get to use the other version too often. A bit of exposure to it and you would most probably change your mind. Anyway, even if you don't like something like "return <boolean expression>", I hate (my personal opinion, I know many disagree to it) to see: if (<boolean expression>) { <do work for true> return <something>; } else { <do work for false> return <something else>; } and always write: if (<boolean expression>) { <do work for true> return <something>; } <do work for false> return <something else>;
OGR
|
|
|
|
 |
|
 |
ogrig wrote: Apart from that, the "theory" says that the same amount of information is easier to understand if delivered in less data. In plain English, "use fewer, shorter words".
good job we're not programming english !!
I prefer "verbose enough" to be clear!!
ogrig wrote: I would guess that you find the more verbose option easier simply because you didn't get to use the other version too often. A bit of exposure to it and you would most probably change your mind.
No not at all - I was twenty once!! Young lions roaring across the savanah of the C landscape - well you know what I mean
A couple of times I was winner of the monthly "Lord is that line of code a program!" award.
But as you get older sigh!........
yeah I am a
set return to false
if (boolean == true)
{
do true stuff
set return to true
}
kind of person unless if the boolean is false and I need to do stuff for a false value
then as you say
if ()
{
return ;
}
else
{
return ;
}
I just think its easier for the maintenance people further down the line.
cheers Martin (not twenty anymore!)
life is a bowl of cherries
go on take a byte
|
|
|
|
 |
|
 |
i agree.
it is easy to cross the line and go from consise to cryptic.
that is where the artistic element of coding comes into play.
|
|
|
|
 |
|
 |
It's pefect if encryption function added, e.g. encrypt the bat file when compile it and decrypt it when running...
FrX
|
|
|
|
 |
|
|
 |
|
 |
why not ?
btw, if you don't encrypt the bat file embedded, anybody can use a resource editor and modify it as he likes... so, the .exe file looses all its "encapsulation" purpose
|
|
|
|
 |
|
 |
If I encrypt the bat file and the program is open source then anyone can replace encrypted bat file with another encrypted bat file.
|
|
|
|
 |