Results 1 to 2 of 2

Thread: AutoIt + Hibernation = fail

  1. #1
    Variable Bitrate
    Join Date
    Mar 2006
    Posts
    351
    Blog Entries
    1

    AutoIt + Hibernation = fail

    Purpose:
    Using a PIC to read my encoded steering wheel buttons and output results through a serial port. AutoIT script reads serial port and performs RR commands.

    Problem:
    It works great as long as I don't use hibernate. When it comes out from hibernate the AutoIT script cannot communicate with RR. I tried exiting the AutoIT script and re-running the script the same problem exists. The only way to communicate with RR again is to exit RR and reload RR, or perform a cold boot.

    Question:
    Is there anything missing from the AutoIT script so it can communicate with RR after hibernation? Or would it be better to convert this to visual basic 6 extension to avoid the hibernation bug?

    PHP Code:
    serial port setup
    $MsComm1 
    ObjCreate("MSCOMMLib.MsComm.1")
    $MsComm1.CommPort 4
    $MsComm1
    .Settings "9600,N,8,1"
    $MsComm1.Handshaking 0
    $MsComm1
    .InBufferSize 1024
    $MsComm1
    .InputLen 1
    $MsComm1
    .PortOpen 1

    $rr 
    ObjCreate("RoadRunner.sdk") ; Open COM with RR
    _SerialOut
    ("z")  ; initialize serial port and wake up PIC

    While 1
        $message 
    _SerialIn()
        
    $result=StringStripWS($message,8) ; removes white space CR LF
        
    If StringCompare($result,"MUTE") == 0 Then
            $rr
    .Execute("PLAY")   
        ElseIf 
    StringCompare($result,"FM/AM") == 0 Then
            $rr
    .Execute("PREV2")  
        ElseIf 
    StringCompare($result,"VOL-") == 0 Then
            $rr
    .Execute("VOL-")   
        ElseIf 
    StringCompare($result,"VOL+") == 0 Then
            $rr
    .Execute("VOL+")   
        ElseIf 
    StringCompare($result,"AUTOM") == 0 Then
            $rr
    .Execute("NEXT")   
        ElseIf 
    StringCompare($result,"MCAL") == 0 Then
            $rr
    .Execute("PREV")
        EndIf
    WEnd

    Func _SerialOut
    ($str)  ; Write to serial port function
        
    $MsComm1.OutBufferCount 0
        $MsComm1
    .InBufferCount 0
        
    If $MsComm1.PortOpen True Then
            $MsComm1
    .Output $str
        
    EndIf
        
    $MsComm1.InputLen 0
    EndFunc

    Func _SerialIn
    ()  ; Read from serial port function
        If 
    $MsComm1.InBufferSize 1 Then
            
    Return $MsComm1.Input
        
    Endif
    EndFunc 

  2. #2
    Maximum Bitrate
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    520
    I don't see an error right now. But I don't have any problems using my AutoIt scripts (which interact with RR) after hibernate/resume. I didn't add any special commands.
    I know this doesn't really help, just wanted to say that from my experience it should work without problems.

Similar Threads

  1. Replies: 1
    Last Post: 11-28-2006, 10:32 AM
  2. Hibernation drawing too much power...
    By Borte in forum General Hardware Discussion
    Replies: 21
    Last Post: 09-06-2006, 09:03 AM
  3. Audigy 2 NX and hibernation
    By backspace in forum Car Audio
    Replies: 2
    Last Post: 04-28-2006, 02:56 PM
  4. 5 minutes to complete hibernation? WTF?
    By DRWeside in forum General Hardware Discussion
    Replies: 1
    Last Post: 03-12-2006, 11:36 PM
  5. Odd Off Topic-ness on Hibernation
    By Vchat20 in forum General MP3Car Discussion
    Replies: 1
    Last Post: 01-31-2005, 06:41 PM

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
  •