I made a little text file in notepad that just showed a 4*4 * 4*4 matrix multiplication. Bored and rather curious, I resaved the file as an .EXE . So I ran it (yes, it did run), though it did nothing.
My question is can I make the new executable do anything (besides blink a cursor) just by using notepad? I guess other files can be saved as .exes (Visual Paint# : The Paint program that makes executables! Get your copy today!). Is there some kind of hidden language that resides within?
Making something: Saving a text file as an .exe?
Making something: Saving a text file as an .exe?
For any grievances posted above, I blame whoever is in charge . . .
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Renaming a file does not make it that type of file. Many files require information headers that are not in a text file. You could make the text file into a BAS file and run it. Later you could compile it.
Ted
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Well, something happens. I opened an executable in notepad, saved it as .txt, then resaved it as an .exe . Then it did the same thing as the unaltered version. Which was to print "Hello world", though I forgot to add "sleep".
And I guess these headers aren't the same as MS Word headers?
And I guess these headers aren't the same as MS Word headers?
For any grievances posted above, I blame whoever is in charge . . .
- Codemss
- Veteran
- Posts: 124
- Joined: Sun Jun 24, 2007 6:49 am
- Location: Utrecht, The Netherlands
- Contact:
Have you read burger's post: Renaming a file as a .EXE is not right: you need to compile it. Basically you can give any file any extension: it is just to let windows know what program to open it with. A .EXE and a .TXT file can both hold the same data.
Check out my site: <a href="http://members.lycos.nl/rubynl">Click here</a>
Hope you like it. Send some feedback if you want: <a href="mailto:basicallybest@live.nl">Mail me</a>
Codemss, before known as RubyNL
Hope you like it. Send some feedback if you want: <a href="mailto:basicallybest@live.nl">Mail me</a>
Codemss, before known as RubyNL
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
LOL
Well, all you really did was save an EXE as TXT and convert it back. No wonder it worked!
If it was that easy to do why would you even need a compiler in QB? Try making a BAS file into a TXT file and renaming it EXE. The compiler changes your code to machine language. Notepad does not!
You may have noticed that the stuff in the text file was mostly unreadable. Notepad also usually converts to ANSI characters.
Ted
If it was that easy to do why would you even need a compiler in QB? Try making a BAS file into a TXT file and renaming it EXE. The compiler changes your code to machine language. Notepad does not!
You may have noticed that the stuff in the text file was mostly unreadable. Notepad also usually converts to ANSI characters.
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0