Skip to content

Commit

Permalink
v1.4.3 - Win10 support, autoscroll down fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
joedf committed Jan 22, 2017
1 parent 798c005 commit 1d14ae3
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.exe
*_settings.ini
*.lnk
*.dll
*.dll
*.zip
45 changes: 36 additions & 9 deletions Qonsole.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
if A_OSVersion in WIN_2003,WIN_XP,WIN_2000,WIN_NT4,WIN_95,WIN_98,WIN_ME ; Note: No spaces around commas.
XPMode:=1
else
{
XPMode:=0
;////// Windows 10+ patch ///////
if A_OSVersion in WIN_7,WIN_8,WIN_8.1,WIN_VISTA
WinTenPlus := 0
else
WinTenPlus := 2
}
;///////////////////////// [ XP Patch ] /////////////////////////

#Include LibCon-minXP.ahk
Expand Down Expand Up @@ -82,8 +89,8 @@

;####################################################
AppName:="Qonsole"
Version:="1.4.2"
App_date:="2016/03/01"
Version:="1.4.3"
App_date:="2017/01/21"
Update_URL:="http://qonsole-ahk.sourceforge.net/update.ini"
Project_URL:="http://qonsole-ahk.sourceforge.net"

Expand Down Expand Up @@ -245,6 +252,12 @@ return
return
*/

#IfWinActive, ahk_group Console_Classes
~Enter::
Console_ScrollBottom(con)
return
#IfWinActive

showC:
if (!WinExist(con)) {
open:=0
Expand Down Expand Up @@ -446,7 +459,7 @@ showC:
WinActivate,%con%

_tx:=((HorizontallyCentered) ? ((cmd_w_fix<A_ScreenWidth) ? abs((A_ScreenWidth-cmd_w_fix)/2) : 0) : 0) +((Console_2_Mode) ? 0 : -2)
_ty:=((BottomPlaced) ? ((xC_height<A_ScreenHeight) ? abs(A_ScreenHeight-xC_height) : 0) : ((Console_2_Mode) ? 0 : -2))
_ty:=((BottomPlaced) ? ((xC_height<A_ScreenHeight) ? abs(A_ScreenHeight-xC_height+( (WinTenPlus!=0) ? 16 : 0 )) : 0) : ((Console_2_Mode) ? 0 : -2))
WinMove,%con%,,_tx, _ty

;///////////////////////// [ XP Patch ] /////////////////////////
Expand All @@ -471,9 +484,9 @@ showC:

winfade("ahk_id " hGuiBGDarken,GuiBGDarken_Max,GuiBGDarken_Increment) ;fade in
if (BottomPlaced)
WinSlideUpExp(Con,Delay,speed,A_ScreenHeight-xC_height,dx)
WinSlideUpExp(Con,Delay,speed,(A_ScreenHeight-xC_height)+( (WinTenPlus!=0) ? 16 : 0 ),dx)
else
WinSlideDownExp(Con,Delay,speed, (0+(Console_2_Mode) ? 0 : -2),dx)
WinSlideDownExp(Con,Delay,speed, (0+(Console_2_Mode) ? 0 : (-2+WinTenPlus) ),dx)
;WinSlideDown(Con,speed,Delay,(0+(Console_2_Mode) ? 0 : -2) )
}
;///////////////////////// [ XP Patch ] /////////////////////////
Expand All @@ -492,7 +505,7 @@ showC:
WinActivate,%con%

_tx:=((HorizontallyCentered) ? ((cmd_w_fix<A_ScreenWidth) ? abs((A_ScreenWidth-cmd_w_fix)/2) : 0) : 0) +((Console_2_Mode) ? 0 : -2)
_ty:=((BottomPlaced) ? ((xC_height<A_ScreenHeight) ? abs(A_ScreenHeight-xC_height) : 0) : ((Console_2_Mode) ? 0 : -2))
_ty:=((BottomPlaced) ? ((xC_height<A_ScreenHeight) ? abs(A_ScreenHeight-xC_height+( (WinTenPlus!=0) ? 16 : 0 )) : 0) : ((Console_2_Mode) ? 0 : -2))
WinMove,%con%,,_tx, ;_ty

;///////////////////////// [ XP Patch ] /////////////////////////
Expand All @@ -516,9 +529,11 @@ showC:

;when qonsole is at the bottom, the action to hide it is the same as to show it when we're at the top, which is to slide it upward
if (BottomPlaced)
WinSlideUpExp(Con,Delay,speed,A_ScreenHeight-xC_height,dx)
{
WinSlideUpExp(Con,Delay,speed,(A_ScreenHeight-xC_height)+( (WinTenPlus!=0) ? 16 : 0 ),dx)
}
else
WinSlideDownExp(Con,Delay,speed, (0+(Console_2_Mode) ? 0 : -2),dx)
WinSlideDownExp(Con,Delay,speed, (0+(Console_2_Mode) ? 0 : (-2+WinTenPlus) ),dx)
}
;///////////////////////// [ XP Patch ] /////////////////////////
}
Expand Down Expand Up @@ -1211,7 +1226,15 @@ WindowDesign(WindowHWND) {
}
else
{
WinSet, Region, %x%-%y% w%RectX% h%RectY%, ahk_id %WindowHWND%
if A_OSVersion in WIN_7,WIN_8,WIN_8.1,WIN_VISTA
WinSet, Region, %x%-%y% w%RectX% h%RectY%, ahk_id %WindowHWND%
else
{ ; Windows 10+
global WinTenPlus
RectX += WinTenPlus
RectY += WinTenPlus
WinSet, Region, 0-0 w%RectX% h%RectY%, ahk_id %WindowHWND%
}
}
;///////////////////////// [ XP Patch ] /////////////////////////

Expand Down Expand Up @@ -1347,3 +1370,7 @@ SetEditPlaceholder(control, string, showalways = 0){
DllCall("SendMessageW", "UInt", control, "UInt", 0x1501, "UInt", showalways, "UInt", &wstring)
return
}

Console_ScrollBottom(chwnd){
ControlSend,,{End},ahk_id %chwnd%
}
2 changes: 1 addition & 1 deletion update.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[Update]
Version=1.4.2
Version=1.4.3
URL=https://github.com/joedf/Qonsole/releases/latest
10 changes: 5 additions & 5 deletions version_info.rc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
1 VERSIONINFO
FILEVERSION 1,4,2,0
PRODUCTVERSION 1,4,2,0
FILEVERSION 1,4,3,0
PRODUCTVERSION 1,4,3,0
FILEOS 0x4
FILETYPE 0x1
{
Expand All @@ -9,12 +9,12 @@ BLOCK "StringFileInfo"
BLOCK "040904B0"
{
VALUE "FileDescription", "Qonsole - Quake-like Console Emulator"
VALUE "FileVersion", "1.4.2"
VALUE "FileVersion", "1.4.3"
VALUE "InternalName", "Qonsole"
VALUE "LegalCopyright", "(C) 2016, joedf@ahkscript.org"
VALUE "LegalCopyright", "(C) 2017, joedf@ahkscript.org"
VALUE "OriginalFilename", "Qonsole.exe"
VALUE "ProductName", "Qonsole"
VALUE "ProductVersion", "1.4.2"
VALUE "ProductVersion", "1.4.3"
}
}

Expand Down

0 comments on commit 1d14ae3

Please sign in to comment.