Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.
Is there a program that could get the name of the process in the foreground? If you tskill a locked up process, it will close immediately. But, if you Ctrl+Alt+Delete it, it sometimes takes a long time before it closes. What I want to do is bind a program to one of the extra keys on my keyboard, where the program tskill's the process in the foreground.

Adbot
ADBOT LOVES YOU

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.

Olzi posted:

Here you go:

http://koti.mbnet.fi/oltzi/foregroundkill.zip

Couple of simple API calls, 9 lines of code in total. :)

Oh, and it really does kill the foreground window, whatever it is. So if you don't have any windows open it will kill explorer.exe which you then have to restart with ctrl-alt-delete.
Yay. Thankees. It works great. The hard part was figuring out how to bind it to a keyboard key. But now I got it. I wonder why Control Alt Delete sucks so much. It takes forever, and you end up pushing "End Now" 100 times. This skips all that.

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.

identikit posted:

Anybody know of a program/easy way to make file extensions show/hide? I normally have them visible but sometimes I want to hide them quickly to make changes to filenames. A right-click menu would be great. Thanks.
For this one, since no one did it, I'll say that I attempted it. Here's what I found out.

The registry branch [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\] has a key called "HideFileExt". When it is true, you don't see extensions. When it is false, you do see extensions. One way, albeit lovely, to write your program is to make two .reg files, and put a shortcut key on each one. When you open a .reg file, it will merge with your registry. So, depending on which one you open, that will change whether your extensions are shown or not.

To write this program does not have complicated logic at all. If "HideFileExt" is false, make it true. If "HideFileExt" is true, make it false. Unfortunately I am dumb and couldn't figure out how to make the check. I did find out that Microsoft provides an API for manipulating the registry. http://msdn2.microsoft.com/en-us/library/ms724871.aspx

If you decide to do it the quick and dirty way, paste this code into Notepad and name it something with a .reg on the end.

Show extensions:
code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\]
"HideFileExt"=dword:00000000
Don't show extensions:
code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\]
"HideFileExt"=dword:00000001

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.
Done. http://tools.wikimedia.de/sixdeg/

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.
Two digits of hex can represent 256 different values. Two digits of hex represents one byte. There are 256 ASCII characters. Each ASCII character is one byte.

If we mapped a unique ASCII char to a unique hex value, then a text file of ASCII characters can contain the information of non-text files, such as images and executables.

Some free webspace services only accept the uploading of certain recognized file types. To circumvent this restriction, could someone code a program that would open a file of any type and convert it to a .txt file of ASCII garble. Then, take in a .txt file of ASCII garble, and convert it back to what it was?

The file extensions are not a concern for a program. After a text file is converted back, I will then change the extension manually.

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.

Sizzlechest posted:

^ Why not use something standard like uuencode?
Alright. In my mind when I think text I think ASCII. I have no prefence for ASCII, just the idea.

Mad Brahmin posted:

Just rename the file, but with a .txt extension. Files are stored the same way regardless of name. The name is just a way to reference the actual data.
I've tried that. It still knows, some how. I think it reads the file header, which I don't know so much about. If this is the case, is there a way to, given any binary, make it look like it's a text file, and then revert it back to what it was originally? If so, this program would be preferable to my original idea.

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.

Neurozys posted:

http://en.wikipedia.org/wiki/Binary_to_text_encoding

Usenet would be so boring without it ;)
Holy poo poo. I love when I independently come up with something that already exists.

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.
Thank you. Why only A-Q, though?

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.
I would like a soundboard generator. Something that will let me specify an audio file, then provide a label. A button for each sound will appear in the window. When I push the button, the sound is made.

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.
I would like an app that allows me to continue playing a Windows minesweeper game even after I lost. This would, among other things, require finding where, in the RAM, the mine locations are shown and changing them to unclicked squares.

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.
Is there any way I can make my desktop background a screensaver? And is there a way I can run a program when my screensaver starts, like utorrent. In XP? If not, could someone make that?

Adbot
ADBOT LOVES YOU

Ramzi
Oct 10, 2004
The inner child of my soul was repeatedly gangbanged by a team of mall Santas.
For my brother:
Can I get a command prompt program for DOS/Windows to basically automate the "image resizing functionality of MS-Paint?" I basically want to have certain flags to be able to resize all images in a directory by specific percentages or actual dimensions, or by filesize and file type. Like, "shrink this image by 5% in pixel dimensions until it is smaller than 1mb," or some sort of way to get the "best" picture for an upload limit.

Ramzi fucked around with this message at 05:13 on Aug 4, 2008

  • Locked thread