Welcome Guest.   Make a donation to an author on the site October 24, 2014, 06:13:24 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: Prev 1 [2] 3 4 5 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Shape Shift 1.0.9.0 and MoveIt 1.2.5.5  (Read 17773 times)
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #25 on: May 26, 2012, 12:22:18 PM »

Although not as good as user defined grids, I'm looking into .ini file settings for percentage of largest window(where to draw the line) and perhaps another setting for the split point between the windows that share the other screen portion, in the case of a 3 grid.

I think it will be more useful if I can set a grid so that, as example, chrome can have the bottom or top of the screen will all the width and .xx of the screen height.  Maybe have a percentage range from 33 to 75 percent.  Some programs like EditPadLite7 won't allow the height below a certain size.  Typically you'll see the bottom of the window sticking down below where it should be. In that case it's probably going to be up to the user to adjust the percentages.

I'll experiment with it and see how it goes.  But a set fraction of .4 as I'm using now is too short or narrow for some apps.  Seems like a modification that shouldn't be too difficult.

Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #26 on: May 26, 2012, 03:53:14 PM »

SectionAte 1.0.15.0 Added Tray Menu commands to set BigDiv and SmallDiv percentages. These determine the percentage of work area where the dividing line is placed.  BigDiv is for the section that's not subdivided. SmallDiv is for the subdivided section.  SmallDiv is not used in the 2 section grids for obvious reasons. smiley

There is only one BigDiv and SmallDiv setting for all the grids, but if you change it, it is updated immediately (meaning future moves use the new setting and the .ini file is written with the new settings.) Most likely you will settle on a grid you use for most things. Something more dynamic probably needs paid software or a utility that's been under development a lot longer.

I increased the vertical gap between windows from 3 pixels to 4. This should reduce the pinch on the drop shadow that can make it look like the windows overlap when they don't.

Also updated the About Box with cleaner descriptions.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
tomos
Charter Member
***
Posts: 8,612



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #27 on: May 26, 2012, 04:00:45 PM »

Hey Miles, any chance you could add your website to your signature, or, you could add it to the website info (underneath signature on the "Forum Profile Information" page) and it will show in an icon under your avatar. I'm a lazy beggar and it would save me going back to the first post every time for the link. Of course I should bookmark it embarassed

Bookmarked. I'll sort of pretend I didnt post this tongue cheesy
Logged

Tom
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #28 on: May 26, 2012, 04:37:02 PM »

Hey Miles, any chance you could add your website to your signature, or, you could add it to the website info (underneath signature on the "Forum Profile Information" page) and it will show in an icon under your avatar. I'm a lazy beggar and it would save me going back to the first post every time for the link. Of course I should bookmark it embarassed

Bookmarked. I'll sort of pretend I didnt post this tongue cheesy

That's ok. It's a good idea. I didn't think of it because so many sites don't allow you to put url in sig.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #29 on: May 26, 2012, 05:10:45 PM »

SectionAte 1.0.17.0 Widened the range for Div settings to 15 - 85 percent.  Made window gap 5 pixels both vertically and horizontally. Just looks cleaner on my monitor. Fixed calculation error in one of the grids.

Here's one "trick" I got onto. I'm using B Grid. I want chromium to have a big section at right bottom of the desktop. But I don't want it to go across the entire width.  So I set BigDiv small, 32, and SmallDiv large, 85.  This leaves a gap on the left of the browser. I'll just stick Notepad in the other 2 sections to show what I mean.  Here's a screen shot.

Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
tomos
Charter Member
***
Posts: 8,612



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #30 on: May 26, 2012, 06:27:03 PM »

I finally got to test it again Miles - well, version "15" - you keep overtaking my last download :-)

It'll take me a while to get to the Divs - it's a bit late here, I'll need to be fresher I think ;-)
Alt+Arrow is absolutely super (I didnt realise all arows work thumbs up)

  • (1) Is there a reason you dont have "L" (for left) listed as a shortcut (after pressing the hotkey) ?
  • (2) I'm not quite sure where the "g" comes into use - it doesnt seem to be necessary at all (?)
  • (3) in the tray menu, it would be great if I could see what grid is selected (currently I just see a tick/check-mark)

Liking it a lot so far Thmbsup

EDIT/
Miles Davis Ahead 3+3+3+3:
 (see attachment in previous post)
« Last Edit: May 26, 2012, 06:35:38 PM by tomos; Reason: added link to \"100th\" post » Logged

Tom
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #31 on: May 26, 2012, 07:46:37 PM »

g selects the position in the grid by the top left point(origin) of the window. Drag window roughly where you want it and hit 'g'.

Click on another grid, then you can see the one that had the check. Otherwise then I have to make some Gui where the tray icon is good enough. If you look at the grids all the 3 section grids are the same as the first only rotated.  So if 'B" is selected and you can't see it, look at 'A' and rotate it clockwise 90 degrees mentally.  Likewise if you have 'F' selected, it's the same as 'E' only rotated clockwise 90 degrees.

The question about 'l' I don't understand. If you have an editor and you type 'l' the letter is going to go into the editor. That's why the hotkeys.

If you mean why do I have it so you hit a hotkey, then it waits for a letter, then it's to reduce the number of hotkeys. The more you have the greater the chance it's already in use.

Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #32 on: May 26, 2012, 08:24:47 PM »

Perhaps the reason for the confusion is, g 1 2 3 are grid related. All the other placement keys, t b r s c are independent of any grid. They are just convenient sizes and placements.

Maybe if I had a flat screen I'd be more into grid. But for CRT there really aren't all that many configurations where I'd say it's just so super to have stuff in a grid. I'm trying it out as much as anything. smiley

Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #33 on: May 26, 2012, 08:28:04 PM »

On the check mark thing, I find it bothers me a bit too. I tried disabling the current one but the image, although still visible, is too dim. So what I think I'll do is make a bunch of red icons and the active one will have a red background.  These icons are only about 14 KB each anyway. If they are all embedded in the exe it won't be any big ram buster. smiley
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #34 on: May 26, 2012, 10:32:28 PM »

SectionAte 1.0.18.0 By request, removed check mark from Tray Menu. Now the active grid is denoted by reverse colored icon.

All the tray menu icons are embedded in the .exe. I just included them in the zip in case anyone wishes to compile their own mod. When the program is run they are extracted from the exe into the folder that contains SectionAte.exe.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #35 on: May 27, 2012, 02:37:25 AM »

SectionAte 1.0.19.0 Now displays current grid in Tray Icon Tooltip.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
Attronarch
Supporting Member
**
Posts: 58


View Profile Give some DonationCredits to this forum member
« Reply #36 on: May 27, 2012, 03:49:24 AM »

Would you be interested in adding the possibility to change the grid layout (from A to F) with hot-keys? For example Ctrl+Shift+L A = layout A, etc.

Yeah, I know. That's the reason the programs that provide it charge like $29.95. It takes way too much work to accommodate a variable number of sections each with a variable percentage of screen space. To be honest I don't use grid myself much. I thought I'd take a shot at doing an easy version of it since I saw some mentioned on some forums.

I did not want to sound rude or demanding, I was merely stating my observations. What you did here is great.

But I can add the side by side grid. That's pretty easy. It's just every one added I have to modify the other 5 or 6 or 7 that come before it. But I can see side by side is useful. I should post it before the weekend is out. Thanks for the interest. smiley

Thank you for adding it, works like a charm.
Logged
tomos
Charter Member
***
Posts: 8,612



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #37 on: May 27, 2012, 09:35:32 AM »

The question about 'l' I don't understand.
All the other placement keys, t b r s c are independent of any grid. They are just convenient sizes and placements.

the query about "L" (I use caps to show it's not an "i") is in the context of what you call the placement keys - it seems a logical one to include there, a key for Left side/full height

Is there a reason you dont have "L" (for left) listed as a shortcut (after pressing the hotkey) ?


[looking forward to trying new updates...]
Logged

Tom
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #38 on: May 27, 2012, 01:18:59 PM »

At the start there was only one grid. The left section of the screen was section 1. So things evolved. I don't want to stick in too many keys. Then it becomes impossible to remember.

Also if you use TicClick, once you have the desired size, you can position it without dragging.  Just use '7' position or if it's full height, positions '4' or '1' will put it flush to the left edge.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #39 on: May 27, 2012, 01:36:12 PM »

@tomos, as usual, you make good suggestions.  I'll work on adding the 'L'. It is Logical after all. smiley

edit: It's not so much adding an item as then I have to go back and mess with About Box. Not easy to give directions in a few words and avoid it looking like a mess. smiley

I'm doing x20 changes. I'll try to add the 'L' on this upload. I'll post when ready.

edit: turns out 'r' was broken. Search and replaced it into something else. smiley I have 'l' and 'r' working now as vertical half of screen.  The next upload will have the 'l' key. I just have to redo the About Box. smiley
« Last Edit: May 27, 2012, 02:09:18 PM by MilesAhead » Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #40 on: May 27, 2012, 01:43:05 PM »

I think, for me, I'm starting to see this grid as a good way to size 2 apps and use the "unused" section as a spacer.

For instance with Grid A  

I have the left section empty. But it keeps the programs on the right from consuming the entire width. Leaves a bit of space to click the desktop if I didn't have the gap for RocketDock. In this screen shot I changed the range for Div from 5 to 95 percent. When used as spacer I'm not going to try to jam something into the vertical gap on the left edge. smiley


Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #41 on: May 27, 2012, 02:27:09 PM »

SectionAte 1.0.20.0 By request, added 'l' key to move window to left side and size it 1/2 screen work area. Fixed 'r' key to do the same thing on the right side.  Expanded Div ranges to 5 - 95 percent. This is handy for using the "empty" section as a spacer to help size the other 2 apps as desired.

Now the Tray Icon changes to reflect the active grid. Updated About Box.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #42 on: May 27, 2012, 03:20:26 PM »

@tomos do you think it would be useful to change 't' and 'b' so that they work like 'l' and 'r' and cover 1/2 the work area? Or is it better as is?
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
tomos
Charter Member
***
Posts: 8,612



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #43 on: May 27, 2012, 04:53:01 PM »

I'm on version 19 now - the icons are great thumbs up

@tomos do you think it would be useful to change 't' and 'b' so that they work like 'l' and 'r' and cover 1/2 the work area? Or is it better as is?

There's so much choice now cheesy I think it's hard to say what's best, I mean it's going to be down to individual preferences/monitor-size/workflow. I havent even gotten a workflow with it yet, but I'm happy the way it is.
Logged

Tom
tomos
Charter Member
***
Posts: 8,612



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #44 on: May 27, 2012, 05:03:51 PM »

Would you be interested in adding the possibility to change the grid layout (from A to F) with hot-keys? For example Ctrl+Shift+L A = layout A, etc.

This would be a logical extension of things. I'm not a big user of the grid (yet). I used to use JGPaiva's Gridmove - when I last changed machine I kind of got out of the habit of using it. Anyways, GridMove has that capability, and from what Miles said about this one, it's much easier to add grids to gridmove.
So, I'd say if it's easy to add, I'd love that capability [+1] - otherwise (just tested) I can run gridmove concurrently.
Logged

Tom
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #45 on: May 27, 2012, 05:07:50 PM »

I noticed I left a thing for 's' square when I moved it from the other app.. holding down Shift made the window a bit bigger. I like top and bottom size as is. But maybe I'll add the shift so if someone wants 1/2 screen without using the up/down grid they can just hold down shift. It will be like an Easter Egg or something. smiley

I'll play around with stuff and see what the next rev. should be. Thanks for your thoughts. smiley
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #46 on: May 27, 2012, 05:17:33 PM »

I did not want to sound rude or demanding, I was merely stating my observations. What you did here is great.


Not at all. I didn't mean to seem peeved. I just meant doing it this hotkey way is kind of a kludge. But you can get maybe 90% of what the sophisticated apps do with a few days of work. It's trying to monitor stuff and have everything automated that turns it from 6 days work to 6 months. smiley

On the grid change hotkey, I suppos I could have an option for the user-defined hotkey.  Either user defined keyboard hotkey is for sizing, or for grid switching with A - F. That wouldn't be difficult. I prefer mouse based hotkey for resize anyway.  Those who wnat the keyboard hotkey, it would stay as is by default.  I could add another menu choice with check mark for "Keyboard Hotkey Switches Grid" or something like that.
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #47 on: May 27, 2012, 09:39:10 PM »

I thought I had this stable but it turns out of you complicate the desktop setup, such as having a work area with numbers quite different from the screen res on several sides, the calculations get really hairy.  I'm dumping 'g' as it just confuses the issue.

I'll never stop messing with this unless I just switch to Grid A is it, and set your settings to move the dividers around.  All these rotations are insane!
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #48 on: May 27, 2012, 11:13:52 PM »

SectionAte gets the Section 8!!  After experimenting with various work areas I find that for me it's more hassle than it's worth.  I'm using a cut down version with no grids just to size stuff to convenient shapes.

Anyway, if anyone who already has the source wants to mod it, feel free. I'm taking it down from my site so I don't get support emails. Too much of a headache.  Sorry. smiley
Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
MilesAhead
Member
**
Posts: 4,947



View Profile WWW Give some DonationCredits to this forum member
« Reply #49 on: May 28, 2012, 12:51:46 AM »

I cheated! smiley  I surgically removed the grids from SectionAte.  Then I changed t and b keys to set up my browser on bottom and something like Notepad on top so they fit nicely together.

It still has the Alt Arrow keys. That's all I need with TicClick. Not really a grid type of guy. I tried GridMove just to check it out. Obviously a lot of work went into it. I'm just not enamored of grids. More curious than anything. smiley

Anyway here's a screen shot of my "MoveIt" hack at work.



Here's the source

[copy or print]
/*
 * * * Compile_AHK SETTINGS BEGIN * * *

[AHK2EXE]
Exe_File=%In_Dir%\MoveIt.exe
No_UPX=1
[VERSION]
Set_Version_Info=1
File_Version=1.0.0.0
Inc_File_Version=0
Legal_Copyright=2012 www.favessoft.com
Product_Version=1.0.0.0
[ICONS]
Icon_1=%In_Dir%\mycomputer.ico

* * * Compile_AHK SETTINGS END * * *
*/

; To compile yourself use AutoHotKey_L as AHK basic does not have
; Object() support. I used AHK_L 1.1.07.03 32 bit Unicode English
; You may get AHK_L here: http://l.autohotkey.net/
;
#SingleInstance force
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
progname := _FileBaseName(A_ScriptFullPath)
Menu Tray,NoStandard
Menu Tray,Add,Donate,DoDonate
Menu Tray,Add,Visit Hotkey Page,DoVisit
Menu Tray,Add,Set Keyboard Hotkey,DoKeyboard
Menu Tray,Add,Set Keyboard Hotkey as Text,DoKeyboardAsText
Menu Tray,Add
Menu Tray,Add,About,DoAbout
Menu Tray,Add,Delete Dead Window Info,PurgeUndo
Menu Tray,Add
Menu Tray,Add,Quit,DoQuit
Menu Tray,Default,About
Menu Tray,Click,1
Menu Tray,Tip,%progname%
if (A_IsCompiled)
  Menu Tray,Icon,%A_ScriptFullPath%,1

; window style for sizeable border
WS_SIZEBOX := 0x40000

; for Undo
wArray := Object()

; for _MarginWorkArea()
marg := 4
param := ""
len := 0
if 0 > 0
{
  param = %1%
  len := StrLen(param)
  if (len > StrLen("margin="))
    StringMid,marg,param,StrLen("margin=") + 1
}
l := -1
t := -1
r := -1
b := -1
w := 0
h := 0
key := "0"
AWindow := 0
AboutOpen := false
KHotkey := "^+s"
KbdSet := false
IniFile = %A_ScriptDir%\%A_ScriptName%
IniFile := RegExReplace(IniFile,"i)ahk$","ini")
IniFile := RegExReplace(IniFile,"i)exe$","ini")
IniRead,KHotkey,%IniFile%,Settings,KeyboardHotkey,%KHotkey%

if (KHotkey)
  Hotkey,%KHotkey%,DoHotKey,UseErrorLevel
If ErrorLevel
{
  MsgBox, 4112, %progname%, %KHotkey% is not a valid Hotkey
  ExitApp
}
 KbdSet := (KHotkey != "")
 _EmptyWorkingSet()

; Winkey click window then press a key
; or use hotkey from ini file
DoHotKey:
~#LButton::
  Input,key,L1
  if (key != "u")   
    goto,bypass
  else
    gosub,DoUndo
return

; Hold down middle mouse button and hit a key

; Undo
~MButton & u::
  gosub, DoUndo
return

~MButton & t::
~MButton & b::
~MButton & c::
~MButton & l::
~MButton & r::
~MButton & s::
  StringRight,key,A_ThisHotKey,1
bypass:
  AWindow := WinExist("A")
  WinGet,attr,Style,A
  if (! (attr & WS_SIZEBOX) )
    or (AWindow = WinExist("Program Manager"))
    or (AWindow = WinExist("Start menu"))
    return
  gosub,DoMove
  SetTimer,DumpMemory,-1000
return

DoMove:
  gosub,SaveUndoInfo
  chunk := (r - l) // 20
  TH := (b - t) * .33
  BH := (b - t) * .67
  if (key = "t")
  {
   
    WinMove,ahk_id %AWindow%,,l + chunk,t,(r - l) - chunk,TH
    ;WinMove,ahk_id %AWindow%,,l + Round((r - l) * .05),t,Round((r - l) * .8),(b - t) // 2 - 3
  }
  else if (key = "b")
  {
    chunk := (r - l) // 20
    WinMove,ahk_id %AWindow%,,l + chunk,TH + 10,(r - l) - chunk,BH - 10
    ;WinMove,ahk_id %AWindow%,,l + Round((r - l) * .05),(b - t) // 2 + 3,Round((r - l) * .8),(b - t) // 2 - 3
  }
  else if (key = "c")
    gosub, SectionCenter
  else if (key = "s")
    gosub, SectionSquare
  else if (key = "l")
    WinMove,ahk_id %AWindow%,,l,t,(r - l) // 2,b - t
  else if (key = "r")
    WinMove,ahk_id %AWindow%,,r - ((r - l) // 2) ,t,(r - l) // 2,b - t
return

SectionCenter:
  gosub,SaveUndoInfo
  w := (r - l) // 6 * 5
  h := (b - t) // 5 * 4
  l := l + (r - w) // 2
  t := t + (b - h) // 2
  WinMove,ahk_id %AWindow%,,l,t,w,h
return

SectionSquare:
  gosub,SaveUndoInfo
  w := (r - l) // 2
  if GetKeyState("Shift")
    w := w + (w // 5)
  h := w
  t := ((b - t) - h) // 2
  WinMove,ahk_id %AWindow%,,l,t,w,h
return

DoUndo:
  AWindow := WinExist("A")
  wPos := wArray[AWindow]
  if (wPos)
  {
    WinActivate,ahk_id %AWindow%
    WinMove,A,,wPos[1],wPos[2],wPos[3],wPos[4]
  }
return

SaveUndoInfo:
  WinGetPos,x,y,w,h, ahk_id %AWindow%
  _MarginWorkArea(l, t, r, b, marg)
  wPos := [x,y,w,h]
  wArray[AWindow] := wPos
return

!Left::
  AWindow := WinExist("A")
  If (AWindow = WinExist("Program Manager"))
    or (AWindow = WinExist("Start menu"))
    return
  gosub,SaveUndoInfo
  xinc := (r - l) // 10
  WinGetPos,X,Y,Width,Height,ahk_id %AWindow%
  if ((X - xinc) > l)
    WinMove,ahk_id %AWindow%,,X - xinc,Y
  else
    WinMove,ahk_id %AWindow%,,l,Y
  SetTimer,DumpMemory,-1000
return

!Right::
  AWindow := WinExist("A")
  If (AWindow = WinExist("Program Manager"))
    or (AWindow = WinExist("Start menu"))
    return
  gosub,SaveUndoInfo
  xinc := (r - l) // 10
  WinGetPos,X,Y,Width,Height,ahk_id %AWindow%
  if ((X + xinc + Width) <= r)
    WinMove,ahk_id %AWindow%,,X + xinc,Y
  else
    WinMove,ahk_id %AWindow%,,r - Width,Y
  SetTimer,DumpMemory,-1000
return

!Up::
  AWindow := WinExist("A")
  If (AWindow = WinExist("Program Manager"))
    or (AWindow = WinExist("Start menu"))
    return
  gosub,SaveUndoInfo
  yinc := (b - t) // 10
  WinGetPos,X,Y,Width,Height,ahk_id %AWindow%
  if ((Y - yinc) > t)
    WinMove,ahk_id %AWindow%,,X,Y - yinc
  else
    WinMove,ahk_id %AWindow%,,X,t
  SetTimer,DumpMemory,-1000
return

!Down::
  AWindow := WinExist("A")
  If (AWindow = WinExist("Program Manager"))
    or (AWindow = WinExist("Start menu"))
    return
  gosub,SaveUndoInfo
  yinc := (b - t) // 10
  WinGetPos,X,Y,Width,Height,ahk_id %AWindow%
  if ((Y + yinc + Height) <= b)
    WinMove,ahk_id %AWindow%,,X,Y + yinc
  else
    WinMove,ahk_id %AWindow%,,X,b - Height
  SetTimer,DumpMemory,-1000
return

PurgeUndo:
  For key, value in wArray
    IfWinNotExist,ahk_id %key%
      wArray.Remove(key)
  SetTimer,DumpMemory,-5000
return

DoAbout:
  if (AboutOpen)
    return
  AboutOpen := true
  HotkeyText := KHotkey ? KHotkey : "( none set )"
  filever := _ScriptVersion(A_ScriptFullPath)
  MyMsg =
  (
%progname%  %filever%  Copyright (c)  %A_Year% www.FavesSoft.com`n
To Size and Move the Active Window use one of ...`n
Mouse Hotkey 1 - Hold Middle Mouse Button on Sizeable
Window Frame and press a key`n`nMouse Hotkey 2 - Winkey Click then press a key`n
User Keyboard Hotkey  %HotkeyText%  then press a key`n
t = top  b = bottom  c = center  l = left  r = right
s = square  u = undo`n
Information for one Undo is saved for each Window moved`n
Press Alt Arrow to Move the Active Window in one dimension`n
Pass margin=n to adjust Desktop Margin
Valid range for n is 0 to 12  Default is 4
  )
  MsgBox, 4160, About %progname%, %MyMsg%
  SetTimer,DumpMemory,-1000
  AboutOpen := false
return

DoKeyboard:
  if (KdbSet)
    Hotkey,%KHotkey%,Off
  Gui, Add, Hotkey, x6 y7 w140 h20 vHotkey,%KHotkey%
  Gui, Add, Button, x156 y7 w110 h20 gGO , Set Hotkey
  Gui, Show, w273 h39, Set Hotkey
Return

GO:
  if (KbdSet)
    SaveKHotkey := KHotkey
  Gui, Submit
  if (! Hotkey)
  {
    if (KdbSet)
    {
      KHotkey := SaveHotkey
      Hotkey,%KHotkey%,On
    }
    return
  }
  KHotkey := Hotkey
  Gui,Destroy
  Hotkey,%KHotkey%,DoHotKey,UseErrorLevel
  If ErrorLevel
  {
    KHotkey := SaveHotkey
    Hotkey,%KHotkey%,DoHotKey,UseErrorLevel
    if ErrorLevel
    {
      MsgBox, 4112, , %KHotkey% is not a valid - Reset to %SavedHotkey%
      KHotkey := SavedHotkey
      Hotkey,%KHotkey%,On
      Gosub,DoIniWrite
    }
  }
  Else
  {
    Hotkey,%KHotkey%,On
    Gosub,DoIniWrite
  }
Return

GuiEscape:
GuiClose:
  Gui,Destroy
  SetTimer,DumpMemory,-2000
return

DoKeyboardAsText:
  SaveHotkey := KHotkey
  if (KbdSet)
    Hotkey,%KHotkey%,Off
  InputBox,KHotkey,%progname%
    ,`nEnter Keyboard Hotkey`n( ! = Alt ^ = Control + = Shift # = Winkey )`n`nExample: ^+s for Control Shift s
    ,,,,,,,,%KHotkey%
  if ErrorLevel
  {
    if (KbdSet)
    {
      KHotkey := SaveHotkey
      Hotkey,%KHotkey%,On
    }
  }
  else if (! KHotkey)
  {
    if (KdbSet)
      Hotkey,%SaveHotkey%,Off
  }
  else
  {
    if (KdbSet)
      Hotkey,%SaveHotkey%,Off
    Hotkey,%KHotkey%,DoHotKey, UseErrorLevel
    if ErrorLevel
    {
      if (KHotkey)
        MsgBox, 4112, , Hotkey change Failed
      KHotkey := ""
      KdbSet := false
      return
    }
    if (KbdSet)
      Hotkey,%KHotkey%,On
  }
  Gosub,DoIniWrite
return

DumpMemory:
  _EmptyWorkingSet()
return

DoDonate:
  Run,"http://www.favessoft.com/donate.html"
return

DoVisit:
  Run,"http://www.favessoft.com/hotkeys.html"
return

DoIniWrite:
  IniWrite,%KHotkey%,%IniFile%,Settings,KeyboardHotkey
 
return

DoQuit:
  Gosub,DoIniWrite
  ExitApp

;-----------  general purpose include functions  -----------
; include at bottom so DebugBox() Line count works
;
#Include MilesAhead.ahk

Logged

"Genius is not knowing you can't do it that way."
- MilesAhead
Pages: Prev 1 [2] 3 4 5 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.048s | Server load: 0.17 ]