 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Sat Feb 27, 2010 3:36 pm Post subject: |
|
|
All my modules are included at the end. Thats not going to change. _________________
 |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
Posted: Sat Feb 27, 2010 3:48 pm Post subject: |
|
|
Do you expect problems if the subroutines are inside the from calling function? If it works, then the module would not affect the AutoExecution section. SetTimer calls subs inside same function also. or I am wrong?? _________________ {1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <-- |
|
| Back to top |
|
 |
guest3456 Guest
|
Posted: Sat Mar 27, 2010 2:28 pm Post subject: |
|
|
| just to be clear, according to your license, i cannot use this function in a commercial program? |
|
| Back to top |
|
 |
majkinetor ! Guest
|
Posted: Sat Mar 27, 2010 6:46 pm Post subject: |
|
|
| According to the licence you can't, but go and use it anyway. I am switching many previously non-commercial modules to BSD, including Dock. |
|
| Back to top |
|
 |
fragman
Joined: 13 Oct 2009 Posts: 1199
|
Posted: Thu Apr 29, 2010 7:06 pm Post subject: |
|
|
The latest version is not working with Autohotkey_L (rev. 51), any idea what is needed to get it working?
I would really like to use it in my program to create tabs for explorer, but I rely on ahk_l for #if and objects. |
|
| Back to top |
|
 |
fragman
Joined: 13 Oct 2009 Posts: 1199
|
Posted: Fri Apr 30, 2010 10:05 pm Post subject: |
|
|
I found the reason, it is because [ and ] are no longer allowed in variable names. Removing those characters makes it work.
Edit: One more thing, I would also really like to see being able to use multiple hosts, I really look forward to that. For now, I'm just going to show it for the active window only, but it would be cool if one could do it for any window.
One more edit:
I'm noticing a couple of problems.
I want to show a gui over explorer titlebars, so that it always shows up on active explorer. To do that, I registered a shell hook and set Dock_HostId to the active explorer window. This works somewhat fine if 2 explorers are visible and I click on one of them. I have put "T" in the toggle options to keep it on top of the explorer window, but it doesn't work with windows apart from the one where it was first created. On other windows it will be behind the window.
Also, when I minimize a window, and another explorer window becomes active, it isn't updated, even though my call to Dock_Update is executed.
Please keep in mind that I had to remove every [ and ] to make it work in AHK_L. Not sure if this could cause any of those problems. |
|
| Back to top |
|
 |
guest3456 Guest
|
Posted: Thu Sep 23, 2010 7:00 pm Post subject: |
|
|
| fragman wrote: |
Edit: One more thing, I would also really like to see being able to use multiple hosts, I really look forward to that. |
does anyone have any workarounds for this? like maybe a master script that will call child scripts to allow multiple docking hosts? |
|
| Back to top |
|
 |
fragman
Joined: 13 Oct 2009 Posts: 1199
|
Posted: Fri Sep 24, 2010 12:02 pm Post subject: |
|
|
That would probably be an option.
Right now I'm doing the positioning and showing/hiding of my guis manually. |
|
| Back to top |
|
 |
guest3456 Guest
|
Posted: Fri Sep 24, 2010 5:55 pm Post subject: |
|
|
| guest3456 wrote: | | fragman wrote: |
Edit: One more thing, I would also really like to see being able to use multiple hosts, I really look forward to that. |
does anyone have any workarounds for this? like maybe a master script that will call child scripts to allow multiple docking hosts? |
i hacked this together today. dock to multiple hosts, host is whichever window your mouse is over. mouse over window press F2
| Code: |
#NoEnv
SetWorkingDir %A_ScriptDir%
f2::
mousegetpos,,,win
filename := "dock_" . win . ".ahk"
code := "DetectHiddenWindows, on `n"
code .= "SetBatchLines, -1 `n"
code .= "#SingleInstance, force `n"
code .= "OnExit, ExitSub `n`n"
code .= "Dock_HostID := " . win . "`n`n"
code .= "Gui, +LastFound -Caption +ToolWindow +Border `n"
code .= "myguihwnd := WinExist() + 0 `n"
code .= "Gui, Add, Text,, myGUI `n`n"
code .= "Dock(myguihwnd, ""x(1,,10) y() w(,100) h(,300) t"") `n"
code .= "return `n`n"
code .= "ExitSub: `n"
code .= "Dock_ShutDown() `n"
code .= "ExitApp `n"
code .= "return `n`n"
code .= "#include Dock.ahk `n"
FileDelete, %filename%
FileAppend, %code%, %filename%
Run, %filename%
return
|
|
|
| Back to top |
|
 |
Chance
Joined: 30 Dec 2010 Posts: 15
|
Posted: Tue Jan 04, 2011 4:00 pm Post subject: |
|
|
Hi majkinetor,
maybe I have don't understand how your script work, but here is my question. For illustration purpose, I will use the script wrote by doyle on the previous page :
| Code: |
#Persistent
SetBatchLines, -1
Process, Priority,, High
Gui +LastFound
hWnd := WinExist()
DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
Return
ShellMessage( wParam,lParam ) {
Global
If ( wParam = 1 ) ; HSHELL_WINDOWCREATED := 1
{
WinGetClass, class, ahk_id %lParam%
;MsgBox, %class%
If ( class = "Notepad" )
{
Dock_HostID := WinExist("ahk_id " . lParam)
;MsgBox, %Dock_HostID%
Gui, 5: Margin, 0, 0
Gui, 5: +LastFound +ToolWindow -Caption
Gui, 5: Add, Text,, just some text here
Gui, 5: Show, x200 y200
;Gui +LastFound +ToolWindow -Caption
; Gui, 1:Show, w1000 h28, Test
c1 := WinExist()
Dock(c1, "x(0,0,0) y(0,0,48) t")
}
}
}
#include Dock.ahk
Esc::
exitapp
return
|
So when the script is running and you open a notepad windows, it create a new gui which should be dock to the notepad window just opened. But as you can see if you try this script, when the notepad window is moved, the gui don't follow.
Is there a problem on the ahk script ?
Edit : in addition, the documentation says :
| Quote: |
Using dock module you can glue your or third-party windows to any top level window. |
Is it possible with your Dock.ahk script to glue a ahk windows on a third-party windows ? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Tue Jan 04, 2011 5:23 pm Post subject: |
|
|
Your example works here as it should. Probably a version problem. Which one do you have ? _________________
 |
|
| Back to top |
|
 |
Chance
Joined: 30 Dec 2010 Posts: 15
|
Posted: Wed Jan 05, 2011 9:05 am Post subject: |
|
|
Majkinetor, thanks for you reply.
I use the Dock.ahk script from the fisrt post of this discussion, the la st line of the script are :
| Code: |
; Group: About
; o Ver 1.0 by majkinetor. See http://www.autohotkey.com/forum/topic19400.html
; o Thank You's: Laszlo, JGR, Joy2World, bmcclure
; o Licenced under Creative Commons Attribution-Noncommercial <http://creativecommons.org/licenses/by-nc/3.0/>.
|
So it seems that I use the ver 1.0 of your script.
My Autohotkey version is v1.0.90.00 (seems to be the last version).
So you confirme that my example don't work correctly on my computer and normally when I move the notepad window, the gui must follow, right ? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Wed Jan 05, 2011 9:48 am Post subject: |
|
|
Your sample doesn't work because u use v1.0 and dock definition string for v2.0 (in v1.0 there were no x, y, w, h & t in the string, only numbers).
You should download v2.0b3 from History section and it will work. _________________
 |
|
| Back to top |
|
 |
Chance
Joined: 30 Dec 2010 Posts: 15
|
Posted: Wed Jan 05, 2011 3:43 pm Post subject: |
|
|
| majkinetor wrote: | Your sample doesn't work because u use v1.0 and dock definition string for v2.0 (in v1.0 there were no x, y, w, h & t in the string, only numbers).
You should download v2.0b3 from History section and it will work. |
I have made some test with the v2.0 b3 : still have the same problem
If I debug with :
| Code: |
Msg := Dock(c1, "x(1) y() t")
MsgBox, %Msg%
|
Thanks majkinetor for your support.
I have a OK message, so docking works, but the gui not foolow my notepad windows when i move it...
Other thing, the gui is located at x200 y200 on my screen, so it seems that it dock my gui on the desktop and not on the host window (notepad), so I remove the param. x200 y200 on the Gui, 5: Show, x200 y200 line, now the Gui appears on center of my screen, but still dock on the desktop and not on the notepad windows...
Any idea ? |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Wed Jan 05, 2011 5:07 pm Post subject: |
|
|
No idea, sorry, but its probably some error you make since its never reported before that this module doesn't work. Like I said, your code works here.
Do several samples that are provided in the archive work ? _________________
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|