This program allows you to start command prompt when needed. It allows you to either start cmd, or if you are in a situation where you cannot use cmd, it will emulate one for you.
Please note:
I did not make this the credit goes to Tristiano77,
Ok with all that said here it the final version
NinjaCommandPortable
new to 1.5.0.0
added language support
TODO
setting up tab completion(may or may not happen)
Hey all we need the language support for the program, it is really easy, please post what a notepad file says when you open it
For Ex.
Language: English Title of notepad: Untitled - Notepad Name: powerjuce
thanks
-
Any chance you could fix the Resources so it shows the same sort of Version | File | Description information that other PA apps do?
MC
is that what you were looking for?
~thanks
Please search before posting. ~Thanks
Excellent.
Now all it needs is a PAF installer.
MC
i actually dont know how to do that
well more like how to compile it so sorry:-(
any help would be great
i am starting to research it now
btw
i used 7zip and changed
icons and the dialog
is that ok or should i stop?
Please search before posting. ~Thanks
I made you an installer. I had to change some names and redo the appicon.ico (just resolutions) so that it would work with the installer. Take it if you like it! Installer Download
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
when i run it it freezes at
"checking for Portableapps Platform"
also could you store the ini file it creates into the "Other" dir
please also remove this download because it has the copyrighted icon
thanks
Please search before posting. ~Thanks
What copyrighted icon? If you are talking about John's icon, then it is okay. You can use his banner in installers as long as the installer mentions the copyright as "PortableApps.com and contributors." If you are talking about your icon, then you are violating the GNU GPL, as part of the icon comes from Command Prompt Portable, which uses a GPLed icon. I'll take a look into the freezing, as I've never even seen that page before. I will leave the download up until the copyright violation is verified.
EDIT:
I looked and saw that it did freeze, and will hopefully update the installer today.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
http://www.iconbuffet.com/tags/ninja
well the actual ninja icon is the from that site
the terms state that we cannot "change, modify or redistribute" this icon
we have done all three by using it,
i found another icon which is open source, so i guess i will have to say that the icons are form command prompt portable and this other site.
Please search before posting. ~Thanks
Thank you for the clarification. I'll bring the download down. Please let me know when you can get me the new icon, and I'll update the installer with the new icon and the freezing problem fixed.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
i changed it and the updated download is up
thanks by the way for making the NSIS script
once again could you change
to
also how do you set the NSIS up so it will create the installer
i tried it and it did not work, any help would be great
figured it out
used your code for the installer
read the help files (who knew they would help )
once again
thanks
Please search before posting. ~Thanks
-
Just make sure you don't use someone's copyrighted icon. We might want to distribute this program without getting someone into trouble.
Besides, you can probably come up with a better icon than the one in notepad.exe
MC
i don't even make icons, i don't have any icon software. how bout the one of notepad.exe with one pixel changed?
.. And how it is seen when this app is in Ninja mode. If it is trying to look like a notepad app, shouldn't it have something that actually looks like a notepad icon? (Like the one Microsoft Notepad has, not Portable Notepad.)
well....
about that
i sorta spent finished a new version a couple of hours ago which includes the notepad icon
i am changing the link now
Please search before posting. ~Thanks
Is tab filename completion a possibility in Notepad mode? Or maybe I'm just not trying it right.
How about closing on the exit command?
(Just dreaming, not demanding.)
Thanks again.
MC
i dont know what tab filename completion is so i cant help you there
exit when typing exit is next on the list.
Please search before posting. ~Thanks
i know what it is
http://en.wikipedia.org/wiki/Command_line_completion
it just doesnt work in ninja mode.
i think that it is unavoidable because the code first takes what you input as a string then puts it launches the command prompt and inputs the command into it
unless someone knows a different way i think it unavoidable.
Please search before posting. ~Thanks
Ok, in Ninja mode how about changing drive, like when you type
k:
to go to the K: drive? It responds like it is working, but doesn't appear to be. Or maybe it is the
cd
by itself that is showing me the wrong thing?
Could it be that the system call you are using is able to do executables, but not the built in commands? Or maybe it is doing those things in a shell that exits and loses the change?
MC
it does them in a shell so it will lost the change
try using setx to store variables globally
~regards
Please search before posting. ~Thanks
if you want that to work in ninja mode you must make a batch file with the commands then execute it from ninja mode
because it still will look in the same directory
i guess i could ask it to look in a file first to check if a command exists then execute it, however nothing is going to happen until the icon prob is solved
i dont want you or myself to get into trouble
Please search before posting. ~Thanks
I read the User Agreement for the site I got that icon from (I need to learn to read them more often). The icon that I gave you is not supposed to be redistributed. I am sorry I didn't read the agreement before I sent it to you, Powerjuce.
ok can you tell me where you got the icon from
and its not that bad
we are just in the market for a new icon i guess now
~regards
Please search before posting. ~Thanks
http://www.iconbuffet.com/tags/ninja
a simple modification to the code makes it wait for the next key press after panic mode and then clear the screen. here ya go!
i would have never gotten that
Please search before posting. ~Thanks
well cin.get() is the equivelent of pause only no text, it just came to me
ok final code edit i gotta sleep. snow day tomarow tho
anyway i made exit work. it was a simple trick.
i got it to work but you way is better
just changed the icon will upload now
Please search before posting. ~Thanks
You can use system("pause > nul");
cowsay Moo
cowthink 'Dude, why are you staring at me.'
found a bug. in ninja mode you check to see if the first charicter is a p, thats bad practice you should use strcmp. im fixin it. the problem is when you type anything beginning with a p it goes into panic mode. eg path or prompt $p$g.
I know that this is really insignificant, but I was thinking that in a future release, you might want to delete the Thumbs.db file located at: NinjaCommandPromptPortable\App\AppInfo
Just to make it more sleek and ninja-like.
Please Make TiLP Portable
thanks
Please search before posting. ~Thanks
oh yeah! tab completion is done! it like all other things required nothing more than a little thinking outside teh bockses! the drawback is that the panic batch file must now be in the same directory. its no big deal it wont show up in pam.
i will put this in as a test, however i am not sure that it will work on a limited account, I have submited a request to sourceforge.net so we can start a beta version.
I will compile and get back to you tommorow
Please search before posting. ~Thanks
mkay, good good.
i just tested it and it was blocked
using
cmd /k
is the same thing as
cmd.exe
Please search before posting. ~Thanks
hmmmmmmmmmmmmmmmmmm. what if the required command was put in a batch file then executed from ninja mode?
that is what i was planning on creating
creating another function allowing them to store a command into a batch file
then allowing them to execute it using a special key
the script is still in progress A.K.A. stilling in the planning phase
if you want to try go ahead
Please search before posting. ~Thanks
the thing is while under regular mode the only functions we can give the user must be external :S... its fine if there are multiple bats in the folder but may be confusing.
well i just tried to create a seperate function that would let them pick a letter (not p or P or course),
here i will post my attempt
Please search before posting. ~Thanks
good. i got an idea here. since external files is imperative, we do what is always done in that situation with a portable app, store the real app in the data folder and only have a launcher in the main folder! then external files will be used but not seen
kinda like a ninja... or santa! or me
i can make the nsis
but that will be against the PA formatting
if that is ok with u
~regards
Please search before posting. ~Thanks
Could you not use the launcher to make NCP "Start in" ..\..\Data , while the .exe itself is in the App folder? That would conform to the PAP right?
NSIS is not my strong point
how would that be done?
Please search before posting. ~Thanks
No idea, I don't know any NSIS, you could ask Patrick or Ryan though.
.
Hmm. Maybe just get rid of all the prompts and labels. It's a command prompt, after all.
Seriously, it might be good to try to localize it.
What name does Notepad.exe put in the Title bar in France?
MC
.
however i am not sure how to make this happen
also, what prompts and labels are you talking about?
Please search before posting. ~Thanks
.
like i said i would love to but i do now know how
is there a way in C++ to directly do this?
ill start searching or if Tristiano77 could try that and i could start on the wrapper for it.
how does tat sound?
Please search before posting. ~Thanks
The things that need changing are the title bar, the little menu when it first starts ("1 or 2", plus the description) and any help files.
A quick and easy way to do it would be to tell the user to change the .bat files to comply with their own language. Then all you'd have to do is figure out what to put on the title bar for the Ninja mode. That could be read from a file too, e.g. an .ini file.
I'd expect that one would prefer to have the choice of language belong to the portable app, rather than the host computer; that is, if you're from Quebec and running the program in an Internet Cafe in Mexico, you'd want the French/Quebec prompts on the screen rather than the Spanish/Mexican, but if you are in a school classroom in Mexico you would want to be able to choose the Spanish/Mexican appearance of Notepad in spite of running OOo in French. So reading the language from the machine's registry doesn't sound like a good option.
Is there a place in the Portable Apps setup where a language preference can be made that can be passed along as a default to the apps PAM runs?
Otherwise, just collect sample bat files for each language, in a "sample/[lang]" directory, and let people do what they want. It is a command prompt, after all. Or set up the different language versions of the batch files in standard directories and have the preference directory specified in the ini file.
MC
so if anyone can send me the new batches that would be cool
i or Tristiano77 will be starting the wrapper
the language you want will be chosen by the language in the installer
or depending on how many different languages i get can be manually selected at the beginning of the program.
this version will be a beta and when it is up it will be in the sourceforge site.
so please send the text for the batch files!!!
Please search before posting. ~Thanks
hey this comment is for John or really anyone who can deal with the copyright stuff
Part of the ninjacommand icon is the cmdPortable, is that ok there is a file that says that the icon is copyrighted to PA.
thanks
Please search before posting. ~Thanks
My understanding is that you should use generic or your own custom icons for testing and beta versions until it is clear whether it is going to be accepted under the PA umbrella. That goes for the splash screen in the installer too. If John says it's ok, then it should be just a few keystrokes to put in the "official" icons and splash screen. Otherwise just say "compatible with PortableApps.com format" and use your own graphics.
I'm not sure which icon you're talking about. Copyright aside, I'd prefer to have my icons unique for each application. If an icon is associated with CommandPromptPortable, it would probably be a good idea to associate a different icon with NinjaCommandPortable.
It does look like the 16x16 icon is radically different from the 32x32 icon, but I don't see that either looks much like the CommandPromptPortable icons. Maybe I have a different version?
MC
i drew out a small cmd window of so i could put it into the .ico file (so it could be NinjaCommandPromptPortable )
however when i looked at the commandprompt portable it looked a lot like it
so i still gave John the credit
Also the 16x16 is meant to look different because it is supposed to look like a notepad icon so that the notepad mode looks like notepad mode
Please search before posting. ~Thanks
.
Most of the stuff is in the two .bat files that exist currently.
But I think you'll have to wait until the developers decide how they are going to handle getting the different language titles into the Ninja (Notepad) title bar.
The bat files are pretty simple:
the p.bat file is a quote from an essay on Shakespeare. The task there would be to find an appropriate brief essay or paragraph in the target language and put it into the p.bat file, copying the format.
MC
here you go
i guess only the stuff in bold needs to be translated since that is all that displays
also
this right here
really it does not matter what it is as long as it is not computer related
also i am going under the assumption that the actual commands do not need to be changed is that correct?
thanks for all your help
Please search before posting. ~Thanks
I can't recall -- did someone check the copyright on that little Shakespeare essay? I wouldn't want the author or copyright holder coming after the distributor of NinjaCommandPortable.
MC
i just googled it and so im probably breaking like 15434523515800000000000000^2-pi*(sqrt(7))+92 laws.
At some point you might want to spell the abbreviation for "you are" properly: "you're" rather than "your".
MC
never! that just adds to the magic! i wrote that XD
.
wow... lots of replies... ok i kind of did make the program in the first place so i should be workin on this... what do you guys want again?
ok i can make a function called lang which will change the language but i need translations for the text. anybody can help here but im lingually challenged (obviously)
They want the title bar in the Ninja (Notepad) view to be localized to their language version of Windows -- that is, Notepad.exe shows something different on the title bar depending on the language. It would look bogus if everything else on the screen is in French but the title bar in the Ninja/notepad window.
They can edit the batch file themselves, which controls the title bar in regular CMD mode; but I don't see a way to customize the title bar for Ninja mode.
You could have it set in an INI file, or ... whatever is convenient.
There's a picture up there.
MC
i am not sure about the
title
partbut everything after that
thanks
Please search before posting. ~Thanks
It's not just a translation, but the actual words used on their version of Notepad. You want it to be authentic, right?
Gee, I hope the M$ folks don't get miffed if the program mimicks Notepad briefly ... Maybe we can say it's a parody, those are legal...
MC
hey Tristiano77
due to the fact that there is a lot of work
i think we should split up
is there a way i can contact you
here is my email
powerjuce(at)gmail(dot)com
Please search before posting. ~Thanks
e-mailed u.
so basically all we need is the translations of untitled - notepad? wow easy. ill have em in a few minutes, ill just change my computers language XD
edit: crap u need to restart to apply changes. ill just look em up on the google machine.
and the whole language of the actual command prompt
the language cannot be registry dependent so it will not work like that
we have to make sure the whole program can be used with a different language
Please search before posting. ~Thanks
The only thing you have to worry a lot about is stuff that the user can't change via the batch file; they can change almost everything (including prompts) from the batch file. Right?
MC
yea they can change everything except the name of the "notepad"
so we need the exact name that pops up for an untitled file, right
also if the title is one language say french and they use a computer witha an english language wouldn't that look weird?
don't we need to control the actual language of the NinjaCommand?
Please search before posting. ~Thanks
im almost done programming the engine but i need your "untitled - notepad" translations
if the title is one language say french and they use a computer with an english language wouldn't that look weird?
Yeah, but that's why you need to set it up so they can choose. I could see them using the bat file in French while leaving the Ninja title in Spanish in certain circumstances. It would depend on the context.
MC
the actuals inputs for the emulator will be the default language
so if the title is French
then would that be weird
Please search before posting. ~Thanks
if the title is one language say french and they use a computer with an english language wouldn't that look weird?
Yeah, but that's why you need to set it up so they can choose. I could see them using the autorun.bat file in French while leaving the Ninja title bar and p.bat in, say, Spanish in certain circumstances. It would depend on the context.
MC
please post the string for what the title for an untitled notepad is post like this
thanks
no other posts execept for translations
make the title of the post be the language you are translating to
Please search before posting. ~Thanks
good idea. now i need help with the language engine.
heres the code. i get errors and i cant figure out why. its probably just a dum mistake but i cant figure it out.
this is my java experience
but i think you will need to overload the method so it can be
command(int cmdlang)
and it can becommand()
Please search before posting. ~Thanks
nevermind i fixed it... but i suddenly cant edit my posts
it may think you are spam
Please search before posting. ~Thanks
well that only forces me to post more... anyway i fixed everything the language engine is done i just need the translations heres the code
<>
right now aint great
how about tommorow?
Please search before posting. ~Thanks
well that only forces me to post more... anyway i fixed everything the language engine is done i just need the translations heres the code
.
just what appears on a notepad file when it is untitled
Please search before posting. ~Thanks
Pages