avatar image

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

Login with username, password and session length
  • February 19, 2019, 05:47 AM
  • Proudly celebrating 13 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - KodeZwerg [ switch to compact view ]

Pages: [1] 2 3 4 5 6 ... 15next
N.A.N.Y. 2019 / Re: NANY 2019 - DisplayOff
« on: December 07, 2018, 02:58 AM »
Thanks for sharing this. I have tested it and by reading your source i see that you do not trigger system, just override a powerstate.
This action kinda confuse my Windows own powersetting. (if system goes sleep mode ScreenSaver -> ScreenOff, then automatic start background jobs, those wont executed anymore with your method)

I look on my own how to deal with WinApi correct to do what you done.
For myself i just done some overrides that do exact the different way, let system always be on :-)
(i needed such feature for my MediaPlayer project, when no mousemovement = screen goes blank = monitor speaker goes off)

General Software Discussion / Re: Stitch two windows together
« on: December 07, 2018, 01:45 AM »
cranioscopical, IainB, you are welcome  :-*


@KodeZwerg: No need to be quiet, KodeZwerg, and you weren't causing any trouble or intrusion at all.   :D

Glad to hear that SkWire.

@OP, i cant reproduce your found error, on my system all work like it should.
If i should fix anything, please do some screenshots of what you are doing and how you use my Application.
So i can understand whats going wrong. Be as precise as possible, thankyou.

Over here i can replace all Icons to one, no matter if .LNK or .URL

I am on vacation for a week.

General Software Discussion / Re: Stitch two windows together
« on: December 06, 2018, 07:09 AM »
You might take a look on this AutoHotKey script that i found.

If link goes down, here is full script copy/paste from above link.

; 'Dock'nDrag'
; By David Tong 03-02-2009.
; Primary Functions:
; 1. CapsLock+left-drag from the central rectangle to move a window without resizing it.
; 2. CapsLock+left-drag a window by corner or side to resize it. Select either '‘Easy Window
; Dragging' or 'NiftyWindows' modes of dragging and resizing.
; 3. CapsLock+rightclick in centre of the strip along an edge to 'dock' a nearby window to it
; Afterwards both windows move or resize as one. Do the same in centre of either window
; to uncouple. [Great for using a Help window at same time as AHK ScITE editor].
; 4. Works with multiple monitors. Boundary limits ensure a coupled window is not stranded on
; a non-existent monitor.
; 5. Max width (height) of a coupled window is that of the monitor. Minimum for either partner
; is set by a parameter.
; 6. When stretching a window in any direction, after it reaches maximum size the whole
; window starts moving. This is more ergonomic than EWD or NiftyW which do this only when
; pulling up or to the left, but not down or to the right.
; 7. Supports multiple monitors and ensures partnered window is not accidentally left
; stranded on a non-existent monitor.
; 8. Tested in XP and Vista.

; Extra Functions:
; 1. CapsLock+Leftclick in left-hand side of title bar of Windows Explorer closes it and opens
; same folder in Directory Opus. (Useful because Picasa and Copernic Desktop Search
; don't respect default browser settings).
; 2. Keeps CapsLock off to avoid typing in caps by mistake. [No longer done as standard]
; 3. As a precaution while testing I included CapsLock+RControl as a hotkey to force an exit
; if the script becomes unresponsive but with CapsLock activated.

; Acknowledgements:
; Basic window dragging functions inspired by ‘Easy Window Dragging - KDE style’
; by Jonny, and NiftyWindows (both in Script Showcase) and similar variants.
; I cribbed lots of code from the many great scripts on the AHK forum, in particular
; WindowPad by Lexikos. Most thanks of all of course to Chris M. for developing
; AutoHotkey in the first place.

SetBatchLines , 20ms ; If too low, non-dragged windows take too long to redraw.
SetWinDelay , 10 ; If too low the dragged window leaves too much of a trail.

SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance , ;ignore

; Set up user options:
; Define minimum width limit for windows.
MinDimx := 200 ;Min window width
MinDimy := 200 ;Min window height

; Define the criterion for selecting a partner window when coupling two together.
; In all cases only visible windows on the same monitor are selected, and only those
; whose centres are on the same side of target centre as the side of target that
; you click on.
; 'Area' chooses the window with greatest area.
; 'Centre' chooses the window whose centre is nearest to the centre of target window.
; 'Edge' [recommended] Selects the one whose edge-to-be-shared is nearest to the
; edge you clicked.

Criterion := edge

; If DragMode=1, each edge has three clickable sections allowing dragging by side or corner
; like on a normal window. (Same mode as used in NiftyWindows).
; If DragMode<>1, four clickable quadrants giving corner-dragging modes only as in ‘Easy
; Window Dragging - KDE style’.

DragMode = 1 ; set to 1 or 0 (or blank) as desired

; Define the hotkeys:

Modifier := "CapsLock `& " ; Other examples: "!", "+", "Insert `& ", etc.
DragButton := "LButton"
DockButton := "RButton"
EmergencyButton := "RControl"

; End of user setup section

; Might want to alter the next two lines and CheckCapslock: if using Insert, ScrollLock, etc
IfInString , Modifier, CapsLock
Settimer, CheckCapslock, 200

FullDragButton = %Modifier%%DragButton%
FullDockButton = %Modifier%%DockButton%
FullEmergencyButton = %Modifier%%EmergencyButton%

Hotkey , %FullDragButton% , Resizer
Hotkey , %FullDockButton% , WinDock
Hotkey , %FullEmergencyButton% , Finish

Finish: ; Used for emergency exit if script stalls with CapsLock activated.Gosub , CheckCapslock
Gosub , CheckCapslock
SoundBeep 2000, 500
; Make sure Capslock is not left in an activated state.
GetKeyState , caps , CapsLock , T ; 'D' means key is 'on', 'U' means 'off'.
IfEqual , caps , D
sleep 20 ; used to use 100
SetCapsLockState , OFF

; Combines two windows as a pair so they can be moved and resized as one.
; Action depends on which of the nine cells (in a 3x3 grid) you clicked in.
; Top left-hand cell is row 1, column 1. Bottom right is 3,3.
; -----------------
; | 1,1 | 1,2 | 1,3 |
; -----------------
; | 2,1 | 2,1 | 2,3 |
; -----------------
; | 3,1 | 3,2 | 3,3 |
; -----------------

; Click in cell:
; 1,2 to couple another window to top edge.
; 3,2 to couple another window to bottom edge.
; 2,1 to couple another window to lefthand edge.
; 2,3 to couple another window to righthand edge.
; 2,2 to uncouple a coupled pair.
; 1,1 and within title bar of Windows Explorer to close Explorer and open
; same folder in Directory Opus.

CoordMode , Mouse , Screen
MouseGetPos ,xx , yy , ID1, Ctrl, 1 ; defines window that you clicked in

; Next command required else first right-click on desktop gives
; context menu with some items missing (those for Directory Opus).
WinActivate , ahk_id %ID1%

; Ignore clicks on desktop
WinGetClass , clss, ahk_id %ID1%
If clss = Progman
Gosub , ClearContextPopup ; Clear unwanted right-click pop-up menus

; Find which cell in the target window was clicked in.

; Store a shortlist of acceptable windows in Item1, Item2, etc
WinGetPos , My_x, My_y, My_w, My_h , ahk_id %ID1% ;details for current window
My_mon := GetMonitorAt(My_x+My_w/2, My_y+My_h/2) ; Using which monitor?
Gosub , CalcMonStats ; loads My_monRight, etc
GoSub, Sort

; Do work as defined by the cell.

; LatVert = +1 defines lateral coupling, +1 defines vertical (also used in Resizer).
; LftRght = +1 for coupling to right (or up) and -1 for left (or down)

If (Column=1 and Row=1)
If IsOverTitleBar(xx, yy, ID1)
Gosub, DoExplorer
Else If (Row=2 and Column=2)
If (ID1 = Master) or (ID1 = Slave)
Gosub, UnCouple
Else If (Column=1 and Row=2)
LatVert := 1 ; lateral
LftRght := -1 ; to left
Winid := FindWin(LatVert, LftRght) ; returns selected id from the list.
IfEqual , Winid ,, Return ; skip if no suitable window
Gosub , Coupled ; announce coupled state

; Master - leave gap for partner and extend other edge to monitor limit
newmx := My_x
If (My_x < (My_monLeft+MinDimx)) ;NB outer brackets are essential here!
newmx := My_monLeft+MinDimx
newmw := My_monRight-newmx

; Partner - move to gap and match height to Master.
newpx := My_monLeft
newpw := Newmx-My_monLeft
WinMove , ahk_id %Master% ,, %newmx% ,, %newmw% ,
WinMove , ahk_id %Winid% ,, %newpx% ,My_y, %newpw% , My_h
Else If (Column=3 and Row=2)
LatVert := 1 ; lateral
LftRght := 1 ; to right
Winid := FindWin(LatVert, LftRght) ; returns selected id from the list.
IfEqual , Winid ,, Return ; skip if no suitable window
Gosub , Coupled ; announce coupled state

; Master - leave gap for partner and extend other edge to monitor limit
newmx := My_monLeft
newmw := My_w+(My_x-My_monLeft)
If (My_monRight-(My_x+My_w)) < MinDimx
newmw := MaxDimx-MinDimx

; Move Partner into gap and match height to Master.
newpx := My_monLeft+newmw ; newmw value on right refers to main window
newpw := MaxDimx-newmw ; same here
WinMove , ahk_id %Master% ,, %newmx% ,, %newmw% ,
WinMove , ahk_id %Slave% ,, %newpx% , My_y, %newpw% ,My_h
Else If (Row=1 and Column=2)
LatVert := -1 ; vertical
LftRght := +1 ; upward
Winid := FindWin(LatVert, LftRght) ; returns selected id from the list.
IfEqual , Winid ,, Return ; skip if no suitable window
Gosub , Coupled ; announce coupled state

; Master - leave gap for partner and extend other edge to monitor limit
newmy := My_y
If (My_y<MinDimy)
newmy := MinDimy
newmh := MaxDimy-newmy

; Move Partner into gap and match height to Master.
newpy := My_monTop
newph := MaxDimy-newmh
WinMove , ahk_id %Master% ,, ,%newmy%, , %newmh%
WinMove , ahk_id %Slave% ,,%My_x%,%newpy%, %My_w% ,%newph%
Else If (Row=3 and Column=2)
LatVert := -1 ; vertical
LftRght := -1 ; downward
Winid := FindWin(LatVert, LftRght) ; returns selected id from the list.
IfEqual , Winid ,, Return ; skip if no suitable window
Gosub , Coupled ; announce coupled state

; Master - leave gap for partner and extend other edge to monitor limit
newmy := My_monTop
newmh := My_h+ My_y
If (MaxDimy-newmh)<MinDimy
newmh := MaxDimy- MinDimy

; Move Partner into gap and match height to Master.
newpy := -(My_monTop - newmh)
newph := MaxDimy-newmh
WinMove , ahk_id %Master% ,, ,%newmy%, , %newmh%
WinMove , ahk_id %Slave% ,,%My_x%,%newpy%, %My_w% ,%newph%

; Clears spurious Right-Click menus
; Not so easy to find a method that works with all windows. For example,
; sending 'ControlSend,,{ESC}, ahk_id %ID1%' to Word2003 makes it crash.
; This seems ok with everything so far:
WinActivate , ahk_id %ID1%
WinWaitActive , ahk_id %ID1%
sleep ,100
send , {alt}
sleep ,100
send , {esc}

; Closes an open Explorer window and re-opens same folder in DOpus as a new tab.
; (Useful with Picasa and Copernic which insist on using Explorer instead of DOpus).

WinGet, Prcs , ProcessName, ahk_id %ID1%
WinGetTitle , Ttle, ahk_id %ID1%
If Prcs contains explorer
Ttle1 = "%Ttle%" ; DOpus command line wants it in quotes
run , "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /CMD Go %Ttle1% Newtab
WinClose , ahk_id %ID1%

; Get work area (excludes taskbar-reserved space).
; Copied from WindowPad. Modified to suit DAT work area
; Get work area less a guard-band to minimise accidental triggering of
; popup toolbars on three sides of main monitor
SysGet, My_mon, MonitorWorkArea, %My_mon%
IfEqual , My_mon , 1
My_monRight := My_monRight ;- 25
My_monTop := My_monTop ;+ 25
My_monLeft := My_monLeft ;+ 25
MaxDimx := My_monRight - My_monLeft
MaxDimy := My_monBottom - My_monTop

; Returns the id of a window that meets the selection criteria.
; LatVert = +1 means 'lateral' and -1, 'vertical' coupling
; LftRght defines direction, seen from centre of Master window, in which
; to look for a target window.
; If LatVert=+1: LftRght = +1 means look right and -1 means look left
; If LatVert=-1, LftRght = +1 means look up and -1 means look down.
; For example: If LatVert=+1 and LftRght = +1, a window will be selected
; whose right edge [see note] is nearest to the left edge of the Master
; (in either direction), and whose centre is to the right of
; the centre of the Master.
; Note: Instead of selecting by 'edge' you can select on 'area' or
; 'centre' by setting the variable 'Criterion').

FindWin(LatVert, LftRght)
global ID1, Item, Item1, Item2, Item3, Item4, Item5, Criterion ; Assumes max of 5 candidates.

WinGetPos , My_x, My_y, My_w, My_h , ahk_id %ID1%

; Discard unsuitable windows and store parameters for shortlist candidates
My_centrex := (My_x+My_w/2)
My_centrey := (My_y+My_h/2) ; missed off until 24-01-2009 12:18
index := "" ; count selected windows
Loop , %Item%
this_Item := Item%A_Index%
WinGetPos , this_x, this_y, this_w, this_h , ahk_id %this_Item%
This_centrex := (this_x+this_w/2)
This_centrey := (this_y+this_h/2)

If ((LatVert = +1)
and ((-LftRght+1)/2*this_centrex + (LftRght+1)/2*My_centrex)
>((LftRght+1)/2*this_centrex + (-LftRght+1)/2*My_centrex))
or ((LatVert = -1)
and ((LftRght+1)/2*this_centrey + (-LftRght+1)/2*My_centrey)
>((-LftRght+1)/2*this_centrey + (LftRght+1)/2*My_centrey))
Item%A_Index% := "" ; wrong side of my window so discard
Item%A_Index% := ""

If (LatVert = +1) {
EdgeSep := Abs(This_x - My_x + (-LftRght+1)/2*This_w - (LftRght+1)/2*My_w)
CentreSep := Abs(My_centrex-this_centrex) ; Centre-to-centre separation
If (LatVert = -1) {
EdgeSep := Abs(This_y - My_y + (LftRght+1)/2*This_h - (-LftRght+1)/2*My_h)
CentreSep := Abs(My_centrey-this_centrey) ; Centre-to-centre separation
Area := (this_w * this_h) ; area
Item%index% = %this_Item%%A_Space%%CentreSep%%A_Space%%Area%%A_Space%%EdgeSep% ; store results
; Select the best candidate
Item:= index ; number of candidates
Dmin := 10000 ; Start high. Will drop to lowest value after loop
Dmax := 0 ; Start at zero. Will rise to higher value after loop
Loop , %Item%
this_Item := Item%A_Index%
StringSplit , string , this_Item, %A_Space%
If (Criterion = edge) { ; select on edge-to-edge separation
If (string4 < Dmin) {
Dmin := string4
Item1 := string1
If (Criterion = area) { ; select for largest area
If (string3 > Dmax) {
Dmax := string3
Item1 := string1
If (Criterion = centre) { ; select for nearest centre
If (string2 < Dmin) {
Dmin := string2
Item1 := string1
Return, Item1 ; returns id of chosen window

; Lists other windows on same monitor that have style 0x16CF0000 or 0x14CF0000.
WinGet, Item, list,,, Program Manager
index := "" ; count number in selection
Loop, %Item% ; loop thro' all current windows
this_Item := Item%A_Index% ; Item1 contains id of first window, etc
WinGet, this_style , style , ahk_id %this_Item% ; get 'Style' of the window
If ((this_Style <> 0x16CF0000) and (this_Style <> 0x14CF0000)) or (this_Item = ID1)
Item%A_Index% := ""
continue ; wrong style or is Master window
WinGetPos , this_x, this_y, this_w, this_h , ahk_id %this_Item%
this_mon := GetMonitorAt(this_x+this_w/2, this_y+this_h/2) ; which monitor?
If (this_mon <> My_mon)
Item%A_Index% := ""
continue ; window is on wrong monitor
index++ ; increment pointer
Item%index% = %this_Item%
Item:= index ; store revised total of windows

; Determine which cell the mouse is in. Use a 3x3 grid. Columns are 1,2,3 (top to
; bottom) and rows are 1,2,3 (left to right).

Get_Cell(ByRef Column, ByRef Row)
CoordMode, Mouse, Screen
WinGet,Win,MinMax,ahk_id %id%
If Win
; Get the initial window position and size.
WinGetPos, WinX1, WinY1, WinW, WinH, ahk_id %id%

Div := 3 ; e.g. Div=4 makes outer cells 1/4 as wide as the window.
PW := Abs(WinW/Div)
PH := Abs(WinH/Div)
If ((WinX1 < X1) and (X1 < WinX1 + PW))
Column := 1
If ((WinX1 + PW < X1) and (X1 < WinX1 + WinW - PW))
Column := 2
If ((WinX1 + WinW - PW < X1) and (X1 < WinX1 + WinW))
Column := 3

If ((WinY1 < Y1) and (Y1 < WinY1 + PH))
Row := 1
If ((WinY1 + PH < Y1) and (Y1 < WinY1 + WinH - PH))
Row := 2
If ((WinY1 + WinH - PH < Y1) and (Y1 < WinY1 + WinH))
Row := 3

; Called when two windows first couple together
Master := ID1 ; Resizer uses this to see if it's dealing with a Master window.
Slave := winid
Coupled := 1
; Promote partner to number two window. Avoids having a third window sandwiched
; between Master and partner. Also makes both windows blink when coupled.
WinActivate , ahk_id %Slave%
WinActivate , ahk_id %Master%
ToolTip , Linking On
SetTimer , TooltipOff , 1000
SoundBeep, 800, 25
SoundBeep, 1200, 25

; Called when two windows uncouple
If (Coupled = 0)
Master := ""
Slave := ""
Coupled := 0
ToolTip , Linking Off
SetTimer , TooltipOff , 1000
SoundBeep, 1200, 25
SoundBeep, 800, 25

; Clear tooltip
SetTimer , TooltipOff , Off


; Get the initial mouse position, target window info, monitor limits
CoordMode, Mouse, Screen
WinGetPos,KDE_WinX1,KDE_WinY1, DimMx, DimMy,ahk_id %KDE_id%
My_mon := GetMonitorAt(KDE_WinX1+DimMx/2, KDE_WinY1+DimMy/2) ; From WindowPad by Lexikos
Gosub , CalcMonStats ; gets My_monRight, etc
WinActivate , ahk_id %KDE_id%

; Set flag to show window is part of a coupled pair
OneOfPair := (Coupled = 1) and ((KDE_id = Master) or (KDE_id = Slave)) ? 1:0
; Uncouple if either window has been minimised, maximised, or closed.
WinGet,SGone,MinMax,ahk_id %Slave%
WinGet,MGone,MinMax,ahk_id %Master%
If (OneOfPair = 1) and ((SGone <> 0) or (MGone <> 0)) {
OneOfPair := 0
Gosub , UnCouple
; Abort if selected window is full-screen or minimised
WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
IfNotEqual , KDE_Win, 0 , Return

; If one of a couple, make sure both are in consecutive z-order.
; Avoids a third window being sandwiched between a coupled pair. Also
; indicates paired state by making both task bars blink when selected by
; this routine.
If (Coupled = 1) and (KDE_id = Master) {
WinActivate , ahk_id %Slave%
WinActivate , ahk_id %Master%
If (Coupled = 1) and (KDE_id = Slave) {
WinActivate , ahk_id %Master%
WinActivate , ahk_id %Slave%
; If clicking in what was previously the Slave, swap Master and Slave
If (Coupled = 1) and (Slave = KDE_id)
Swap(Master, Slave)

WinGetPos,KDE_P_x,KDE_P_y, DimPx, DimPy,ahk_id %Slave% ; used during limit checks

; Find which of the nine cells in the target window received the click.
If (Column=2) and (Row=2) ; Centre cell, so do move without resizing.
GetKeyState,KDE_Button,%DragButton% ,P
If KDE_Button = U ; Abort if button was released.
MouseGetPos,KDE_X2,KDE_Y2 ; current mouse position.
KDE_X2 -= KDE_X1 ; offset from initial position.
KDE_Y2 -= KDE_Y1
newx := (KDE_WinX1 + KDE_X2) ; Apply offset to window
newy := (KDE_WinY1 + KDE_Y2)

; If Partner exists, stop dragging before it leaves valid monitor
If (OneOfPair = 1)
Mon_P := GetMonitorAt(KDE_P_x + KDE_X2+ DimPx/2, KDE_P_y+ KDE_Y2+ DimPy/2, 0)
IfEqual , Mon_P, 0, Continue
WinMove,ahk_id %Slave%,, KDE_P_x + KDE_X2, KDE_P_y + KDE_Y2
WinMove,ahk_id %KDE_id%,, newx, newy
Else ; Do resizing
; Use the quadrants, North-West, NE, SE, and SW to set the basic
; directions in which the Master window can be dragged. These are
; refined later according to which of the eight peripheral cells was clicked.

WestEast := KDE_X1 < KDE_WinX1+ DimMx/2 ? 1:-1 ; ie, Left-Right
NorthSouth := KDE_Y1 < KDE_WinY1+ DimMy/2 ? 1:-1 ;ie, Up-Down

; Set max width (height) parameter to leave space for Slave if present, and
; Set 'Master Near' flag to show if Master or Slave nearest to top-left of monitor.
MaxDim2x := MaxDimx ; used in limit calculation for Master
MaxDim2y := MaxDimy
If (OneOfPair = 1) and (LatVert = 1) {
MaxDim2x := MaxDimx-MinDimx
MasterNear := (KDE_Winx1+ DimMx/2) > (KDE_P_x + DimPx/2) ? 1:-1
If (OneOfPair = 1) and (LatVert = -1) {
MaxDim2y := MaxDimy-MinDimy
MasterNear := (KDE_Winy1+ DimMy/2) > (KDE_P_y + DimPy/2) ? 1:-1
GetKeyState,KDE_Button,%DragButton% ,P
If KDE_Button = U ; Abort if button was released.
MouseGetPos,KDE_X2,KDE_Y2 ; Get current mouse position.

KDE_X2 -= KDE_X1 ; offset from initial mouse position.
KDE_Y2 -= KDE_Y1
KDE_X1 := (KDE_X2 + KDE_X1) ; Reset initial position for next iteration.
KDE_Y1 := (KDE_Y2 + KDE_Y1)

; Implement drag mode choice (quadrants or cells).
If (DragMode = 1) and (Column=2) ; Forces lateral-only dragging for Col2
KDE_X2 := 0
If (DragMode = 1) and (Row=2) ; Forces vertical-only dragging for Row2
KDE_Y2 := 0

; Calculate shifts based on quadrant
DeltaMX := (WestEast+1)/2*KDE_X2
DeltaMY := (NorthSouth+1)/2*KDE_Y2
DeltaDimMx := -WestEast*KDE_X2
DeltaDimMy := -NorthSouth*KDE_Y2

; Apply limits on maximum size
StretchLimit("y", "NorthSouth")
StretchLimit("x", "WestEast")

KDE_WinX1 += DeltaMX
KDE_WinY1 += DeltaMY
DimMx += DeltaDimMx
DimMy += DeltaDimMy

; Apply limits on minimum size
ShrinkLimit("x", "WestEast")
ShrinkLimit("y", "NorthSouth")

; Calculate dimensions of Slave if it exists
IfNotEqual ,OneOfPair ,0
; LatVert previously set to +1 for lateral coupling and -1 for vertical coupling,
If (latvert = 1) { ; lateral coupling
abs := "x"
ord := "y"
If (latvert = -1) { ; vertical coupling
abs := "y"
ord := "x"
KDE_P_%abs% := KDE_Win%abs%1+ DimM%abs% - MaxDim%abs%*(1+MasterNear)/2
KDE_P_%ord% := KDE_Win%ord%1
DimP%abs% := MaxDim%abs% - DimM%abs%
DimP%ord% := DimM%ord%

; Abort if centre of Slave would be on non-existent monitor (Mon_P = 0)
Mon_P := GetMonitorAt(KDE_P_x+ DimPx/2, KDE_P_y+ DimPy/2, 0)
IfEqual , Mon_P, 0, Continue
WinMove ,ahk_id %Slave%,, KDE_P_x , KDE_P_y, DimPx, DimPy
WinMove,ahk_id %KDE_id%,, KDE_WinX1 , KDE_WinY1, DimMx, DimMy

; Apply maximum width or height limits
StretchLimit(axis, Dir)
If (DimM%axis% > MaxDim2%axis%) and (DeltaDimM%axis% >0) {
DeltaM%axis% := -(%Dir%-1)/2*DeltaDimM%axis% +(%Dir%+1)/2*DeltaM%axis%
DeltaDimM%axis% :=0

; Apply minimum width or height limits
ShrinkLimit(axis, Dir)
If (DimM%axis% < MinDim%axis%) and (DeltaDimM%axis% <0) {
DimM%axis% -= DeltaDimM%axis%
KDE_Win%axis%1 += -(%Dir%-1)/2*DeltaDimM%axis%

; Exchange Master and Slave titles
Swap(ByRef Master, ByRef Slave)
temp := Master
Master := Slave
Slave := temp
; Get the index of the monitor containing the specified x and y co-ordinates.
; (From WindowPad by Lexikos)

GetMonitorAt(x, y, default=1)
SysGet, m, MonitorCount
; Iterate through all monitors.
Loop, %m%
{ ; Check if the window is on this monitor.
SysGet, Mon, Monitor, %A_Index%
if (x >= MonLeft && x <= MonRight && y >= MonTop && y <= MonBottom)
return A_Index

return default

; This function is from
IsOverTitleBar(x, y, hWnd) {
SendMessage, 0x84,, (x & 0xFFFF) | (y & 0xFFFF) << 16,, ahk_id %hWnd%
if ErrorLevel in 2,3,8,9,20,21
return true
return false

My simplistic solution would be to simply use Pulover's macro creator to pull up the program to the foreground if it wasn't already, click the"Convert Grid" button, read/copy the 6 digits from the box, pull up WSJT-X to foreground, send F2 to open options page, select the "general" tab and select all>paste the data from GridLocWM into the "My Grid" field and then click OK. Crude as surgery with a bowling ball, but it would work. It's just not a pretty solution and wouldn't work for everyone(anyone else?).

You explained very well whats needed to do. :up:
This yells for a AHK solution, as long SkWire or other AHK gods sleep i play a bit with that GridLocWM and WinApi :-)

The "RPC server unavailable" error can occur for the following reasons:

DNS problems

Time synchronization problem

RPC service is not running

Network connectivity problem

DNS problems - Check the DNS pointing on each DC.

Time synchronization problem - PDC role owner in forest root domain should be a authorative time server.

RPC service-
Ensure the RPC service is running.

Network connectivity-
Ensure that the important well-known ports required in a domain environment are open on the firewall between these DCs, use the Portqry tool.

Additional, Active Directory Replication Over Firewalls

Ports requirement for AD.

Taken from MS TechNet

If this become a coding snack, as for the WinApi way i would need source.exe and target.exe to readout needed handles ( internal process things ) that are needed to do it professional.
AutoHotKey would need some info for sure too :-)

the newsletter looks super-heavy with mega much love created.
i am still not done reading half of it, so much "read here" and "go on there" possibilities.

Tanks for collecting and formatting all that into a usable reading variant!

I use the latest Setup.exe version and run on Windows 10 x64 latest build, the options i use (create a screenshot and save) are working like ever.

Could you try Setup.exe aswell to minimize error to portable package?

Post New Requests Here / Re: KodeZwerg Logo needed
« on: December 05, 2018, 04:54 PM »
Thankyou for that ultrafast reply!

Uhm... Dimension/Aspect Ratio = I have no real idea yet, I would resize to my needs I guess, so this point dont take care too much.
(in code i would adjust visible dimension anyway at runtime to adopt to current screensize)

Transparency = same story, you should not need to take care about, some basics i also know like setting a color to transparent color.

To explain a bit:
Splashscreen: would be loaded and displayed as transparent PNG file, there would be just the image visible no window no control no nothing.
so background would be whatever current screen is showing... desktop... other windows... my dwarf avatar, whatever =)
Aboutbox: there i would paint the image on a panel (canvas/static) background would be like about-box background is set (default = grey)
For Aboutbox there is a small image needed, maybe just KZ as letter with a dwarf possible?

or in other words:
Splashscreen needs a high quality image
Aboutbox needs a small good looking thing that still can be identified as "me"

Post New Requests Here / KodeZwerg Logo needed
« on: December 05, 2018, 04:38 PM »
( ...please dont shoot me that i request no software... ...feel free to move to a better place as request or delete if wrong at all )

Hello community,

I am in need of a Logo for myself, I would like to add splashscreen and about-box features in this or that app, but i miss nice logo(s) for them.
My talent at drawing is like Kindergarten, needed is something more impressive :-)

In my head i have many ideas but cant realize on my own.
If someone is talented and has fun creating image(s) for me, with Dwarf as theme and my nickname "KodeZwerg" somewhere readable, that'll be perfect! If a "KodeZwerg 4 DonationCoder" comes out, that'll be best.

Image(s) that be used will get permanent named in credits, either by current nickname or whatever you like should appear (no racism or porn) =)

Are you a talented artist and like to do then please reply in here!

I have no criterias like "what font to use" "what style to use" "what xyz"
Dwarf theme with my nickname (optional DonationCoder mentioned)
If grafitti, science-fiction, medieval style doesnt matter, i love any dwarf thing ;-)

More information needed? Just tell!

Living Room / Re: Movies you've seen lately
« on: December 05, 2018, 08:11 AM »
For all that like play ego-shooter games.
For all that like motion picture "Gamer" and/or "Doom".
For all that like GTA and/or Parkour (David Belle).

I just watched this not up-to-date (2015) motion picture called "Hardcore" and just can give it 5 of 5 stars on my personal "i like it" index :-)

Here is IMDB Link to that movie.

Henry is resurrected from death with no memory, and he must save his wife from a telekinetic warlord with a plan to bio-engineer soldiers.

1:30 minutes Hardcore.... (without porn :] )

Bass is easy and understandable to handle, contain demo for many aspects and not just in one language.
(Delphi is my language, i am okay with it)

@mutetourettes, the forum you picked is good, how specific you are is good, if someone answer this call.... lets see

Aslong a file aint written you do not see much changes. It is all in cache.
There are possibilies for programmers to update explorer.exe, if they dont use them you just have to wait...
In some of my own copy-routines for example you will instant see final filesize, due how i deal with it.

Why not just look your copy-progress to see how much data you received?

To explain a bit more why you never be able to have such thing under your control...
Imagine this situation, it is a practical way to quick save multithreaded:
 - Copy-Program begin
 - progress is more than one thread
 - progress create first of all the final filesize
 - prograss create individual thread that write to different offsets a specific amount of data
 - now tell me how would you ever be able to see how many bytes are written with explorer.exe or stat.exe or whateverelse.exe
 - solution: watch programs progress and forget about windows

next sample:
 - Copy-Program begin
 - progress is one thread
 - progress read file a) into memory
 - progress write memory to file b)
 - aslong routine is writing, no external can access it to get proper information
 - you can try readout by overriding, this may end in a corrupted file due that action
 - solution: watch programs progress and forget about windows

good programmed routines work like this:
 - Copy-Program begin
 - progress read chunk(s)
 - progress write chunk(s)
 - progress update explorer.exe that it has written some more chunks to file
 - only in this situation you are able to get proper information
 - to force this situation, you need to disable all caches

I do somehow understand what you want, but this aint a coding snack, this a real full application with alot of user specific wishes that you are talking about.

Free coders like me scare all your wishes and specifications away.

There is a free "Lite" version, for comparison:
My eyes show me "Lite version Cost per user: $19.95"

there is no difference between full and trial version. The trial version will stop working after a few days but while it does it is full power. However here I'm not trying to sell a program, just to get beta testers!

Here is the beta direct download link: https://www.zabkat.c...krule_setup_beta.exe
Thankyou for clarify.

N.A.N.Y. 2019 / Re: NANY 2019 - DblEscClose
« on: December 03, 2018, 02:53 PM »
We can private talk to avoid code become public else i should need to know how you "minimize/close" a external.
Just the last step where the actual "minimize/close" happen, not all things that you do before/after.
That way i can hopefully reproduce what you do and what info you do use so i could show you how to get proper process.exe name for it.

That i can offer you.

So if you have an idea for a small program you'd like to see coded, now might be a good time to visit the Coding Snacks section of the forum and make a request.  And if you find yourself bored at 2am just choose the Chat option from the Help menu on the website and join the late night crew for some meandering chit chat.

Thanks for the flowers and I highly second that, true  :-* :-* :-*

Great Newsletter  :Thmbsup:, thats my todays bedtime story  :P

Hello there, I do not find information about changes "Trial Version vs Full Version"

What is difference, can you tell please?

N.A.N.Y. 2019 / Re: NANY 2019 - DblEscClose
« on: December 03, 2018, 12:46 PM »
I guess you and me thought in different directions, what I meant is pretty easy to implement (at least in my delphi language, whats yours?), a simple listbox where all current running processes are listed, like TaskMgr.exe does but simplified to .exe name. I hope this was more understandable.
And the current editbox where i can enter "ClassName" would just get a new label like ".exe Name"

There no need to do "where is mouse / under what control / wich handle etc etc etc" action.

I guess we do differ programm such things at all.
My way would be that: (just as a suggestion)
collect all running processes
enumerate all handles and compare them with processes (this way a few hundret handles are sieved and only the good ones remain)
at that point i would have valid handle for mainthread, classname for mainthread and pid collected.
with all three informations together, there is everything possible you need, like window-title, child windows, process-memory and and and =)
with the pid i would realize minimize/send close message command

If you need, I could show you as Delphi code by just using WinApi (what should be valid to all languages)
Since that said, it awoke my interest and i start code a small demo :-)
Code would contain function like "HandleToPID" and "PIDToHandle" stuff, that way all can be easy converted for proper usage like MSDN suggest.

You already done a cool job, I just can repeat myself  :Thmbsup:

And if I sound rough pardon me, take this just as a suggestion not as a "do like i say" :-*

N.A.N.Y. 2019 / Re: NANY 2019 - DblEscClose
« on: December 03, 2018, 08:31 AM »
Another idea, add "Auto-Start-At-Boot" option, to have it automatic loaded when windows starts.

Exclusion-List, there i would suggest a major-change what better fit to that function:
instead of classname/window-title, please switch to a process-selector, that would help for games (and others) much more!
(ie: Enter exe-Name and Select Process as option replacement for the [Add] popup-menu.)



and thank you for continue updating/fixing it, i like your way of how-to-get classname.

TotalCommander watches in realtime all changes.
The problem is how windows works or better how you application that write something work.

The filesystem will get a notification message to update explorer (and others) just after a file is written / the application that do writing have to close the filehandle. Some applications send several messages to explorer after they wrote a block of data.

The standard would be:
When an application create a file to write something, and pumps in data, all is done in your windows and hdd cache.
If you want to see every little change in realtime you should disable all caches.
You will notice that your hdd activity will increase by a lot of more disk reading and writing.
All become slower due to this but you will be able to see in realtime how a file grow.

N.A.N.Y. 2019 / Re: NANY 2019 - DblEscClose
« on: December 02, 2018, 02:24 PM »
Hello again, i've downloaded your latest Build and have to say, that what i've asked for - you done brilliant (add minimize option)

I do like this tiny tool, thank you for sharing it!

Pages: [1] 2 3 4 5 6 ... 15next