Here's my Tech blog. I try to put down my adventures with Technology and other DIY stuff here.
Monday, May 09, 2011
Microsoft PowerToys equivalent
I have been using Microsoft PowerToys since Windows 95. Was really surprised to know that Windows 7 doesn't support the old Powertoys. I was missing SendToX - the most coolest among them. Also the 'Command Prompt Here...' menu. After a few mins of search on the web found a compatible/equivalent software: http://www.gabrieleponti.com/software/#sendtotoys
Labels:
powertoys,
sendtox,
Tech Stuff,
windows 7
Wednesday, May 04, 2011
My new laptop
Trying out Windows 7 on my new Dell Latitude 6410. A few crashes in the beginning, things are stable now. Trying to find what's in for the developers.
Monday, March 07, 2011
PostScript file for cross platform printing?
I had a tough time printing the PCB layout correctly that I designed using EAGLE software. I designed the PCB on my home PC running Ubuntu 10.4 and printed to a PS file. The plan was to print the board to a magazine paper for toner transfer, on my office printer. So I emailed the PS file to my work address and printed from Adobe Acrobat Professional 7.1. Got my first surprise, the print is actually a slightly scaled down replica, may be 90% of the original. I realized this late after going home and verifying with the actual component that I had. But isn't the postscript (or pdf) file supposed to be hardware independent and vendor neutral? That was my assumption.
I tried various experiments - at my home PC, viewed the PS file at 100% scale and it matched the SMD component pads on screen (I placed the SMD IC on the screen to compare). I repeated the same with my office PC and it also matched. So, while printing something is going wrong. Again at office PC, I used PDF Writer software to print to a PDF file and then print to the Xerox printer, but it also was 90% size. Over the weekend I searched some information online and somewhere I read that PDF prints are not reliable across PCs. Suggestion was to install Eagle in Host PC for printing. Not very convincing.
Came to office on Monday and tried to scale up the print to 110% to get a match. To my surprise the image was way too big - may be 125% of the original. Now I am really stumped. Got the feeling that it was the ADOBE that was screwing up. Just to confirm, I sent the ps file directly to the printer job queue, and it came fine - at actual size! So the PS file was fine, so was the printer. But I doubt Adobe being professional cannot commit such error.
More thoughts and I wanted to try out once more. I have a dual monitor setup at office - both screens having different resolutions. I know that many software have difficulty in working with dual mon setup. Maybe Adobe is one. So I disconnected my external monitor and printed from the PC using Adobe. There you go. The print looks fine! So not a good idea to have dual monitor setup while printing from Adobe.
Lastly, it could be the printer driver also. Since the PS file is handled by the printer driver before sending to the printer, may be its trying to fix the resolution.
Now let me get back to etching!
So, back to the point - postscript file is indeed hardware independent and vendor neutral, just that some software in the chain can cause problems.
I tried various experiments - at my home PC, viewed the PS file at 100% scale and it matched the SMD component pads on screen (I placed the SMD IC on the screen to compare). I repeated the same with my office PC and it also matched. So, while printing something is going wrong. Again at office PC, I used PDF Writer software to print to a PDF file and then print to the Xerox printer, but it also was 90% size. Over the weekend I searched some information online and somewhere I read that PDF prints are not reliable across PCs. Suggestion was to install Eagle in Host PC for printing. Not very convincing.
Came to office on Monday and tried to scale up the print to 110% to get a match. To my surprise the image was way too big - may be 125% of the original. Now I am really stumped. Got the feeling that it was the ADOBE that was screwing up. Just to confirm, I sent the ps file directly to the printer job queue, and it came fine - at actual size! So the PS file was fine, so was the printer. But I doubt Adobe being professional cannot commit such error.
More thoughts and I wanted to try out once more. I have a dual monitor setup at office - both screens having different resolutions. I know that many software have difficulty in working with dual mon setup. Maybe Adobe is one. So I disconnected my external monitor and printed from the PC using Adobe. There you go. The print looks fine! So not a good idea to have dual monitor setup while printing from Adobe.
Lastly, it could be the printer driver also. Since the PS file is handled by the printer driver before sending to the printer, may be its trying to fix the resolution.
Now let me get back to etching!
So, back to the point - postscript file is indeed hardware independent and vendor neutral, just that some software in the chain can cause problems.
Labels:
adobe,
pcb,
pdf,
postscript,
printer,
Tech Stuff,
toner transfer,
xerox
Friday, December 31, 2010
Cleaning the Creative SBS15 volume control
I had these cute little speakers for my Desktop for years, exactly for the last ten years. These sounds pretty good for its size and is pretty clear over the volume range. Off late, the volume control started behaving odd due to the carbon build up on the potentiometer. I wanted to open the speaker and clean the pot, but could not find any screws at the back. I even thought that the front and back speaker faces are glued together and tried to break it with a screwdriver from the bottom. Suddenly it struck me that there could be some screws on the front, and it was true. Opened the front grill and found four screws. Opened it and voila, cleaned the pot in 5 mins with Iso propyl alchohol and a syringe. The speakers are back to its sweet sound!
Remove all the four screws
Thursday, July 03, 2008
Regex power
I've been hooked to regex for a couple of days now and getting to know the real power of it. I wish that I had tried this years ago.
And the coolest one is this one which I just figured out. Change the date format from DD/MM/YYYY to MM/DD/YYYY and vice versa (assuming date is the first field in the line).
Search: ^{[0-9]*}/{[0-9]*}
Replace: \2/\1
I did this in MS VC.Net 2003 editor, and as far, its supports regex well.
And the coolest one is this one which I just figured out. Change the date format from DD/MM/YYYY to MM/DD/YYYY and vice versa (assuming date is the first field in the line).
Search: ^{[0-9]*}/{[0-9]*}
Replace: \2/\1
I did this in MS VC.Net 2003 editor, and as far, its supports regex well.
Saturday, December 08, 2007
PDFCreator
I have been using the PDFCreator for long time. It helps converting any documents to a PDF file with ease. But this creates just plain PDF with no links or bookmarks (document map as in Microsoft Word). I disparately needed to include the bookmarks in one of the huge document ( >1000 pages) and I came across Word to PDF pluggin for Word, called as PDF-T-Maker
It converts the word document into an intermediate format, containing the bookmarks, comments, links and routes to the PS converter.
It converts the word document into an intermediate format, containing the bookmarks, comments, links and routes to the PS converter.
Thursday, June 21, 2007
Disabling zip folder integration in Windows XP
After I got my new laptop which had new XP installation , I found that the Windows Explorer being slow to update at times, especially expanding the folder in the tree view. Figured it out that the built in zip support was slowing things up, I decided to disable the feature. To disable, simply unregister the component:
regsvr32 /u %windir%\system32\zipfldr.dll
regsvr32 /u %windir%\system32\zipfldr.dll
Wednesday, March 21, 2007
Widescreen hassles
The new format of the computer monitors and laptops are definitely good for watching movies, but not at all for regular web browsing. The increase in real estate can be better utilized by having two documents opened side by side and could improve some productivity. But the web pages in wide screen mode is annoying. I was searching for a tool which limits the browser window to be maximized only to 1024 pixels wide. Fooled around with msdn and thought that SetWindowPlacement would do the trick, but I was mistaken. Apparently it doesn't work with the explorer shell and the documentation doesn't say so. i found that there is another way that is handled by the individual applications. Each application can specify its maximized size. The message to handle is WM_GETMINMAXINFO. I would need to install a message hook to get into the application and handle for each of them. Still not clear whether its worth the try.
Wednesday, January 03, 2007
My Shares

It was not very hard, but finding the right API's was a bit challenging. And then I was stuck at some conversion functions.
Here's are the main functions that I chose:
NetShareEnum - Gives the list of shared resources on a given machine
wcstombs - To convert wide str to mcbs (NetShareEnum returns wide str)
OpenClipboard, EmptyClipboard, SetClipboardData, CloseClipboard- For clipboard operations
GetAsyncKeyState - Status of shift key
Monday, January 01, 2007
Removing labels from VSS
If you had accidentally created a label for any items (file of directory), you can remove it by viewing the label from the item history, and deleting the label text. Close the dialog after confirmation and the label is removed. The changes would be affected globally irrespective of the item for which the label was modified.
Friday, April 21, 2006
Share data among processes through DLLs
I ran across this problem wherein I had to notify a process of an event which is triggered by another process through a DLL. Well, more precicely, the first process would invoke (this is an event) an exported function of the DLL and this function has to notify another process about this event. Now, this function could simply post a message to the main window of the second process, if it has a handle to it. Storing this handle is the problem. One obvious solution is to declare a static data in the dll and let the second process 'register' for notification by passing its window handle. Once it is stored, subsequent notifications are easy - just call PostMessage with this hwnd parameter. But there is a caveat. Eventhough DLL's map their code into the memory of each processes, it has separate instance for globals and static variables. Now these static members will be initialised separately for each processes when the DLL is loaded, which defeates the above method of sharing the window handle. There is a solution, atleast in MSVC environment. Create a named data-section in the dll code and place the data to be shared in it.
#pragma data_seg (".sharedseg")
HWND hNotifyWnd;
#pragma data_seg()
And give the linker option: /SECTION:.sharedseg,RWS
#pragma data_seg (".sharedseg")
HWND hNotifyWnd;
#pragma data_seg()
And give the linker option: /SECTION:.sharedseg,RWS
Tuesday, April 18, 2006
Logon Notification events under Windows


While working on the PSP program, I wanted to have a mechanism where to get notifications when the computer is locked and unlocked. Initially I thought that there would be some windows notification messages sent to every windows, but it was not the case. There is something called Windows Notification Package, which fecilitates the logon events for an application. All you need is to create a dll with required export functions (each function for Lock, Unlock, Logon,...) and create some registry entries. Now, this is a service of the Winlogon process, which is the main process started after the boot sequence. It is the Winlogon process that displays the SAS dialog. The registry key need to be created under:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify
Once the registry entries and dll are in place, the Windows need to be restarted. Apparently the Winlogon creates a list of notification functions at startup and debugging becomes a pain since the dll is locked by the process.
Subscribe to:
Posts (Atom)