AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Tips N Tricks] How to set a 'Tiled background' for GUI ?
Goto page Previous  1, 2, 3 ... 26, 27, 28 ... 31, 32, 33  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Username is taken
Guest





PostPosted: Tue Jul 28, 2009 10:08 pm    Post subject: Reply with quote

Nice
Back to top
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Tue Aug 11, 2009 6:47 pm    Post subject: Reply with quote

SKAN wrote:
Quote:
How to Simulate a Linear Gradient ? - Part 1 & 2
http://www.autohotkey.com/forum/viewtopic.php?p=61081#61081


HOLY CRAP MIND FRIGGIN BLOWING!!!!!

Thanks for this
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
howardb1
Guest





PostPosted: Sat Aug 22, 2009 6:40 am    Post subject: How do you hWnd out of the shellhook structure? Reply with quote

I don't know if you're still working on this AutoHotKey trick or not, but if you are ...

You say "The shell receives HSHELL_GETMINRECT ( with a shellhook structure ) whenever a window is being Minimised/Maximised. A script may monitor it to Minimize a window to the tray." In the code I'm writing based on your techique I just need the hWnd member, but it isn't clear how you access it?

My script hides the taskbar before opening a program, but I want to restore the taskbar when the program exits, or when it is minimized or looses focus. In the last two cases I'll then hide the taskbar when the program becomes active again.

I've written the exit part, and am now working on the minimize part, but I don't see an event message that tells me when the window is loosing focus, only when it gets it back.

Thank you.
Back to top
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Wed Aug 26, 2009 6:27 am    Post subject: Re: How do you hWnd out of the shellhook structure? Reply with quote

howardb1 wrote:
You say "The shell receives HSHELL_GETMINRECT ( with a shellhook structure ) whenever a window is being Minimised/Maximised. A script may monitor it to Minimize a window to the tray."


I was using Window 98 while I was experimenting.. and then I shifted My OS to 2k and currently using XP.
I can safely say HSHELL_GETMINRECT is very unpredictable in different OSes.
( If it works at all and ) If you are to use it only on your system, you are lucky. Otherwise, I do not recommend SHELLHOOK to monitor Maximize/Minimize events.
Back to top
View user's profile Send private message Send e-mail
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Mon Sep 07, 2009 9:04 am    Post subject: Reply with quote

Does anybody have problems with Shell hook and activation ?

I don't receive notifications on Vista. For instance, here is the output of SKANs utuility where different windows were activated:



Code:
UNKNOWN  [32772]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x3f0184
Title   : EditPlus [_Taskbar] - [D:\Utils\_Scripts\autohotkey\Shell\1.ahk]
Class   : Afx:400000:8:10003:0:58044f

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x1e0118
Title   : Total Commander 7.04a
Class   : TTOTAL_CMD

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x3f0184
Title   : EditPlus [_Taskbar] - [D:\Utils\_Scripts\autohotkey\Shell\1.ahk]
Class   : Afx:400000:8:10003:0:58044f

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x3f0184
Title   : EditPlus [_Taskbar] - [D:\Utils\_Scripts\autohotkey\Shell\1.ahk]
Class   : Afx:400000:8:10003:0:58044f

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x1e0118
Title   : Total Commander 7.04a
Class   : TTOTAL_CMD

UNKNOWN  [32772]

hWnd   : 0x2a8051e
Title   : Tips N Tricks - Opera
Class   : OpWindow

UNKNOWN  [32772]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x2a8051e
Title   : Tips N Tricks - Opera
Class   : OpWindow

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x1e0118
Title   : Total Commander 7.04a
Class   : TTOTAL_CMD

HSHELL_SYSMENU  [9]

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

HSHELL_WINDOWDESTROYED  [2]

hWnd   : 0x0
Title   :
Class   :

HSHELL_REDRAW  [6]

hWnd   : 0x0
Title   :
Class   :

UNKNOWN  [32772]

hWnd   : 0x0
Title   :
Class   :

_________________
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Tue Sep 08, 2009 8:34 am    Post subject: Reply with quote

Activation definitely doesn't work correctly. The same code works on XP and doesn't work on VISTA, and sometimes it even stops working in XP.
_________________
Back to top
View user's profile Send private message
jjjames



Joined: 09 Aug 2009
Posts: 35

PostPosted: Thu Sep 24, 2009 6:18 am    Post subject: Reply with quote

Can't get "Always At Bottom" working. To me it seems just like any regular GUI window and isn't "stuck" below everything else. I downloaded your clock sample and it's not always at bottom.

Does the script need an update?

thanks anyhow...lot's of VERY useful scripts!
Back to top
View user's profile Send private message
Randallfanon
Guest





PostPosted: Thu Nov 12, 2009 7:28 pm    Post subject: Reply with quote

[quote="SKAN"]
Quote:
How to manipulate Binary data with Pointers ?


I didn't even know AHK had pointers... this thread is epic in an extreme way.

THANK YOU
Back to top
randallf



Joined: 06 Jul 2009
Posts: 678

PostPosted: Thu Nov 12, 2009 7:31 pm    Post subject: Reply with quote

On a related note C is very powerful in pointers but the data type requirements are annoying... I'm not sure how AHK handles those inherent restrictions but it's pretty epic to just be able to define an actual string and then run pointers through it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Do these techniques potentially allow AHK to read from crazy data structures like MP3 or what have you?
Back to top
View user's profile Send private message
Michael@Oz



Joined: 08 Nov 2009
Posts: 233
Location: Canberra Oz

PostPosted: Tue Mar 09, 2010 4:12 am    Post subject: Reply with quote

Quote:
How to Refresh " Icons Display " in System Tray ?
http://www.autohotkey.com/forum/viewtopic.php?p=55641#55641


See TrayIcon_Cleanup() for nicer way. (Tested on XP, prob not OK on Win7)
Back to top
View user's profile Send private message
zhuluobin



Joined: 11 May 2009
Posts: 28

PostPosted: Thu Apr 29, 2010 1:36 pm    Post subject: Reply with quote

i used shellhook code but while i right clicked 'my computer' on start menu to open 'system properties' i received nothing.
Back to top
View user's profile Send private message
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Thu Apr 29, 2010 2:40 pm    Post subject: Reply with quote

majkinetor wrote:
Does anybody have problems with Shell hook and activation ?
Yes here!

I'm glad its not just me thats having shell notification problems.
I thought I wasnt feeding the proper hWnd or something.

In some cases even normal Windows Messages are not detected with OnMessage.
I think there has to be a more robust method for using a given handle Confused ..


majkinetor wrote:
here is the output of SKANs utuility
Where to find it plz?
Oh, its Shell Spy.. Got it Smile

Ok so it looks like the hook method only works on toplevel windows.

There must be a way to hook all window and even control handles!
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 8688

PostPosted: Thu Apr 29, 2010 4:19 pm    Post subject: Reply with quote

zhuluobin wrote:
i used shellhook code but while i right clicked 'my computer' on start menu to open 'system properties' i received nothing.


TLM wrote:
it looks like the hook method only works on toplevel windows.


SHELLHOOK works only on toplevel windows. The OS messages the Shell whenever a window is created/destroyed so that taskbar can update its buttons.
For windows which do not have a taskbar button, the messages will not be sent, which makes sense.

With SHELLHOOK method, we merely intercept the messages without much load on the system resources.

TLM wrote:
There must be a way to hook all window and even control handles!


Try WinEventHook Messages by Serenity


Last edited by SKAN on Sat May 01, 2010 3:08 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
TLM



Joined: 21 Aug 2006
Posts: 2926
Location: The Shell

PostPosted: Thu Apr 29, 2010 4:46 pm    Post subject: Reply with quote

SKAN wrote:
For windows which do not have a taskbar button, the messages will not be sent, which makes sense.
Explained that way, it absolutly does make sense!

thnx for the WinEventHook link Mr. Green
_________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 3113
Location: MN, USA

PostPosted: Wed May 19, 2010 9:15 pm    Post subject: Reply with quote

SKAN wrote:
How to Disable ( Grey-out ) the Close Button?

...

Feedback please!
I'd like to use this tip to stop myself from accidentally closing the Task Manager. I like to keep it running in the tray for the real-time CPU usage graph. This works:
Code:
Run, taskmgr.exe,,,PID
WinWait, ahk_pid %PID%
DisableCloseButton(WinExist())
WinMinimize

DisableCloseButton(hWnd) {
 hSysMenu:=DllCall("GetSystemMenu","Int",hWnd,"Int",FALSE)
 nCnt:=DllCall("GetMenuItemCount","Int",hSysMenu)
 DllCall("RemoveMenu","Int",hSysMenu,"UInt",nCnt-1,"Uint","0x400")
 DllCall("RemoveMenu","Int",hSysMenu,"UInt",nCnt-2,"Uint","0x400")
 DllCall("DrawMenuBar","Int",hWnd)
}
...however, I'd like to not have to flash the window open just to get its handle. Any thoughts?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 26, 27, 28 ... 31, 32, 33  Next
Page 27 of 33

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group