February 10, 2015

[Linux] Create a Hotkey to Switch to / Run an Application with AutoKey

Posted in Intermediate at 6:07 pm by gloriouscomputing

I’ve been using hotkeys to make applications appear, weather running or not, for a long time in Windows. AutoHotKey makes that easy. It’s also built into Windows 7+, as long as you like the default Win+number hotkeys.

Recently, my OS of choice has been the excellent Arch-based Netrunner (Rolling) flavor of Linux, and I wanted to accomplish the same thing there. Thankfully, there is AutoKey.

HowToGeek has an article to get you half way there. If you follow along, you will end up with a hotkey to switch to an Application, as long as it’s already running. But if it’s not running, your hotkey does nothing.

Here’s the script to have your hotkey switch to your Application of choice if it’s running, and launch it otherwise:

import subprocess

title = “KeePass”
location = “/usr/bin/keepass”

window.activate(title)
exists = window.wait_for_exist(“.*”+title+”.*”, 0)
if not exists:
subprocess.Popen([location])

Warning: As usual, WordPress has replaced all quotes. You will have to replace all those if you wish to copy-paste this script. Instead, just download it:

Download Source

September 8, 2011

Hassle-free ISO Mounting with WinCDEmu

Posted in Beginner, Games, Intermediate at 8:31 pm by gloriouscomputing

Want to mount an ISO on Windows? The conventional wisdom is to use Daemon Tools, but if you don’t need DT’s video game copy protection emulation, you can save yourself a lot of bloat and get a better user experience using the open-source WinCDEmu.

Once installed, just click .iso files to mount them as a drive. To unmount them, just right click on the corresponding drive in Windows Explorer, and click “Eject”.

Even if PC game backup is your thing, you generally use cracked executables that remove the CD check anyway, so there is no need for your ISO Mounting tool to emulate that protection in most cases.

WinCDEmu Homepage

February 11, 2010

Disable Microsoft Security Essential’s SpyNet with AutoIt

Posted in Intermediate at 4:47 pm by gloriouscomputing

My previous AntiVirus was Avira. I really didn’t like the ad it poped-up, so I showed you how to disable it with AutoIt. Well, not disable, but automatically close virtually instantly.

When I switched to Security Essentials, the promise was that this was an AntiVirus that would just work behind the scenes and not get in your way. Well, after getting my full screen game minimized the 3rd time, I decided the SpyNet pop-up’s time was up.

Here’s the Auto-It script to instantly close the PopUp (by hitting Cancel):

Do
WinWait(“Microsoft Security Essentials Sample Submission”)
ControlClick(“Microsoft Security Essentials Sample Submission”, “”, “Button3”)
Until 1=2

WATCH OUT: Do not copy/paste this code. WordPress has replaced the normal quotes with special quotes that AutoIt does not understand. I have linked to the source code (AU3) below.

To automatically say yes to uploading whatever file it wants instead, change the code to say Button2 rather than Button3.

Download: EXE or AU3 (Source Code)

Remember, this program needs to be running in the background for it to disable SpyNet. This program just works. It has no GUI. Set it to run at start up if you want it to keep working after you reboot your PC.

October 16, 2009

Sudo for Windows 7/Vista

Posted in For Developers, Intermediate at 6:20 pm by gloriouscomputing

It’s no secret that I like using my keyboard to get things done. It’s also no secret that Windows 7/Vista’s UAC comes up when a program asks for Admin rights. But what about if you want to run a program as Admin that doesn’t always need to be run as Admin? By default it’s just run as user, and you won’t be able to do what you need to.

For example, if I just run Notepad, I can’t save files in C:\

So what you have to do is Right-Click Notepad, and click “Run as Admin”… but what if I don’t want to? What if I want to script the same action? No luck. Windows 7 has a tool called “RunAs.exe”, but it only lets you switch to users with their Username+Password. I just want to run as myself with admin rights!

Linux people have sudo, so I just coded up a sudo.exe (in NSIS). It works just like you’d hope: “sudo.exe Notepad.exe”… or “sudo Notepad”. Of course, you’ll have to set it up so you can use it from anywhere yourself. The code for this tool is super-easy:

Name “sudo”
OutFile “sudo.exe”
SilentInstall silent
RequestExecutionLevel admin

Section
Call GetParameters
pop $0
exec $0
SectionEnd

My only problem with it is that my sudo.exe is 33kb. That’s huge for such a simple tool. If someone could code the same functionality into a smaller exe (C++ maybe?), I’d appreciate it. (I’ve tried writing it in AutoHotKey/AutoIt too, but both were even bigger!) Please let me know if you can help in the comments. Thanks!

Download Sudo

Update: Thanks everyone for the provided solutions below in the comments! Smallest solution thus far is Elevate.exe by Christof Germishuizen.

September 12, 2009

HashCheck – Finally a great Checksum Verifier

Posted in Beginner, Intermediate at 5:45 pm by gloriouscomputing

I’ve been looking for a quick way to get checksums of files for a while, and this is my favorite solution so far: Just right click the file in Explorer and go to properties, and then click the Checksum tab. Easy!

Download HashCheck

August 3, 2009

GUI Usability: The most important monologue of the year

Posted in For Developers, Intermediate at 5:31 pm by gloriouscomputing

I’ve never made an entry into this blog for the sole purpose of linking to another, but this is very important for anyone with an interest in GUIs (User Interfaces):

The original article is well written, and captured my attention for a few hours (I made the mistake of stumbling upon it from my iPhone), and the first part of the following video series is also excellect so far.

Android GUI designers (including phone manufacturers HTC, Sony), for the love of God, please take note!

Part 1
Part 2

June 14, 2009

Find any file on your hard drive instantly – Everything

Posted in Beginner, Intermediate at 10:19 am by gloriouscomputing

There are a variety of solutions for searching your hard drive. If you are running Windows XP, you will definitely want to install one of these right now.

However, the same goes for Windows Vista and Windows 7. Even though their “Windows Key + Just Type to Search” and “Windows Key + F” are pretty good, they are not as good as a little program called “Everything”.

It runs at start-up (if you wish), and goes to your tray. When it starts, it indexes every file on your local hard drives (NTFS only) extremely quickly. I have over 1 TB in space, and it takes maybe 1 minute.

Now here’s the cool part. When you invoke Everything (click tray, press Hotkey) and start typing, it will find file names matching what you type virtually instantly. I don’t think it takes more than 1 second.

Purely theoretical example: “Hm, I’ve been downloading a lot of Daily Show episodes, and I’ve moved them between different hard drives…”
Invoke Everything, type “Daily Show”, bam, list of all Daily Show episodes.

“Everything” also has the ability to host a web server interface, which lets you remotely search your PC in the same way, and then download the files you find. For quickly getting a file from my PC to my Laptop, this has replaced my need for hosting a separate FTP server (although the latter still gets used for heavy duty folder moving).

I would recommend this only for your LAN, as there is no encryption.

Enjoy! Everything

PS: I’ve also tried Locate32, which has the major difference of storing the content of your hard drives in a database (on your hard drive, vs just in memory) and supporting non-NTFS partitions, but if I can choose, I prefer Everything.

Encrypt your Gmail with Firefox extension using PGP (GPG)

Posted in Intermediate at 10:00 am by gloriouscomputing

In this age of digital surveillance, simple steps to protect your privacy should not be ignored.

If you are using Firefox and Gmail (OS-Independent, I believe), you have no excuse not to use PGP encryption when emailing with friends.

With the help of the FirePGP Firefox extension, encrypting your email in a way that only your intended recipient can read is just another button in Gmail.

Ideally, PGP should be a standard that everyone uses by default, but with internet innovation spreading to the masses coming mostly from those who profit from data collection (Google), I don’t see that becoming a reality in the foreseeable future. So, unfortunately, you won’t be able to encrypt all your email; Only those that are going to people who also use PGP.

Well, it’s time we increase the number of PGP users then! Step-by-step tutorial here: http://www.instructables.com/id/Encrypt-your-Gmail-Email/

Update: On Windows, for Step 2 of this guide, just download GPG from http://gpg4win.org

December 8, 2008

Hostsman – Best thing that happened to your Hosts file since Vista

Posted in Intermediate at 12:26 am by gloriouscomputing

The program Hostsman is a nice front-end GUI for changing your hosts file.

If you are like me, you only have to do this about once a months. However, if you are like me, you also spend about 5 minutes finding the file deep down in the Windows folder, then another 10 minutes holding down various combinations of Shift and Ctrl to get Notepad to open the file with Admin rights so that you can actually save your changes. This has been an annoyance since Windows Vista.

I can vouch that the learning curve for this program is none. It took me less time to download, install, and learn how to do the basic Add/Edit/Delete operations (which is all I need) than it takes to do the same thing in Vista with Notepad.

I tested Hostsman 3.1 Beta and found it working on Windows XP and Windows Vista.

September 16, 2008

Turn Redirect Links into Direct Links – GreaseMonkey

Posted in Beginner, For Developers, Intermediate at 4:39 am by gloriouscomputing

The GreaseMonkey extension allows you to alter any website on the internet locally and automatically before Firefox shows it to you.

What I wanted was a script that would turn any link that looked like this:

http://dataminingrus.com/redir.php?bla=http://site-that-you-want.com/awesome.htm&pukeUpAdID=9343

into just the link:

http://site-that-you-want.com/awesome.htm

While I suppose http://dataminingrus.com would be unhappy about us going to our destination without reporting in (and possibly being forced to watch an ad before getting there), we’d be quite happy to bypass this step.

I couldn’t find a script that did this for any website, but I did find a script that did this for AltaVista.com only: AltaLink

Looking at the code, I kept the part about replacing links, and just changed the regular expression to one that I came up with myself. I’m no expert at regular expressions, but it looks like it works just fine.

Note that before you just blindly install this and run around with it on all the time: There are websites which use redirect links to avoid getting attention via link targets receiving “referring” urls. So if you are hanging out on some websites that wish to avoid publicity, you probably want to turn this script off for the admin’s sake. Personally, I only turn this script on while surfing sites which use redirect links to annoy users.

More importantly, this will rewrite all links that pass URLs as a parameter into a direct link to the parameter. Some sites choose to pass a link as a parameter that has nothing to do with where you will eventually end up. For sites like these, having this script on will break your browsing experience. So only turn this on for special occasions. 🙂

Download Global Direct-Linkifyer

Next page