vanowm Posted June 3, 2008 Posted June 3, 2008 (edited) Hello!I'm trying use Skype API via Skype4COM.dll and so far everything works fine, except for one thing: whenever I start skype via the skype4com object I have to put the script in sleep for a few seconds until skype fully started, because if I don't do that, script dies with the error message Why in the world AU3 would kill the script instead of put error code into @Error or something is beyond my very limited understanding...Here is the code:$oSkype = ObjCreate("Skype4COM.Skype") $oSkype.Client.Start() ; Wait untill skype is started While NOT $oSkype.Client.IsRunning Sleep(1) Wend ;Sleep(5000) ; Connect to the Skype API: $oSkype.Attach ExitAs you can see, the script will "pause" until skype is started, that part is working, but apparently there is a few seconds gap before skype is able accept plugin attachments after its started...and that gap will probably vary depend on system speed...So, anyway avoid this problem without placing the script into sleep? (sleep is only a work around and not 100% error proof in this case)Thank you. Edited June 3, 2008 by vanowm
Developers Jos Posted June 3, 2008 Developers Posted June 3, 2008 (edited) Add the COM Error Handling in your script and you get what you are asking. Its documented quite well in the Helpfile. Jos Edited June 3, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
vanowm Posted June 3, 2008 Author Posted June 3, 2008 (edited) That's it! Thank you very much Problem solved P.S. here is a working example on how it could be done: Edited June 4, 2008 by vanowm
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now