Results 1 to 10 of 10

Thread: Trigger script/command on resume from hibernate?

  1. #1
    Maximum Bitrate
    Join Date
    Jun 2003
    Location
    Atlanta/Augusta, GA
    Posts
    505

    Trigger script/command on resume from hibernate?

    Is there any way to trigger a script/command to run on resume from hibernate?

    I'd like to launch touchkit utility on resume so my touchscreen will work again after hibernating.

    Thanks.

  2. #2
    jol
    jol is offline
    FLAC jol's Avatar
    Join Date
    Jan 2002
    Location
    Mellansel, Sweden
    Posts
    1,299
    put it in autostart, it should do the trick. Or have another program monitor if the touchkit is running or not...but try autostart first

  3. #3
    Maximum Bitrate
    Join Date
    Jun 2003
    Location
    Atlanta/Augusta, GA
    Posts
    505
    What/where is autostart?

    The program monitor idea sounds like it would work too. Thanks for the help.

  4. #4
    jol
    jol is offline
    FLAC jol's Avatar
    Join Date
    Jan 2002
    Location
    Mellansel, Sweden
    Posts
    1,299
    the folder in the start menu

  5. #5
    Maximum Bitrate
    Join Date
    Jun 2003
    Location
    Atlanta/Augusta, GA
    Posts
    505
    That's what I thought but never heard it called that. I've always referred to it as the Startup Folder.

    I think XP only lauches programs from there during true logon. Niether fast switch logon nor resume from hibernate relaunches items in that folder. I was hoping autostart was a 3rd party task scheduler.

    I'll continue searching for a task scheduler that supports resume from hibernate trigger or maybe an api reference to resume from hibernate. But if I'm unsuccessfull, I'll go the program monitor route.

    Thanks again.

  6. #6
    Maximum Bitrate 00CericaRuss's Avatar
    Join Date
    Jul 2002
    Location
    San Rafael, CA, USA
    Posts
    682
    tejesh, i don't know if a program monitor will work.
    I had the same problem w/my capuccino type pc, and the touch util would still be loaded, but touchscreen wouldn't work after un-hibernate until i opened the app again.
    I think an api would be the best bet, but i can't code to save my life.
    I now have an epia mobo and it works when i come out of hibernation. Only problem i have now is that my display gets screwey w/both vga & tv out enabled on the vga screen when i come out of hibernate, so i just cold boot each time for now

  7. #7
    Maximum Bitrate
    Join Date
    Jun 2003
    Location
    Atlanta/Augusta, GA
    Posts
    505
    You're right, if the touchscreen utility is always on, it will still not recover from hibernate even when the ts utility is running. But, if you launch a fresh instance of the touchscreen utility on resume from hibernate, the touchscreen will start working again.

    Here's a possible solution:
    At a certain trigger, launch the touchscreen utility, wait z seconds for the controller to initialize, kill/close the utility. Preferably, this would all happen in the background and not effect the end user.

    To trigger the above, it would be nice to know when a resume from hibernate has occured. I was hoping a task scheduler existed that could already do this. If not, hopefully you can detect a signal from the OS. Otherwise, you could try to detect the hiberate yourself using a saved timestamp vs current timestamp. But, it may fail depending on what line of code the trigger is on when hibernate pauses the app. Worst case, you could just trigger the event every X secs/min if you don't mind wasting cpu cycles.

    I am computer science major, and I could probably figure out how to code it. But for now, I also choose to just cold boot. This is 1 of a few issues I've had hibernating, and I'm still not sure its worth the quicker key to desktop time.

  8. #8
    Newbie Markus101's Avatar
    Join Date
    Oct 2003
    Location
    Summerland BC Canada
    Posts
    5
    I have an idea, assuming you have a keyboard connected to the actual computer, so here goes, you create a shortcut of the touch screen utillity and then in its properties (right-click, properties, Keyboard Shortcut) you set a short-cut key, when you resume from hibernation, you hit the key, and it should reload the touch screen program, assuming it was already closed....if it has 2 instances will it still run? theres my idea, if it doesn't work, i'll figure out another way.
    Markus

    -= 380 mHz 448 Mb SDRAM, 3 Gb Hdd, built in vid/aud, and tape attachment to kenwood deck, controled with a Gravis GamePad Pro Eliminator=-

  9. #9
    Maximum Bitrate 00CericaRuss's Avatar
    Join Date
    Jul 2002
    Location
    San Rafael, CA, USA
    Posts
    682
    tejesh.. exact same problem i had.. I think it had to do w/how the drivers/motherboard/serial port acted after hibernation and re-initialisation... who knows though

    markus... that would work, but that's just a workaround which will require interaction... it wouldn't be difficult to do everytime, but I personally wouldn't want to have to do it every time i got into my car (trust me.. i ended up using a remote instead of touch because the touch would come back 1/5 times)

  10. #10
    jol
    jol is offline
    FLAC jol's Avatar
    Join Date
    Jan 2002
    Location
    Mellansel, Sweden
    Posts
    1,299

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
  •