Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: AutoIt Detecting when Road Runner closes

  1. #1
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,702
    Blog Entries
    1

    AutoIt Detecting when Road Runner closes

    I have a script that poll's RR for information. I have multiple checks in the script like the following:

    if ProcessExists("RoadRunner.exe") = 0 Then Exit

    I have this the line above all lines that poll info from RR.

    The problem, is when RR closes, The Road Runner.exe process can remain in the task list for up to 4 seconds. Thus, I get a nasty error from the script that the object has failed when I close Road Runner. (The window handle also remains active till RR completely shuts down, I tried that as well)

    The script polls information every 1 second, and I do not want to have to put a wait for 5 seconds before it polls info from RR.

    Is there another way, with AutoIt to more reliably tell when RR is closed or in the process of closing?

    I did find this:

    Opt("RunErrorsFatal", 0)

    Which disables error reporting, but only on run & wait commands, and not other types of errors.

    The script is pretty straight forward, and solid, so I am not opposed to turning off errors completely for the script, if someone knows how.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  2. #2
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    which object are you using in the script that is giving you the error ? is there no way to check if the object has closed or is still valid ?
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  3. #3
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,702
    Blog Entries
    1
    I am using the following code, interacting with RR's SDK:

    $rr=ObjCreate("RoadRunner.sdk")
    $rr.Execute("SETIND;CUSTOM_CdInsert;OFF")

    I have found no way, as of yet, to check if the object is still valid, without actually using it.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  4. #4
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,168
    Blog Entries
    53
    the way i handled this is to tell my script to set a variable to "1" in rr once the object is created then check the status of that variable before i run any .execute commands. My exectbl.ini tells rr to set the variable to "0" before rr closes. I no longer have those errors
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  5. #5
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    5,079
    Quote Originally Posted by JohnWPB View Post
    I am using the following code, interacting with RR's SDK:

    $rr=ObjCreate("RoadRunner.sdk")
    $rr.Execute("SETIND;CUSTOM_CdInsert;OFF")

    I have found no way, as of yet, to check if the object is still valid, without actually using it.
    Maybe try using "IsObj($rr)"

    ie
    $rr=ObjCreate("RoadRunner.sdk")
    if IsObj($rr) Then $rr.Execute("SETIND;CUSTOM_CdInsert;OFF")
    RideRunner...The #1 FE, PERIOD.

    Current Project: DFXVoice [v1.0 Released]
    Next in line: RRMedia v2.0

    DFX 5.1.1 Skin
    Appstore Link

    My RideRunner Plugins
    RRMedia
    RRExtended
    DFXVoice

    "There are no bugs - only undocumented features."

  6. #6
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,702
    Blog Entries
    1
    Just tried that, no luck. RR remains as a process for a few seconds after it closed, and thus passes the exists check, but then errors when trying to send something to it.

    This has gotten so frustrating....

    I am using this simple script to test with. If I close RR, I get the error about being unable to communicate with the object.

    Code:
    $rr=ObjCreate("RoadRunner.sdk")
    
    For $test = 1 to 5
        sleep(1000)
        $RRCheck = IsObj($rr)
        if $RRCheck = 1 then $rr.Execute("SETIND;CUSTOM_WIFI;OFF")
    Next
    Quote Originally Posted by Sonicxtacy02 View Post
    the way i handled this is to tell my script to set a variable to "1" in rr once the object is created then check the status of that variable before i run any .execute commands. My exectbl.ini tells rr to set the variable to "0" before rr closes. I no longer have those errors
    How are you setting the variable in the exectbl to 0 when RR exits? A button code would not work well added to the EXIT command, as when you send the power down to the computer, no button code is executed ect, or for some reason RR locks, or does not exit gracefully. I do not want a msgbox holding up the system shutting down.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  7. #7
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,168
    Blog Entries
    53
    Quote Originally Posted by JohnWPB View Post
    Just tried that, no luck. RR remains as a process for a few seconds after it closed, and thus passes the exists check, but then errors when trying to send something to it.

    This has gotten so frustrating....

    I am using this simple script to test with. If I close RR, I get the error about being unable to communicate with the object.

    Code:
    $rr=ObjCreate("RoadRunner.sdk")
    
    For $test = 1 to 5
        sleep(1000)
        $RRCheck = IsObj($rr)
        if $RRCheck = 1 then $rr.Execute("SETIND;CUSTOM_WIFI;OFF")
    Next
    How are you setting the variable in the exectbl to 0 when RR exits? A button code would not work well added to the EXIT command, as when you send the power down to the computer, no button code is executed ect, or for some reason RR locks, or does not exit gracefully. I do not want a msgbox holding up the system shutting down.
    i was using the ONEXIT event that i have in my exectbl.ini.. but as i saying that i realized thats something i added to the latest source myself. Its not official RR code. I can send that beta to ya if ya want though.
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  8. #8
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,283
    Code:
    $rr=ObjCreate("RoadRunner.sdk")
    	$rr.execute("quit")
    	
    For $test = 1 to 5
    	 if ProcessExists("RoadRunner") = 0 then Exit
        sleep(1000)
        if Not IsObj($rr) then exit
    	$rr.Execute("SETIND;CUSTOM_WIFI;OFF")
    	If @error then ContinueLoop
    Next
    send that to guino also and hopefully can be added for the next release, i can use that feature as well.

  9. #9
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,702
    Blog Entries
    1
    I second that one for sure, as it is such a simple add to RR, but will help with any scripting outside RR 10 fold.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  10. #10
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,168
    Blog Entries
    53
    Quote Originally Posted by JohnWPB View Post
    I second that one for sure, as it is such a simple add to RR, but will help with any scripting outside RR 10 fold.
    well i was gonna just upload a beta but i forgot i updated to the dec. 6th release and copied over my beta . being that the dec. 6 source isnt available yet i'm gonna pm guino and see if he can add it to the dec 6th release before it goes public. its only one line of code it shouldnt be too hard.
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

Page 1 of 2 12 LastLast

Similar Threads

  1. Road Runner Installer and Updater (** Out Dated **)
    By W3bMa5t3r in forum Road Runner
    Replies: 329
    Last Post: 10-11-2008, 10:19 PM
  2. PhoneControl integration w. Road Runner problem
    By Broendbjerg in forum PhoneControl
    Replies: 4
    Last Post: 11-05-2007, 11:01 AM
  3. How to Speed up Road Runner
    By JohnWPB in forum RR FAQ
    Replies: 4
    Last Post: 09-15-2007, 01:58 PM
  4. Road runner Ideas (BIG LIST)
    By sephiroth7 in forum Road Runner
    Replies: 9
    Last Post: 04-01-2007, 09:50 AM
  5. How do I install Road Runner ?
    By guino in forum RR FAQ
    Replies: 0
    Last Post: 03-21-2005, 02:16 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
  •