I Made an AwayBox stand alone clone

Tricks, Hacks, Tools, other Add-ons, etc.

Moderators: Big-O Ryan, Big-O Mark

User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

Plasma2002b wrote:
idejsecrofkrad wrote: Private Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As Long

this will only work for my application only though, will it not? i mean, i cant get windows that my app didnt create.

IE: trying to get anything if my app's forms arnt active will only return a value of 0
GetActiveWindow should return the handle of whatever window has the focus, even if it's the start menu/task bar/system tray/other things that can have focus and aren't considered windows. In other words, it should work no matter what has the focus unless nothing has focus (which only happens when the NoDesktop system policy is enabled, all windows are closed, and a 3rd party program destroys, not hides, the taskbar). Are you using a version of VB less than VB Professional? Plain old VB and VB learning edition have limited functionality.
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

The J3w wrote:i just didnt like the comment made by idejsecrofkrad
By the time you come out with yours, Plasma's will be 100 times better, even if I have to write the code myself.
but yeah whatever, Good Luck Plasma with your program
Harra is mostly right about that. I meant nothing against you. It's just that Plasma has put a lot of work into his AMM and, as is rather obvious from all the code I've posted in this thread, I've done what I can to help him in his endeavor. As is the case with many other programmers, I hate to succumb.
User avatar
harra
Veteran
Veteran
Posts: 324
Joined: Thu Sep 12, 2002 7:03 am
Location: Houston, Texas
Contact:

Post by harra »

I wish I had the time to devote to my VB programming still. Then, I'd be jumping in the fray to help Plasma. I loved when I had endless amounts of time to devote to such projects. They are fun and sometimes are like trying to assemble a puzzle after you've lost the picture to go with it.
User avatar
Plasma2002b
Extreme Groupie
Extreme Groupie
Posts: 976
Joined: Thu Jul 18, 2002 11:36 pm
Location: Riverside, Ca
Contact:

Post by Plasma2002b »

idejsecrofkrad wrote: GetActiveWindow should return the handle of whatever window has the focus, even if it's the start menu/task bar/system tray/other things that can have focus and aren't considered windows. In other words, it should work no matter what has the focus unless nothing has focus (which only happens when the NoDesktop system policy is enabled, all windows are closed, and a 3rd party program destroys, not hides, the taskbar). Are you using a version of VB less than VB Professional? Plain old VB and VB learning edition have limited functionality.
OK, aparently you know more about VB than i do, and ill openly admit that..... and ill just come out and say i cant figure out the GetActiveWindow thing. I can get it to tell me the handles of windows from my own application, but nothing else.... im only getting zero's

As to the version of VB im running, when i boot it up, it says Enterprise edition. (6.0 of course) Now, the question is, is that a better or a worse version of vb from pro edition?
Image

its teh infamous life of brian gaut to teh max0r!
User avatar
harra
Veteran
Veteran
Posts: 324
Joined: Thu Sep 12, 2002 7:03 am
Location: Houston, Texas
Contact:

Post by harra »

Enterprise is the best edition you can get (for version 6.0)
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

Plasma2002b wrote:
idejsecrofkrad wrote: GetActiveWindow should return the handle of whatever window has the focus, even if it's the start menu/task bar/system tray/other things that can have focus and aren't considered windows. In other words, it should work no matter what has the focus unless nothing has focus (which only happens when the NoDesktop system policy is enabled, all windows are closed, and a 3rd party program destroys, not hides, the taskbar). Are you using a version of VB less than VB Professional? Plain old VB and VB learning edition have limited functionality.
OK, aparently you know more about VB than i do, and ill openly admit that..... and ill just come out and say i cant figure out the GetActiveWindow thing. I can get it to tell me the handles of windows from my own application, but nothing else.... im only getting zero's

As to the version of VB im running, when i boot it up, it says Enterprise edition. (6.0 of course) Now, the question is, is that a better or a worse version of vb from pro edition?
hmm...you're right. It's not working for me either. I'll see what I can find out.
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

Oh, duh!!! I gave you the wrong API. GetActiveWindow only works on your app. What you need is GetForegroundWindow:

Private Declare Function GetForegroundWindow Lib "user32" () As Long
User avatar
Plasma2002b
Extreme Groupie
Extreme Groupie
Posts: 976
Joined: Thu Jul 18, 2002 11:36 pm
Location: Riverside, Ca
Contact:

Post by Plasma2002b »

well..... things are pretty much back to standing now..... but i found out why i couldnt get it to work before.

basically it comes down to the fact that the program is based on the aim:goaway link, and heres whats happening...

i try to send out the command to go away, then get rid of the away window. but whats happening is that the window state command gets through before the aim:goaway link gets exectued. not in the code, but rather in the fact that AIM acts slower than my program. So what happens is that AMM sets the LAST away window to whatever state, and THEN AIM gets the new aim:goaway link and reinitiates the window. So whatever was done to the last away window, AIM just recovers it instantly.

I was thinkin on how i could for instance 'wait' until the new away message gets executed.... but im not sure how i would be able to tell....

im workin on a way that could set the title of the away box to something different every time, but this way would be very impracticle because any html in the away messages dont get shown.... so im lookin into alternatives here......

but if ya have any other ideas im open.
Image

its teh infamous life of brian gaut to teh max0r!
User avatar
Master Jedi
Guru
Guru
Posts: 1161
Joined: Sat Jun 15, 2002 10:34 pm
Contact:

Post by Master Jedi »

Plasma2002b wrote:well..... things are pretty much back to standing now..... but i found out why i couldnt get it to work before.

basically it comes down to the fact that the program is based on the aim:goaway link, and heres whats happening...

i try to send out the command to go away, then get rid of the away window. but whats happening is that the window state command gets through before the aim:goaway link gets exectued. not in the code, but rather in the fact that AIM acts slower than my program. So what happens is that AMM sets the LAST away window to whatever state, and THEN AIM gets the new aim:goaway link and reinitiates the window. So whatever was done to the last away window, AIM just recovers it instantly.

I was thinkin on how i could for instance 'wait' until the new away message gets executed.... but im not sure how i would be able to tell....

im workin on a way that could set the title of the away box to something different every time, but this way would be very impracticle because any html in the away messages dont get shown.... so im lookin into alternatives here......

but if ya have any other ideas im open.
Ok...this is going to be tough. You're going to have to hook the window using either SetWindowsHookEx (UnhookWindowsHookEx or something like that to unhook) or SetWindowLong. You need to capture whatever message the window is recieving that makes it show again. This is really tough and I can't begin to post the code here. Plus I don't know what message you need your procedure to 'eat'.
User avatar
Plasma2002b
Extreme Groupie
Extreme Groupie
Posts: 976
Joined: Thu Jul 18, 2002 11:36 pm
Location: Riverside, Ca
Contact:

Post by Plasma2002b »

idejsecrofkrad wrote: I don't see it as a feature on the list, so I'm going to suggest scheduled away messages. i.e. I tell it to put up the message ":-P" on January 22 at 3:52 am and it does exactly that.
DONE!


lol.... version 2 is up now..... has just a couple features like the ability to edit the away message files with a click of a button, and also scheduled away messages.

the away message scheduler is really simply done. I was thinkin that i can add onto it later.

But yeah..... if yall wanna download v2, then just go to


http://www.schwippy.com/amm/



:P tell me if anything is broken or turned off again, lol..... i think i got it all this time tho :wink:
Last edited by Plasma2002b on Fri Jan 24, 2003 4:26 pm, edited 2 times in total.
Image

its teh infamous life of brian gaut to teh max0r!
User avatar
Matt
Moderator
Moderator
Posts: 411
Joined: Sat Aug 10, 2002 11:23 am
Location: USA
Contact:

Post by Matt »

You should include a link to just the viewer for those of us who have already installed it so we aren't downloading everything.
-Matt
Timelessblur wrote:I only know 4 langueges. Engish, Band Engish, Really bad Engish and Timelessblurain
User avatar
Matt
Moderator
Moderator
Posts: 411
Joined: Sat Aug 10, 2002 11:23 am
Location: USA
Contact:

Post by Matt »

Also, it says its version 1.0 (in the about menu)
-Matt
Timelessblur wrote:I only know 4 langueges. Engish, Band Engish, Really bad Engish and Timelessblurain
User avatar
Plasma2002b
Extreme Groupie
Extreme Groupie
Posts: 976
Joined: Thu Jul 18, 2002 11:36 pm
Location: Riverside, Ca
Contact:

Post by Plasma2002b »

arrrgggg!!!! :evil:


why the hel does my server decide to go down 10 minutes after i put up another version AGAIN!?




..... i swear my computer hates me
Image

its teh infamous life of brian gaut to teh max0r!
User avatar
Matt
Moderator
Moderator
Posts: 411
Joined: Sat Aug 10, 2002 11:23 am
Location: USA
Contact:

Post by Matt »

I was wondering why your site was down...is this because a lot of people went to your site to download AMM?
-Matt
Timelessblur wrote:I only know 4 langueges. Engish, Band Engish, Really bad Engish and Timelessblurain
User avatar
Plasma2002b
Extreme Groupie
Extreme Groupie
Posts: 976
Joined: Thu Jul 18, 2002 11:36 pm
Location: Riverside, Ca
Contact:

Post by Plasma2002b »

Ok..... seems my ISP just likes to mess with my head.... they boot me off for a few minutes or so and yeah.....

anyways....

http://www.schwippy.com/amm/

thats the site.... i put a link to upgrade instead of install all over again.

and kool, i dunno why it would say version 1 :-? very odd..... try the upgrade maybe tho
Image

its teh infamous life of brian gaut to teh max0r!
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest