 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
GeeSoft Guest
|
Posted: Tue Oct 20, 2009 10:21 pm Post subject: Question - Dual instance of Dock script? |
|
|
Hi, Great Script, I've been looking a long while and just found this.
Please can you help though. I need to resolve the issue below to be able to use this for work.
I want to be able to have e.g a Putty window running with a dock(with short cut commands), I then want to open another Putty window with the same dock? I also want then to switch between the 2 or more open Putty windows and have a dock each time.
I can't see how to do this.
Can anyone help please.
Many Thanks
Geesoft |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 561 Location: Galil, Israel
|
Posted: Tue Oct 20, 2009 10:39 pm Post subject: |
|
|
something like this:
Dock_ShutDown() to take off window 1
Dock_HostID := WinExist( var_with_title_orahk_id_ofwin2 )
Dock( hWnd_your_gui, "xy dock string here" ) ;
if this makes sense. _________________ Joyce Jamce |
|
| Back to top |
|
 |
Geesoft Guest
|
Posted: Tue Oct 20, 2009 10:57 pm Post subject: Thanks Joy2DWorld |
|
|
WOW
Thanks for the quick reply...
I'm very new to this sorry..
Just to try and get my head round this I have this as a test:-
My first try with the Notepad button won't run it just reports an instance is already running, if I say yes to replace the new window has the dock but when I go back to the original window it's gone.
Where would the "Dock_ShutDown" "WinExist" go? also is the WinExist the "anh_pid"?
Again sorry but I'm very new to this.
Thanks
GeeSoft
===============================================
#NoTrayIcon
Run notepad,,,nPID
WinWait ahk_pid %nPID%
Dock_HostID := WinExist("ahk_pid " . nPID)
Gui +LastFound -Caption +ToolWindow +Border
Gui Add, Text,,Docked Window
Gui, Add, Button, x32 y92 w90 h40 , Notepad
Gui, Add, Button, x32 y165 w80 h30, My Windows
Gui Show
Dock(WinExist(), "0,-1,0, 0,0,0, 0,150, 5,0") ; above, left, fixed width
return
ButtonNotepad:
Run, c:\Program Files\Utils\AutoHotkey\Extras\Scripts\Dock\Notepad-test-dock-2.ahk
Return
ButtonMyWindows:
msgbox, %A_OSVersion%
Return
#include c:\Program Files\Utils\AutoHotkey\Extras\Scripts\Dock\Dock.ahk
============================================ |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 561 Location: Galil, Israel
|
Posted: Tue Oct 20, 2009 11:55 pm Post subject: |
|
|
dude/dudette,
register, post as a user. Good 1st step. If not worth *your* effort to do that, sure not worth my effort to reply. _________________ Joyce Jamce |
|
| Back to top |
|
 |
GeeSoft
Joined: 21 Oct 2009 Posts: 2 Location: London, UK
|
Posted: Wed Oct 21, 2009 11:59 am Post subject: Sorry Joy2DWorld |
|
|
Sorry
In my haste to get something working I forgot my manners.
As per my prev post I need to be able to open multiple windows all when I give them focus to have a "dock".
From the previous post it looks like it can but could you give me or direct me to an "idiots" guide to getting this working.
Many Thanks
GeeSoft |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 561 Location: Galil, Israel
|
Posted: Wed Oct 21, 2009 4:48 pm Post subject: |
|
|
and how do you think you could do that conceptually ? _________________ Joyce Jamce |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Wed Oct 21, 2009 5:24 pm Post subject: |
|
|
I have implementation of Dock mod that seems like something you want.
MultipleHosts are supported. In my app I have single dock client (4th button in tittle bar). TittleButton jumps to new host as soon as it takes focus.
Instead of Dock_HostId there is Dock_IsHost(Hwnd) function that u implement.
Is that what you need ?
In any way, I am planning to work on new version of Dock (Dock 2.0) as next thing when I get free time. If this is not urgent stuff, Ill probably make such feature in next release.
If you use only AHK hosts for your stuff, you should check DockA function which supports multiple hosts. _________________
 |
|
| Back to top |
|
 |
GeeSoft
Joined: 21 Oct 2009 Posts: 2 Location: London, UK
|
Posted: Wed Oct 21, 2009 7:04 pm Post subject: Thanks majkinetor |
|
|
Hi majkinetor,
Thanks for the reply.
I'm not sure if that will do what I'm after,
Do you have any example code I could look at to try to learn please?
Regards
GeeSoft |
|
| Back to top |
|
 |
TodWulff
Joined: 29 Dec 2007 Posts: 139
|
Posted: Mon Oct 26, 2009 10:37 pm Post subject: |
|
|
| majkinetor wrote: | ...
MultipleHosts are supported. In my app I have single dock client (4th button in tittle bar). TittleButton jumps to new host as soon as it takes focus.
...
Is that what you need ?
...
|
It will possibly help me with my endeavors.
If you'd be so kind to post up a link to it, I'd appreciate it.
TIA
-t _________________ When replying, please feel free to address me as Tod. My AHK.net site... |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Tue Oct 27, 2009 8:46 am Post subject: |
|
|
Its difficult to extract it from my code atm.
I plan to update this module so Ill take this into account. _________________
 |
|
| Back to top |
|
 |
doyle
Joined: 14 Nov 2007 Posts: 325 Location: London, England
|
Posted: Tue Oct 27, 2009 10:20 am Post subject: |
|
|
Thanks majkinetor.
I would also find this very helpful.
Your dock function is one of the most useful, and exciting functions I have seen.
I would also like proper support for multiple instances. |
|
| Back to top |
|
 |
Brabus Guest
|
Posted: Sat Feb 13, 2010 9:10 am Post subject: |
|
|
Can the Host be kept in front of the Client ?..all the time?
if Client is bigger then the Host and center on it, then any click on Client will hide the Host |
|
| Back to top |
|
 |
Brabus Guest
|
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4511 Location: Belgrade
|
Posted: Sat Feb 13, 2010 10:16 am Post subject: |
|
|
Yes, use 2.0b3 version and topmost clients with T parameter. _________________
 |
|
| Back to top |
|
 |
Brabus Guest
|
Posted: Sat Feb 13, 2010 10:50 am Post subject: |
|
|
Works very, very good, thank you my friend!
 |
|
| 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
|