Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development


Reply
 
Share Thread Tools Display Modes
Old 08-17-2005, 02:01 AM   #31
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
I'll finish this up in the morning, it is working quite well.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 08-17-2005, 07:24 AM   #32
Raw Wave
 
justintime's Avatar
 
Join Date: Apr 2005
Posts: 2,705
justintime is on a distinguished road
Frodo:

Are you seriously coding this thing? (I'm stoked!)
If so, are you able to completely CANCEL the triggering event? That is the crucial part.

Shutdown I believe power soff completely. Restart on the other hand, will reboot (power back up) right after shutting down.

Actually, in Windows looks like these are called: Turn Off, and Restart. I can see both options when I do start->turn off computer.
__________________
2002 Honda CR-V
Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
Spent so far: $1105.90


Download the NEXUS Skin for Centrafuse
...or even Listen to my music

Last edited by justintime; 08-17-2005 at 07:28 AM.
justintime is offline   Reply With Quote
Old 08-17-2005, 03:11 PM   #33
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
Yes, I am coding this. Yes it will CANCEL the event.

Even though you can choose restart/shutdown, programs
don't know the difference. Same with standby/hibernate.


Now, if someone sends the "force" command along with a shutdown
etc command, the app won't cancel that event, as it's not possible,
but in 99% of the cases the way windows is shutdown, that won't happen.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 08-17-2005, 03:25 PM   #34
Raw Wave
 
justintime's Avatar
 
Join Date: Apr 2005
Posts: 2,705
justintime is on a distinguished road
Quote: Originally Posted by frodobaggins
Yes, I am coding this. Yes it will CANCEL the event..

THANK YOU!

Quote: Originally Posted by frodobaggins
Even though you can choose restart/shutdown, programs
don't know the difference. Same with standby/hibernate.
..

Not sure why this is relevant. What 'Program' needs to know the difference, aside from the interceptor utility itself?

Quote: Originally Posted by frodobaggins
Now, if someone sends the "force" command along with a shutdown
etc command, the app won't cancel that event, as it's not possible,
but in 99% of the cases the way windows is shutdown, that won't happen.

I think if I understand correctly, we don't have a problem here. The 'shutdown' sequence that would be generated is typically going to be sent by the Opus, which is in fact the same as pressing the Shutdown button on a PC case.
I can see how someone could attempt a forced shutdown via the DOS command 'shutdown -f' but that would never occur via the Opus.

Let me know when you have something to test, I will spend time with it!
__________________
2002 Honda CR-V
Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
Spent so far: $1105.90


Download the NEXUS Skin for Centrafuse
...or even Listen to my music
justintime is offline   Reply With Quote
Old 08-17-2005, 03:29 PM   #35
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
Quote: Originally Posted by justintime
Not sure why this is relevant. What 'Program' needs to know the difference, aside from the interceptor utility itself?
!

The interceptor is a program too !

So you only have 3 events.

1. Shutdown/Restart
2. Log Off
3. Hibernate/Standby
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 08-17-2005, 04:07 PM   #36
Raw Wave
 
justintime's Avatar
 
Join Date: Apr 2005
Posts: 2,705
justintime is on a distinguished road
That's what I thought you were refering to.
Quite honestly, I only really will ever need to intercept the hibernate event, so that's cool by me!

How hard would it be to add some code in there to launch apps/scripts also upon RESUMING from the events? Kind of like a whole other tab in the interface, with same configuration items, but relevant to the resume of the 'events'.
So for example, would be great to be able to run a script when I RESUME from a hibernation.

Quote: Originally Posted by frodobaggins
The interceptor is a program too !

So you only have 3 events.

1. Shutdown/Restart
2. Log Off
3. Hibernate/Standby

__________________
2002 Honda CR-V
Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
Spent so far: $1105.90


Download the NEXUS Skin for Centrafuse
...or even Listen to my music
justintime is offline   Reply With Quote
Old 08-17-2005, 06:46 PM   #37
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
Quote: Originally Posted by justintime
How hard would it be to add some code in there to launch apps/scripts also upon RESUMING from the events? Kind of like a whole other tab in the interface, with same configuration items, but relevant to the resume of the 'events'.
So for example, would be great to be able to run a script when I RESUME from a hibernation.

That's not a problem, however, say you catch the hibernate/standby event, and cancel it. When you cancel it, windows thinks it has resumed, so the resume event fires as well. So you will have to choose one or the other.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 08-17-2005, 06:50 PM   #38
Raw Wave
 
justintime's Avatar
 
Join Date: Apr 2005
Posts: 2,705
justintime is on a distinguished road
How about something more creative, like putting a timer/delay to launch those apps or scripts (instead of trying to detect the resume from hibernate event)
So, you would for example launch an app with a 10 second delay. This would be enough time for the hibernation to take place. Let's say, 2 seconds passed by, and now the pc is hibernated. When you resume from hibernate, another 8 seconds will pass, and the app/script would be launched.

I know, it's a workaround, but hey, need to think out of the box

Quote: Originally Posted by frodobaggins
That's not a problem, however, say you catch the hibernate/standby event, and cancel it. When you cancel it, windows thinks it has resumed, so the resume event fires as well. So you will have to choose one or the other.

__________________
2002 Honda CR-V
Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
Spent so far: $1105.90


Download the NEXUS Skin for Centrafuse
...or even Listen to my music
justintime is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 08-17-2005, 06:57 PM   #39
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
I'll just have it skip the first resume message.
Then it will only fire on the real resume.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 08-17-2005, 07:24 PM   #40
Raw Wave
 
justintime's Avatar
 
Join Date: Apr 2005
Posts: 2,705
justintime is on a distinguished road
Another alternative.

How about you find a way to differentiate between the 'normal' resumes from hibernate, and the ones you canceled via interceptor?

For example, before canceling the event with interceptor, write a 'True' to a variable.

After detecting a resume from hibernate, read the variable, if True then you do no launching, and set the variable to false. If it is false, then you launch the apps...


Quote: Originally Posted by frodobaggins
That's not a problem, however, say you catch the hibernate/standby event, and cancel it. When you cancel it, windows thinks it has resumed, so the resume event fires as well. So you will have to choose one or the other.

__________________
2002 Honda CR-V
Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
Spent so far: $1105.90


Download the NEXUS Skin for Centrafuse
...or even Listen to my music
justintime is offline   Reply With Quote
Old 08-17-2005, 07:34 PM   #41
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
Quote: Originally Posted by justintime
Another alternative.

How about you find a way to differentiate between the 'normal' resumes from hibernate, and the ones you canceled via interceptor?

For example, before canceling the event with interceptor, write a 'True' to a variable.

After detecting a resume from hibernate, read the variable, if True then you do no launching, and set the variable to false. If it is false, then you launch the apps...

You realize you just described the same thing.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 08-17-2005, 07:56 PM   #42
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
Release

Here. Source Included.
Attached Files
File Type: zip Interceptor_v1_Bin_And_Src.zip (20.6 KB, 183 views)
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 08-17-2005, 08:10 PM   #43
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
You can use/modify that to suit your needs, however I have a better idea
that I may work up later.
__________________
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
frodobaggins is offline   Reply With Quote
Old 08-17-2005, 08:37 PM   #44
Raw Wave
 
justintime's Avatar
 
Join Date: Apr 2005
Posts: 2,705
justintime is on a distinguished road
Our posts crossed paths in cyberspace LOL.
Yeah, it is basically the same thing.

Quote: Originally Posted by frodobaggins
You realize you just described the same thing.

__________________
2002 Honda CR-V
Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
Spent so far: $1105.90


Download the NEXUS Skin for Centrafuse
...or even Listen to my music
justintime is offline   Reply With Quote
Old 08-17-2005, 09:08 PM   #45
Raw Wave
 
justintime's Avatar
 
Join Date: Apr 2005
Posts: 2,705
justintime is on a distinguished road
Frodo,

First of all thanks so much for this!!!!

Ok, so I gave it a spin on my Capruter (bench setup for now), and it is definitely intercepting and cancelling the hibernate event.

However, it is not executing anything I set up in the fields. I even tried selecting your very own 1.bat script, and it is not writing to the text file as you'd expect. Tried several other apps, and nothing. I also tried with other events (shutdown for example) and no go.

I am running a Biostar with Athlon XP2400+, 512MB Ram, and Windows XP SP2.




Quote: Originally Posted by frodobaggins
Release

Here. Source Included.

__________________
2002 Honda CR-V
Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
Spent so far: $1105.90


Download the NEXUS Skin for Centrafuse
...or even Listen to my music
justintime is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rewiring ATX power button DCC Power Supplies 10 02-07-2008 06:17 AM
linking into laptop power button corsamel General Hardware Discussion 18 09-06-2007 10:47 PM
FS For Sale 7" LCD VGA/USB, Opus 125w Power Supply, ATX P3-700 10GB 256r oudis Classified Archive 7 06-15-2004 10:29 PM
ATX board power?? Alphared Power Supplies 9 01-10-2003 01:36 PM
PC power button problem BMp3W Power Supplies 4 10-12-2002 03:36 AM



All times are GMT -5. The time now is 07:33 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics