Skip to main content

Posts

Showing posts from October, 2008

Changing Eclipse text editor font

Working long hours tinkering with code can greatly strain your eyes. I think this is the reason why most programmers are so picky with the font they are using. I spend quite a lot of time looking for the best font (my personal best). Proggy fonts are quite good, so is Envy Code R. But for quite sometime, I believe more than a year, I developed love and hate relationship with Consolas . This font is optimized for Microsoft ClearType. The problem is not all of the machines I used are upgraded to RDP 6.x clients. Older remote desktop clients does not support ClearType, so I have to use non-cleartype friendly fonts. Courier New is good candidate but most of the time I settle with Proggy fonts. Anyway, to use Consolas in Eclipse 3.4.1 (Ganymede) is easy and oh note that this font is designed for VS2005 and VS2008. Just hit on Windows | Prerences | General | Appearance | Colors and Fonts | Basic | Text Font. See below for screen shot where to access this option. Step 1: Window | Prefer

TestPartner .Net Fusion

Yesterday, I came across a Microsoft website discussing .Net and Visual Basic 6.0 integration, they dubbed this as VB Fusion . Skimming through the documentation, I came to realize that most of these stuff can be used in TestPartner. That is where my journey into the world of .Net with TestPartner, which I dubbed as TestPartner .Net Fusion, comes alive. I am planning on making this as a series of blogs discussing the ins and outs of integrating .Net functionality into TestPartner 6.1.x. For this blog post will try to get our hands wet into the world of .Net integration using System assembly. In fact, what we will do is re-implement what's being dicussed in this site into TestPartner. In a nutshell, we want to display an image downloaded automatically from  Space Science and Engineering Center, University of Wisconsin-Madison . We'll grab the latest photo from the east coast of the United States using the System assembly. So let us create a new form in Common project in T

Controlling Popup menu using Accessibility API

In my previous post I discussed about using Accessibility API to control Windows Start Menu. For this blogpost exercise we will control a popup menu using AA. For those who are familiar with VBA, they would know outright that class modules cannot use AddressOf operator within the class definition. In the spirit of Object Oriented programming, it would have been better to use solely class module for this but due to AddressOf requirements that it should be in a module then we will try to mix and match using both Class module and a module. The code is not a elegant as I hope it would be but this is the way VBA was designed. Now let us get our hands dirty, first we will create a class module named CPopupMenuController. This is a very simple class module, in the initialization section we set a hook to receive focus events coming from the system and remove the hook once the object is destroyed. See below for the code: '--------------------------------------------------------------

Start Menu handler using Accessibility API

The code below demonstrates how to run an application from Start menu using accessibility API in TestPartner making use of VBA. For this exercise, we will use Test Script, Class Module and Module. The original intent was to have the functionality built into class module and instantiate it in Test Script. But AddressOf operator does not work inside a class module in VBA hence using Module. Anyway, first let us define the class module. For this exercise name it CStartMenuController. See below for the code (save this as CStartMenuController): '------------------------------------------------------------------------------ ' Develop by : Techno.Scavenger ' Licensed to : Mankind ' Date : 26Oct2008 @ 1:39 AM + 8 GMT (Sunday @home) ' Warranty ' THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMEN

Change TestPartner script automatically

This is an ugly hack. Please be careful with this code as it is using an undocumented feature. Code below will allow you to modify a test script using VBA. Test script is an asset within TestPartner application, so if you are not using TP this may not apply to you. '------------------------------------------------------------------------------ ' Develop by : Techno.Scavenger ' Licensed to : Mankind ' Date : 11Oct2008 @ 6:55 PM + 8 GMT (Saturday @home) ' Warranty ' THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ' “Techno.Scavenger” OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY CLAIM, ' DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR ' OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ' USE OR OTHER DEALINGS

Minimal Debian Etch install with X on VirtualBox host

This to document minimal installation of Debian 4.0 (Etch) on VirtualBox host. Download latest Debian Etch, I am using debian-40r3-i386-netinst.iso. During the package installation, deselect all. This should give you a minimal Debian installation. During installation, you say "No" during selecting the mirror. We will update /etc/app/sources.list after the installation anyway. Reboot virtual machine after installation. Add the following lines to your /etc/apt/sources.list, I am using nano to edit sources.list file. Since I am near Hongkong, I selected the mirror sites as shown below, change this as you see fit: hostname:/# nano -w /etc/apt/sources.list Additional entries into /etc/apt/sources.list #more entries from here of course from /etc/apt/sources.list deb http://ftp.hk.debian.org/debian etch main contrib non-free deb-src http://ftp.hk.debian.org/debian etch main contrib non-free Then do: hostname:/# aptitude update hostname:/# aptitude upgrade The above command

Install Virtualbox in EeePc 900

Draft - draft - draft - draft /etc/app/sources.list deb http://update.eeepc.asus.com/p900 p900 main deb http://update.eeepc.asus.com/p900/en p900 main deb http://xnv4.xandros.com/xs2.0/pkg/ xs2.0-xn main non-free deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free deb http://download.virtualbox.org/virtualbox/debian etch non-free add public keys wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add - sudo apt-get install xandros-archive-keyring sudo apt-get install build-essential download sources http://support.asus.com/download/download.aspx unrar x Eee_PC_900_source_code_part1.rar dpkg --install linux-source-2.6.21.4-eeepc_17_all.deb cd /usr/src tar xvjf linux-source-2.6.21.4-eeepc.tar.bz2 cd linux-source -2.6 .21 .4 -eeepc ln /usr/src/linux-2.6.21.4 /usr/src/linux -s cd /usr/src/linux make oldconfig make prepare make all apt-get install virtualbox create a file, /bin/vbox/run sudo nano /bin/vboxrun and paste: --