i decided at least to try to lower my heavy dependence on the Actual Window Manager program (my version was released in march-2012)
(at this forum) there were some explanations recently: first link, second link
probably, someday i will post a similar topic at the ahk-forum
it should be noted again that the idea is very complex
and seemingly, it's not realizable wholly (if we speak about all awm-features that i use)
generally, the aim is to completely forget about awm (by substituting it with the numerous small/medium ahk-codes)
but currently, there should be just some start
first of all, i would like to know the opinions (get some useful technical advices) of those people who have substantial knowledge about ahk
(it's better if they also know what awm is, and what its vast possibilities are)
maybe the ahk-help contains some necessary info (in particular, at the List of Windows Messages page)
the above-mentioned first link enumerates many typical needs (features of awm)
(that link is related to my awm-rules which deal with the et program, and with its 2 sub-windows: advanced search, organize bookmarks)
those 3 et-related cases/rules are described in a very detailed form (nearly as much as possible)
as a whole, my awm-setup has circa 90 window rules. 4 of them are about et only
including the relatively new 'index journal' window rule. it contains not so many settings added by me:
1. (target window) window class: #32770
2. (target window) window caption: Index Journal (substring match: yes) (exact match: no) (regular expression: no)
3. (target window) program: \Everything.exe
4. (at window startup) resize: 1897x898
5. (at window startup) align: top-left, horizontal shift - 0, vertical shift - 321
6. (at window startup) stay always on top: always
7. (at window startup) run keyboard macro: <Tab><Win+End> (delay before running: 0,1s) (Win+End means just End here: it's a work around)
8. (at window startup) the super-important block premature appearance of window option: yes
this option's tool-tip says: delay window's appearance until all startup actions which affect window's look
(such as align, resize, move to monitor) are applied
to prevent the unwanted 'window jumping' effect
9. (size) resize window automatically: at startup to: width - 1897, height - 898
10. (title buttons) stay always on top: yes (17 other actions: no)
(via an ahk-code) how to achieve the same functionality (items 1-10) for the 'index journal' window?
AHK, Actual Window Manager, Everything
-
- Posts: 214
- Joined: Mon Jan 09, 2012 10:56 am
Re: AHK, Actual Window Manager, Everything
i managed to get some patterns working
these patterns/examples may become useful in my further attempts (described in the previous message) to migrate from awm to ahk
example 1 (works):
after i press the q button, the Character Map window appears (hidden)
then it successfully receives my command (the window is still in a hidden state)
and only after that the window becomes visible
example 2 (works):
2 various windows/programs (Character Map and WinSpy) successfully receive my different commands
(it automatically happens after those windows appear: i don't need to press any button)
example 3 (nearly identical to example 2) (doesn't work):
the u-torrent program has its main window (which is present in taskbar) (the caption is µTorrent 1.6.1), and its Add New Torrent sub-window (which only appears from time to time) (it is always absent in taskbar) (the caption is Add New Torrent)
but this approach doesn't work (the Character Map part works, the Add New Torrent part doesn't)
(if i disable my corresponding rules in the awm program, then the issue persists)
i may be wrong but it seems that the ahk code cannot recognize this Add New Torrent sub-window because it's not a part of taskbar
but most likely, the solution should exist. do you have any ideas?
these patterns/examples may become useful in my further attempts (described in the previous message) to migrate from awm to ahk
example 1 (works):
Code: Select all
DetectHiddenWindows, On
q::
Run C:\WINDOWS\system32\charmap.exe,,HIDE,PID
WinWaitActive, ahk_class MyDlgClass ahk_exe charmap.exe
send {tab 3}
WinShow ahk_class MyDlgClass ahk_pid %PID%
return
then it successfully receives my command (the window is still in a hidden state)
and only after that the window becomes visible
example 2 (works):
Code: Select all
#Persistent
SetBatchLines, -1
SetWinDelay, -1
Gui +LastFound
hWnd := WinExist()
DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
return
ShellMessage( wParam,lParam )
{
if ( wParam = 1 ) ; HSHELL_WINDOWCREATED := 1
{
WinGetTitle, title, ahk_id %lParam%
if ( title = "Character Map" )
{
sleep 1000
send {tab 3}
}
if ( title = "WinSpy" )
{
sleep 2000
send {tab 4}
}
}
}
(it automatically happens after those windows appear: i don't need to press any button)
example 3 (nearly identical to example 2) (doesn't work):
Code: Select all
#Persistent
SetBatchLines, -1
SetWinDelay, -1
Gui +LastFound
hWnd := WinExist()
DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
return
ShellMessage( wParam,lParam )
{
if ( wParam = 1 ) ; HSHELL_WINDOWCREATED := 1
{
WinGetTitle, title, ahk_id %lParam%
if ( title = "Add New Torrent" )
{
sleep 2000
send {tab}
}
if ( title = "Character Map" )
{
sleep 1000
send {tab 3}
}
}
}
but this approach doesn't work (the Character Map part works, the Add New Torrent part doesn't)
(if i disable my corresponding rules in the awm program, then the issue persists)
i may be wrong but it seems that the ahk code cannot recognize this Add New Torrent sub-window because it's not a part of taskbar
but most likely, the solution should exist. do you have any ideas?
Re: AHK, Actual Window Manager, Everything
did you post in the AHK forum, i suspect you might get more traction there?
Re: AHK, Actual Window Manager, Everything
See this subforum, do some searches in it & its subforums
https://www.autohotkey.com/boards/viewforum.php?f=4
https://www.autohotkey.com/boards/viewforum.php?f=4
-
- Posts: 214
- Joined: Mon Jan 09, 2012 10:56 am
Re: AHK, Actual Window Manager, Everything
AHK forum is very indifferent
fresh example
fresh example
Re: AHK, Actual Window Manager, Everything
LOL, well, it certainly looks like you've been dogged/persistent, best of luck!
Re: AHK, Actual Window Manager, Everything
Hi Adamantine, I randomly came across this post and also read the stuff you linked to on AHK forum. I was annoyed at the lack of response you received over there and decided to create an account here to let you know I might be able to assist. I run a similar workflow of custom window placement along with taskbar hiding/removal and also have source code for both.
-
- Posts: 214
- Joined: Mon Jan 09, 2012 10:56 am
Re: AHK, Actual Window Manager, Everything
- thank you for your kind wordsto let you know I might be able to assist
- i hope that we'll manage to do something useful in that ahk-topic
Re: AHK, Actual Window Manager, Everything
Thanks for sharing here; I will follow you both with curiosity/interest in the ahk thread!