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
Goto page Previous  1, 2, 3 ... 21, 22, 23, 24  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
ahklerner



Joined: 26 Jun 2006
Posts: 1205
Location: USA

PostPosted: Fri Sep 07, 2007 12:08 am    Post subject: Reply with quote

Skan wrote:
BoBoĻ wrote:
I owe you a लस्सी


Very Happy


yogurt drink?????????
(googled it)
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 5884

PostPosted: Fri Sep 07, 2007 8:59 am    Post subject: Reply with quote

Lassi is a Curd-shake ( like milk-shake ) with added flavour. Smile
Back to top
View user's profile Send private message
shader



Joined: 29 Oct 2004
Posts: 41

PostPosted: Sat Oct 13, 2007 6:47 pm    Post subject: Reply with quote

Hi Skan, I've found that you wrote:
Quote:
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.

How is supposed to detect when a window is being minimized or resized?? I cannot receive any HSHELL_GETMINRECT when minimizing/maximizing a window, only a HSHELL_WINDOWACTIVATED appears to the shell listener. What do you mean with "with a shellhook structure "? Any idea?. Thank you.
Back to top
View user's profile Send private message Send e-mail
SKAN



Joined: 26 Dec 2005
Posts: 5884

PostPosted: Sat Oct 13, 2007 11:05 pm    Post subject: Reply with quote

Quote:
Experiment 5:

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. Here is a working example:


Code:
Gui +LastFound
hWnd := WinExist()

DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )

Return ;                                                 // End of Auto-Execute Section //

ShellMessage( wParam,lParam ) {
  If ( wParam = 5 ) {                  ; HSHELL_GETMINRECT
     wID := NumGet( lParam+0 )         ; first member ( DWord ) of SHELLHOOKINFO structure is hWnd
     WinGet, mState, MinMax, ahk_id %wID%
     If ( mState = -1 ) { ; Window is being minimized
       WinGetTitle, Title, ahk_id %wID%
       TrayTip, Window was minimized!, %Title%
     }
  }
}


@shader: The above example code works for me. Let me know the status so I will update the original post.

Thanks. Smile

Edit:

Tested in:
Win XP SP2
Vista Home Premium


Last edited by SKAN on Mon Oct 15, 2007 2:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
shader



Joined: 29 Oct 2004
Posts: 41

PostPosted: Sun Oct 14, 2007 12:09 pm    Post subject: Reply with quote

Hi Skan, it doesnt work for me. OnMessage never return a 5 wParam message when minimized. I dont know why it doesnt return that message. Thanks.
Back to top
View user's profile Send private message Send e-mail
SKAN



Joined: 26 Dec 2005
Posts: 5884

PostPosted: Sun Oct 14, 2007 5:16 pm    Post subject: Reply with quote

What is your OS ? Rolling Eyes
Back to top
View user's profile Send private message
shader



Joined: 29 Oct 2004
Posts: 41

PostPosted: Sun Oct 14, 2007 6:25 pm    Post subject: Reply with quote

XP Pro SP2 spanish
Back to top
View user's profile Send private message Send e-mail
SKAN



Joined: 26 Dec 2005
Posts: 5884

PostPosted: Sun Oct 14, 2007 9:22 pm    Post subject: Reply with quote

I am unsure about this, but try replacing

DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )

with

DllCall( "RegisterWindowMessageW", Str,"SHELLHOOK" )

Rolling Eyes
Back to top
View user's profile Send private message
shader



Joined: 29 Oct 2004
Posts: 41

PostPosted: Sun Oct 14, 2007 11:40 pm    Post subject: Reply with quote

No, it doesnt work. I hope someone can tell if he's having same behaviour or is a fault of my system. Thanks.
Back to top
View user's profile Send private message Send e-mail
Thalon



Joined: 12 Jul 2005
Posts: 640

PostPosted: Mon Oct 15, 2007 10:57 am    Post subject: Reply with quote

Does work at XP Prof SP2 German.
Nice thing Smile

Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 5884

PostPosted: Mon Oct 15, 2007 2:13 pm    Post subject: Reply with quote

@Thalon : Thanks for the confirmation Smile
Back to top
View user's profile Send private message
Superfraggle



Joined: 02 Nov 2004
Posts: 848
Location: London, UK

PostPosted: Mon Oct 15, 2007 2:19 pm    Post subject: Reply with quote

Works on my XP SP2 UK English, Although I did have a strange occurance of having 32772 instead of 17 for hshell_rudeactivated or whatever it is.
_________________
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle
Back to top
View user's profile Send private message MSN Messenger
0inprogram



Joined: 06 Dec 2007
Posts: 21
Location: chennai

PostPosted: Fri Dec 21, 2007 5:17 pm    Post subject: Reply with quote

using code of experiment 1, how can i check whether a site is accessed thru the browser and run a set of commands based on it....
like filling the id and password ,etc....

i tried putting the name of the website in the "title" field, but it didnt work,...
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
0inprogram



Joined: 06 Dec 2007
Posts: 21
Location: chennai

PostPosted: Fri Dec 21, 2007 5:20 pm    Post subject: Reply with quote

this is the code i was talking abt ,

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 ) {
  If ( wParam = 1 ) ;  HSHELL_WINDOWCREATED := 1
     {
       WinGetTitle, Title, ahk_id %lParam%
       If  ( Title = "Windows Task Manager" )
         {
           WinClose, ahk_id %lParam%
         ; Run, Calc.exe              ; instead
         }
     }
}
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
SKAN



Joined: 26 Dec 2005
Posts: 5884

PostPosted: Fri Dec 21, 2007 5:39 pm    Post subject: Reply with quote

0inprogram wrote:
i tried putting the name of the website in the "title" field, but it didnt work,...


This SHELLHOOK method will at most can alert you when a IEFrame ( or mozilla or opera ) becomes active.

You have to check the titlebar / address bar if want to conditionally execute code.

Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 21, 22, 23, 24  Next
Page 22 of 24

 
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