rory 0 Posted January 12, 2007 got this idea from someone on another forum who was tired of switching back and forth between Notepad and another program where he was copying and pasting from .. tedious work. I used mostly existing code from a desktop application i wrote a couple months ago, yet to be released. This exe uses a command switch to tell it what to open, and how. Basically it sets the program on top always while it is open, by getting the programs Unique handle and setting it On top with that handle. To keep it highlighted in the foreground however, would require a constant timer, this program doesn't use that and ends right away once it gets the Programs unique handle. It tries to get the programs handle for approx 5-10 secs, then exits. It works with the example programs below, and others I did not list, even programs in the system tray such as MSN Messenger and Skype. Basically you put the file somewhere, then create a shortcut. In the shortcut properties you enter the Command Switch at the end of the Target line. If you have questions or comments .. let me know. Note if there is no Command switch added, it will just exit (do nothing). Eg. 'TITLE | CLASS | FILE | MIN/MAX | WILDCARD OFF Title = Window Title of Program. If using wildcard, leave last part empty or make 0 Class = Class of Program. You can use both Title & Class, but Wildcard is disabled File = Full Path of Program File Min/Max = 1-Normal, 2-Minimized, 3-Maximized. If left empty it will be Normal. Wildcard Off = 8 will make it use fixed Title. Anything else will make it a wildcard if only Title is used. Wildcard means it is not exact, it is LIKE // NOTEPAD - WildCard, Normal "C:\OTE.exe" Notepad||C:\Windows\System32\notepad.exe // WORD - WildCard, Max "C:\OTE.exe" Microsoft Word||C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE|3 // FireFox - WildCard, Max "C:\OTE.exe" Mozilla Firefox||C:\Program Files\Mozilla Firefox\firefox.exe|3 // MS PAINT - Fixed Class and Title, Max "C:\OTE.exe" Paint|MSPaintApp|C:\Windows\System32\mspaint.exe|3|3 //Calc - WildCard, Normal "C:\OTE.exe" Calculator||C:\Windows\System32\calc.exe|1 //Outlook Express - Fixed Class, Normal "C:\OTE.exe" |Outlook Express Browser Class|C:\Program Files\Outlook Express\msimn.exe|1 //Skype - WildCard, Normal "C:\OTE.exe" Skype||C:\Program Files\Skype\Phone\Skype.exe|1 You can use Spy+ or some other program to get the class of the program's main window, but if you get stuck let me know the program and ill give you the command for it. They will generally all vary as to which method you can use to open them Download: (24KB) No Installation Required. http://www.bahamassecurity.com/dl/?q=OTE.exe Share this post Link to post Share on other sites