Page 4 of 9 FirstFirst 123456789 LastLast
Results 31 to 40 of 84

Thread: Utility to change behavior of ATX power button (e.g.: launch an app)

  1. #31
    I'm sorry, and you are....? frodobaggins's Avatar
    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!

  2. #32
    Raw Wave justintime's Avatar
    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.
    2002 Honda CR-V
    Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
    Spent so far: $1105.90


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

  3. #33
    I'm sorry, and you are....? frodobaggins's Avatar
    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!

  4. #34
    Raw Wave justintime's Avatar
    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!
    2002 Honda CR-V
    Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
    Spent so far: $1105.90


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

  5. #35
    I'm sorry, and you are....? frodobaggins's Avatar
    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!

  6. #36
    Raw Wave justintime's Avatar
    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
    2002 Honda CR-V
    Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
    Spent so far: $1105.90


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

  7. #37
    I'm sorry, and you are....? frodobaggins's Avatar
    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!

  8. #38
    Raw Wave justintime's Avatar
    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.
    2002 Honda CR-V
    Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
    Spent so far: $1105.90


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

  9. #39
    I'm sorry, and you are....? frodobaggins's Avatar
    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!

  10. #40
    Raw Wave justintime's Avatar
    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.
    2002 Honda CR-V
    Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
    Spent so far: $1105.90


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

Similar Threads

  1. linking into laptop power button
    By corsamel in forum General Hardware Discussion
    Replies: 22
    Last Post: 04-23-2010, 05:53 AM
  2. Rewiring ATX power button
    By DCC in forum Power Supplies
    Replies: 10
    Last Post: 02-07-2008, 06:17 AM
  3. Replies: 7
    Last Post: 06-15-2004, 10:29 PM
  4. ATX board power??
    By Alphared in forum Power Supplies
    Replies: 9
    Last Post: 01-10-2003, 01:36 PM
  5. PC power button problem
    By BMp3W in forum Power Supplies
    Replies: 4
    Last Post: 10-12-2002, 03:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •