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 ?
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
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."
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
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
NOVA, MD, DC Monthly Meets Here
Ride Runner and Centrafuse 3 plugin creator
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
RideRunner...The #1 FE, PERIOD.
Current Project: DFXVoice [Beta Released]
Next in line: RRMedia v2.0
DFX 5.1.1 Skin
Appstore Link
My RideRunner Plugins
RRMedia
RRExtended
DFXVoice
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.
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.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
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
NOVA, MD, DC Monthly Meets Here
Ride Runner and Centrafuse 3 plugin creator
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
send that to guino also and hopefully can be added for the next release, i can use that feature as well.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
BASSRR ==> [Audio Player/MusicDB/Cd Player/Ripper/Rate/Internet Radio/Audio Capture/Youtube Video]
RRTube ==> [View/Download Youtube Videos]
WifiMan ==> [Wifi Manager]
RRec ==> [Audio Capture]
If You Want To Be Given Everything, Give Everything Up ...
Bird York -- In The Deep --
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
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.
NOVA, MD, DC Monthly Meets Here
Ride Runner and Centrafuse 3 plugin creator
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
Bookmarks