topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 10:49 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Toggle2 v. 1.9  (Read 8138 times)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Toggle2 v. 1.9
« on: February 23, 2010, 07:35 PM »
I released Toggle2 v. 1.0.  You may download from this page:

http://www.favessoft.com/hotkeys.html

It is a simplified version of Toggle dedicated to toggling the active window only.

The position and size information is not persistent.  As soon as Toggle2 exits or the particular window is closed, the information is discarded.  For permanent desktop window setups there are plenty of window sizer utilities already.

Toggle just allows you to set 2 non-maximized positions and sizes for the active window, for that session.

Usage is extremely simple.  Let it sit in the tray.  Hit the hotkey with an ordinary explorer or application window active. If no position info has been stored yet, you'll be prompted to move and size the window.

The default hotkey is Alt-F10.  You can change it using the Tray Icon Menu.  The About Dialog shows the current hotkey.  Also if Glass is enabled you can customize the About Dialog background color and it will use Glass.

Position info is just stored in an array indexed by window handle.
There's a "Clear Position Settings" command in the Tray Icon Menu.
It has a confirmation dialog to give you a chance to back out.

The program creates an .ini file in the same folder as the .exe.  There's no install or uninstall.
The only info stored in the .ini is the Hotkey and background color(called Vista Color.)

The program saves the .ini file on exit so there's no point editing the .ini while the thing is running. It will be overwritten.

Toggle2 is free for you to use at your own risk.

(I guess I must hate the Maximize Button)

edit: Added short delay after double-clicking Tray Icon to show About Dialog.  This avoids accidentally clicking another icon while the Tray Icon is temporarily hidden during About Dialog display.



« Last Edit: June 02, 2011, 12:55 AM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.1
« Reply #1 on: February 24, 2010, 09:25 PM »
Toggle v. 1.1

Added option in Tray Icon Menu to use Alt Left Mouse Click to toggle.

I hate letting go of the mouse just to hit the hotkey.  I bet a lot of
you do too. :)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.2.0.5
« Reply #2 on: February 25, 2010, 03:26 PM »
Updated Toggle2 to v. 1.2.0.5

If you have a previous version I recommend deleting Toggle2.ini
if it exists, before running this version. No big deal but the mouse
option is renamed.  This version may not pick up your setting for the
mouse option unless you delete the .ini file. Or just toggling the option
on and off in the Tray Icon Menu should overwrite it for you.

Changed Tray Icon Menu so it only opens with Right Mouse Click.
That eliminates the menu pop-up flash when double-clicking the icon
to get the About Dialog.

Changed Mouse option to Shift Middle Mouse Click.
I also included an AHK subprogram to handle the mouse
action.  This makes it much smoother since AHK will
"eat" the mouse click. The subprogram is launched and
killed as you toggle the option or launch/exit Toggle2.
Also if you use the menu command to change the hotkey
a new instance replaces the old updating the hotkey to
use.  You don't need to pay any attention to this
Toggle2MouseHandler.exe.  It uses no Tray Icon.
But if you see it in Task Manager, that's what it's
for.

Just unzip all into a folder and the files should know how to find
each other. :)

« Last Edit: February 25, 2010, 03:32 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.3
« Reply #3 on: March 01, 2010, 01:21 AM »
Toggle 1.3  Now Toggled application windows will have positions saved to Toggle2.ini file.  Programs such as Firefox, Notepad, EditPadLite will automatically have their positions saved to Toggle2.ini if you toggle them.

The .ini file capacity is only about 32KB but this should be large enough to hold a reasonable list of applications.  When you Toggle the active window, if it's not explorer, and has no position info stored, a dialog will pop up and wait for you to move/size the window.  The path of the program is pruned down to the basename as key to store the info.  For example if the program window you are toggling is Firefox and the path is c:\program files\Mozilla Firefox\firefox.exe it is truncated to just "firefox" and used as the index in a dictionary.  The culprit is MS Scripting.Dictionary.  It comes in handy.  The contents of the dictionary are saved to the .ini file in the [AppList] section.

If you look you will see entries like:
[AppList]
firefox=285#366#992#536#285#167#992#735#0

The hash marks make it easy to split the string out into an array of numbers, which is the window position info.  I advise not editing by hand unless you delete whole lines as it's easy to break the ini file reading scheme.  But if it's hosed just delete the .ini while Toggle2 is not running.  It will recreate it.

You can still toggle Explorer windows, but the info is discarded at the end of the session.
Because the Explorer window is not stored to file, it doesn't make you wait until the
window is positioned.

This is just a convenience toy.  If you want full desktop layout control where every window is opened to a given position every run then I suggest using auto-positioning control utilities instead.
« Last Edit: March 01, 2010, 01:26 AM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.4
« Reply #4 on: March 02, 2010, 03:32 PM »
Toggle2 updated to v. 1.4.

Minor code changes.  Updated icons.  Functionality and usage is the same.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.5
« Reply #5 on: March 03, 2010, 12:36 PM »
Toggle2 v. 1.5

For application windows, position info is checked and if the 2 positions are the same, the dialog will prompt to move/size the window when toggled.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.6
« Reply #6 on: March 12, 2010, 02:54 PM »
Toggle2 v. 1.61

Added hash to AppList settings to differentiate between programs launched from different drives or folders.

Say you have Firefox portable in one folder and normal Firefox in another. By hashing the entire path of the exe file it allows maintaining separate positions settings in the .ini file without storing the entire path as the key. (Thanks to trancexx on AutoIt3 forum for posting the hash function.)

Toggle2 v. 1.6

Added command Save Position Settings to Tray Menu.  Writes settings to .ini file immediately.
« Last Edit: March 12, 2010, 04:09 PM by MilesAhead »

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.62
« Reply #7 on: March 22, 2010, 03:23 PM »
Toggle2 v. 1.62.

Now filters out any negative position values when reading the .ini file.
(Typically if it picks up a minimized window it will show x,y positions
less than 0.)


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.7
« Reply #8 on: May 03, 2010, 04:25 PM »
Toggle2 v. 1.7

Fixed a few Tray Menu and "single instance" control glitches.
Recompiled without compression to avoid av false positives.

No new features.  Just doesn't put check marks on menu items
that aren't supposed to have them. Tray Menu only opens on
Right Click so that double-clicking the icon doesn't give off
"tray menu flash" from the menu popping up for a fraction
of a second.

Latest version is now on the Hotkeys page.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.7
« Reply #9 on: May 03, 2010, 10:52 PM »
is Toggle2 an update from plain Toggle or is it a separate program?

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.7
« Reply #10 on: May 04, 2010, 01:05 AM »
is Toggle2 an update from plain Toggle or is it a separate program?

They're 2 different programs.
Toggle is still available for download but I've focused on Toggle2 since it's more versatile.

You can download both here:
http://www.favessoft.com/hotkeys.html


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.8
« Reply #11 on: May 08, 2010, 06:22 PM »
Toggle2 1.8

Added TreePad format Help to Tray Menu.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Toggle2 v. 1.9
« Reply #12 on: June 02, 2011, 12:55 AM »
Toggle2 v. 1.9 Fixed bug in Set Hotkey command.