|
 |
|
08-17-2005, 02:01 AM
|
#31
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
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!
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
08-17-2005, 07:24 AM
|
#32
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
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.
Last edited by justintime; 08-17-2005 at 07:28 AM.
|
|
|
08-17-2005, 03:11 PM
|
#33
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
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!
|
|
|
08-17-2005, 03:25 PM
|
#34
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
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!
|
|
|
08-17-2005, 03:29 PM
|
#35
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
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!
|
|
|
08-17-2005, 04:07 PM
|
#36
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
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
|
|
|
08-17-2005, 06:46 PM
|
#37
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
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!
|
|
|
08-17-2005, 06:50 PM
|
#38
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
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.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
08-17-2005, 06:57 PM
|
#39
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
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!
|
|
|
08-17-2005, 07:24 PM
|
#40
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
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.
|
|
|
08-17-2005, 07:34 PM
|
#41
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
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!
|
|
|
08-17-2005, 07:56 PM
|
#42
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
Release
Here. Source Included.
__________________
[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!
|
|
|
08-17-2005, 08:10 PM
|
#43
|
|
I'm sorry, and you are....?
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
|
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!
|
|
|
08-17-2005, 08:37 PM
|
#44
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
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.
|
|
|
08-17-2005, 09:08 PM
|
#45
|
|
Raw Wave
Join Date: Apr 2005
Posts: 2,705
|
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.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:33 PM.
| |