AutoHotkey Community

It is currently May 27th, 2012, 5:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 352 posts ]  Go to page Previous  1 ... 20, 21, 22, 23, 24  Next
Author Message
 Post subject:
PostPosted: February 27th, 2010, 4:36 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
All my modules are included at the end. Thats not going to change.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 4:48 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
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! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 27th, 2010, 3:28 pm 
just to be clear, according to your license, i cannot use this function in a commercial program?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 27th, 2010, 7:46 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 29th, 2010, 8:06 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 30th, 2010, 11:05 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 23rd, 2010, 8:00 pm 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2010, 1:02 pm 
Offline

Joined: October 13th, 2009, 10:09 pm
Posts: 1389
That would probably be an option.
Right now I'm doing the positioning and showing/hiding of my guis manually.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2010, 6:55 pm 
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



Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2011, 5:00 pm 
Offline

Joined: December 30th, 2010, 9:50 am
Posts: 15
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 ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 4th, 2011, 6:23 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Your example works here as it should. Probably a version problem. Which one do you have ?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 5th, 2011, 10:05 am 
Offline

Joined: December 30th, 2010, 9:50 am
Posts: 15
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 ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 5th, 2011, 10:48 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 5th, 2011, 4:43 pm 
Offline

Joined: December 30th, 2010, 9:50 am
Posts: 15
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 ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 5th, 2011, 6:07 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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 ?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 352 posts ]  Go to page Previous  1 ... 20, 21, 22, 23, 24  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Google Feedfetcher, JamixZol, rbrtryn and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group