Email This for Internet Explorer

2011-01-04 by Administrator, tagged as microsoft, software

THIS ARTICLE IS WORK IN PROGRESS

The whole bookmarking, sync, interact, knowledge management, social networking thing is kind of tied to third party online services. A user not willing to participate is left out more or less.

I am trying to create my own personal management environment with a private system mainly running an IMAP/SMTP and web server. So far the server side is running fine and the main problems are the user interfaces. For example the IMAP server offers everything for a RSS feeds syncing system but the standard mail readers weren't really ment for this purpose especially not on mobile devices.

Anyyway, this little tool adds the functionality to the Internet Explorer context menu when clicked on a link to mail the destination directly to an email account. It uses the good old Blat to do so.

Email This Picture

In a way it is a little bit like the Send to Kindle or Read It Later service. But if you host your own private SMTP server no third party ever knows the articles you are interested in. Now isn't that something?

  1. Create a registry file adding the context menu entry and execute.
  2. Save the HTML code to a location sosmewhere in your user profile path on disk and edit it to fit your server and email address.
  3. Download Blat and put the files besides the HTML code
  4. Your good to go
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0016)http://localhost -->

<html>
	<head>
		<title>Mail This</title>
	</head>
	<body>
	<p>This is a pure Javascript HTML file. Purpose is to be invoked from an Internet Explorer context menu (right-click) to send the link to a defined email account for later review.</p>
	<pre>
	Windows Registry Editor Version 5.00

	[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Email this]
	@="c:\\\\Temp\\\\MailThis\\\\MailThis.htm"
	"Contexts"=dword:00000020
	</pre>

	<script type="text/javascript">
	
		var strTempDir,
			strPath,
			strFile,
			strBody,
			strSMTPServer,
			strRecipient,
			strFrom;
		
		strSMTPServer = "smtp.google.com";
		strRecipient = "c@google.com";
		strFrom = "\"Email This <Email.This@google.com>\"";
			
		setEnv();
		
		createTempFile(strBody);
		
		strCommand = strPath + "\\blat.exe";

		strArguments = strTempDir + "\\\EmailThisBody.txt -server " + strSMTPServer + " -to " + strRecipient + " -f " + strFrom + " -subject \"" + strSubject + "\"";
		
		//alert( strCommand + " " + strArguments );
		runCmd( strCommand + " " + strArguments );

		function createTempFile(strContent)
		{
			var myObject,
				newfile;
				
			myObject = new ActiveXObject("Scripting.FileSystemObject");
			
			newfile = myObject.CreateTextFile(strTempDir + "\\EmailThisBody.txt", true);
				newfile.WriteLine(strContent);
			newfile.Close();
			
		}
		
		function runCmd(command, option) {

			var wsh = new ActiveXObject('WScript.Shell');
			
			if (wsh) {
				wsh.exec(command);
			}
		}
		
		function setEnv() {

			// Get Meta Info
			// strBody = prompt("Please provide addtional information", "Default");
		
			// Get temp dir
			var myObject
			myObject = new ActiveXObject("Scripting.FileSystemObject");
			strTempDir = myObject.GetSpecialFolder(2);
			
			// Get working dir
			var file = document.location.pathname; 
			strPath = file.substring( 0, file.lastIndexOf("\\") );
			
			// Get content
			var aWindow = window.external.menuArguments;
			var aDocument = aWindow.document;
			var anEvent = aWindow.event;
			var anElement = anEvent.srcElement;
			strBody = strBody + "\n" + anElement.href;
			strSubject = anElement.outerText;
			
		}
		
		</script>
	</body>
</html>

Microsoft ISA 2006 Integrated NLB Mode and VirtualBox

2010-10-08 by Administrator, tagged as microsoft, network, software, virtualization

Please remember if you are setting up an ISA Server 2006 NLB test environment that out of the box ISA server only supports unicast NLB mode. Most virtualization products like VMware (at least the last time I worked with it) and also VirtualBox only support multicast mode.

Main difference between the two modes is that unicast is a sort of hack to enable NLB by giving the same MAC address to different physical adaptors. In mulitcast mode a multicast MAC is added to all adaptors. Main advantage of the later is that mutlicast messages can be used for cluster heartbeat messages while unicast requires broadcasting of this information. So a heavy load might flood your switch infrastructure. On the other hand multicast mode requires switches supporting it and low-end devices usually don't.

Anyway, this is off topic. I just wanted to say that you need to enable multicast mode for ISA server networks if you want to test this in a VirtualBox environment. Otherwise you get unpredictable results. Once I enabled multicast mode everything worked as epxected.

One last thing. In cotrast to the documentation above I had to have NLB already enabled in the ISA MMC and virtual IPs assigned to my networks for the scripts to work.

Duplex Printing With Two Sides Per Page

2010-09-29 by Administrator, tagged as office, programming, software

Save the following code with a .hta extension and run. Yeah, I know, really advanced error handling. But who cares? It works for me ;-)


<html>
<head>
<title>Two Pages/Sheet Duplex Printing</title>

<HTA:APPLICATION 
     ID="DuplexPrinting"
     APPLICATIONNAME="DuplexPrinting"
     SCROLL="no"
     SINGLEINSTANCE="yes"
     WINDOWSTATE="normal"
>
</head>

<SCRIPT Language="VBScript">

' Program Start
Sub Window_onLoad
	window.resizeTo 450,400
End Sub

'Displays formatted information in a new window
Sub RunScript

intPageCount = NumberOfPagesToPrint.Value

If ( intPageCount < 5 ) or ( not IsNumeric( intPageCount ) ) Then WScript.Quit 0 End If

intStart = intPageCount
intEnd = intPageCount



If ( intPageCount Mod 2 = 0 ) Then
REM Page count is even
	
	If ( intPageCount / 2 ) Mod 2 = 0 Then
	REM All pages will be fully printed
	
		intEnd = intPageCount - 3
		intStart = intPageCount - 5
		strLastRun = intPageCount - 1 & "-" & intPageCount
	
	Else
	REM Last Page of first run shoult not be used as first page for last run --> skip it
	
		strIntermediateStep = "Remove last page (top most) from stack"
		intEnd = intPageCount
		intStart = intPageCount - 7
		strLastRun = intPageCount - 3 & "-" & intPageCount - 2
	
	End If
	
Else
REM Page count is odd

	If ( ( intPageCount + 1 ) / 2 ) Mod 2 = 0 Then 
	REM Single page on second side
		
		strLastRun = intPageCount - 4 & "-" & intPageCount - 3
		intStart = intPageCount - 8 
		strPostfix = ""
		REM Add Intermediate Step - otherwise two pages would be printed on first sheet
		strIntermediateStep = intPageCount
		
	Else
	REM Single page on first side
		
		intEnd = intPageCount - 4
		strLastRun = intPageCount - 2 & "-" & intPageCount - 1
		intStart = intPageCount - 6
		strPostfix = ", " & intPageCount
		REM Remove last page - otherwise a blank first second side of first sheet would appear
		strIntermediateStep = "Remove last page from stack"
		
	End If
	
	
End If

REM Create First Run =============
strFirstRun = "1-2"

For i = 5 to intEnd Step 4
	strFirstRun = strFirstRun & ", " & i & "-" & i + 1
Next

strFirstRun = strFirstRun & strPostfix
REM ==============================

REM Create First Run =============

For i = intStart to 3 Step -4
	strLastRun = strLastRun & ", " & i & "-" & i + 1
Next

REM ==============================

BasicTextArea.Value =  strFirstRun & vbCrLf & vbCrLf & strIntermediateStep & vbCrLf & vbCrLf & strLastRun
	
End Sub

</SCRIPT>
<body>
<div align="center">
	<p>Please enter the number of pages you will be printing:

<p> <input type="text" name="NumberOfPagesToPrint" size="10"> <input id=calculatebutton class="button" type="button" value="Calculate" name="calculate_button" onClick="RunScript"> </p><p> <textarea name="BasicTextArea" rows="15" cols="50" style="border:none; " readonly="readonly"> </p> </div> </body> </html>

Cool Jamendo Albums

2010-08-30 by Administrator, tagged as music

There really is a lot of great music to discover on Jamendo. I also like the fact that if you're browsing the albums a nice little flag indicates the country the makers originate from. This way I discovered Rein. This is the proof: there is good music from Italy you only don't hear it on mainstream channels.

Well, here is a list with links to albums I like:

I will update this list whenever I discover sth new.

Microsoft Download Manager

2010-05-22 by Administrator, tagged as microsoft, software

Well, I only have to bring up a painful subject and Microsoft reacts right away...

Grab the Microsoft Download Manager

UPDATE:The download page seems to be missing now but the direct linki to the software still seems to work. MSDownloadManager.msi

Brad Flash Sucks

2010-04-22 by Administrator, tagged as creative commons, music

I just love the Internet. Well, I actually hate it... anyway, just discovered some great music I'd like to have you guys listen to. This dude really sucks... Beck sort of. Read more at source.

UPDATE: Widgets removed due to flash dependency. Browsers w/o support would run into a long timeout.

See new article about Jamendo for the links to the albums

What Internet Explorer is Still Missing, Part #2

2010-04-19 by Administrator, tagged as microsoft, software

Some time ago in the early IE7 days I wrote an article about the definetely required functionality the Microsoft browser was still missing. IE8 then added some of the missing features.

Today, in the pre-IE9 days some things have changed but others have not. After all these years there still is no download manager integrated into Internet Explorer. The feature to resume an interrupted download is so normal these days that this fact could be the big laugh of the day.

Anyway, there is something from MS that uses the BITS feature from Windows. Sadly, it is OEM only but I am sure you will find someone with an account to grab the download. Check this link:

http://bink.nu/news/microsoft-bits-ie-plug-in.aspx

and get the download here:

http://oem.microsoft.com/downloads/bitsfiles.exe

You'll then get a decent context menu entry and a nice little GUI telling you about the download status. OK, I guess I can now omit my Windows wget port. Btw, this has been tested on a 64-bit Windows 7 Enterprise box invoked from the 32- and the 64-bit iexplore.exe. The bits_ie.exe is a 32-bit executable.

BITS Download Manager Context Menu

BITS Download Manager GUI

Microsoft Word and Open Office Envelope Printing

2009-12-14 by Administrator, tagged as mailing, office, software

Again this is ment as a quick reminder.

Printing envelopes is a lot of fun these days since office software does all the required steps automagically. Anway, you should know the envelope size and indentations of sender and recipient adresses. And since I usually cannot find a ruler here is my setup for Microsoft word and Open Office:

Envelope: C6 11,4 x 16,2 cm (A4 folded along and acros)

Change of blogging engine

2009-10-27 by Administrator, tagged as software

After a few years of sporadic blogging I analyzed the way I use a blog. I finally came to the conclusion that a full featured blogging engine like Wordpress is way too much for me.
Especially security concerns made me finally switch to Blazeblogger. It's all made of scripts that generate static content. Hard to find a more secure solution in my opinion. Only drawback is that there are no comments possible. I think I will think of an email solution to handle this.

Speaking of comments: so far I migrated all old posts to Blazeblogger. Still, comments have not been migrated yet and pictures still link to the old URL.
As long as this s current status the old website is still available.

UPDATE (2009-11-09):

Pictures are migrated but no comments so far. Anyway, I will disable the old site now and migrate the comments one day ;-)

Minimize Thunderbird to System Tray on Linux

2009-10-23 by Administrator, tagged as linux, software

I still wonder why such a functionality is not implemented in every mail app (Outlook does it after all). So since I had to search twice and always had a hard time finding this add-on for… well, Firefox I thought I write a short article that may help others looking for the same information.

So you are looking for a solution to minimize Thunderbird to your systray on a Linux box, right? Well, search no further go here:

 

FireTray

 

So forget about AllTray, Traybiff, or other mail notifiers. They all suck.
Btw I tested this on Ubuntu 9.04 and 9.10 where you might want to select the option “Close button minimizes to tray” (thats the way I like it).

Screenshot-1

 

Tags: , , , , , , ,