Jump to content

Skype UDF v1.2 (Sep 15, 2013)


FireFox
 Share

Recommended Posts

hi, thx but

 

Iv looked through the skype.au3 and the only thing i can see that might be of relevance is line 17

Global Const $oError = ObjEvent("AutoIt.Error", "Skype_Error")

but iv taken that out and it still does it.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

@JackDinn

Hi,

Are you running your script with the latest stable (or beta) version of AutoIt ?

Please check that there is not another UDF which has an error handler.

I have updated the UDF to automatically register the event (to avoid this error).

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

HI,

well its AI v3.3.8.0
 

and i assume that there must be another ObjEvent("AutoIt.Error", ....   somewhere but how do i find it ?

my includes are :-

#include <ButtonConstants.au3>
#include <GuiEdit.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <skype.au3>;~~~;~~~;~~~
#include <String.au3>
#include <ComboConstants.au3>
#include <GuiComboBox.au3>
#include <IE.au3>
 

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

well i downloaded your update and now with it "as is" i get this gui error

JzyqA0T.png

And if i rem out the line 17 If ObjEvent("AutoIt.Error") = "" Then Global Const $oError = ObjEvent("AutoIt.Error", "Skype_Error") I dont get the gui error but still get the console errors , same errors as shown in my first post.

, confused :-/

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

Now even my test script for the embedded html control that DID work now crash's with error :-

E:Program Files (x86)AutoIt3IncludeIE.au3 (3690) : ==> The requested action with this object has failed.:
Local $oTemp = $o_object.document
Local $oTemp = $o_object.document^ ERROR

and now same error on my little skype program.

heres a copy of what iv got , please excuse the code mess its just how iv always worked , i tidy up at the end (usually :) )

https://dl.dropbox.com/u/92486143/ShareX/2013-06/test_html.au3 (this one was working with old IE.au3)

https://dl.dropbox.com/u/92486143/ShareX/2013-06/im_encryption.au3

You'll need to select one of your skype contacts from the combo dropdown and then it errors when you send an IM.

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

  • 4 weeks later...

Hello, I'm having some trouble detecting event changes, particularly for _OnEventOnlineStatus. I'd like to be able to do a simple action anytime a user on my contact list comes online. I included a very barebones code below but its not triggering the action. Any idea what I might have overlooked? From what I read in the UDF, _OnlineStatus should be triggered anytime there's a change in online status (I'm friends with a test account I own in which I try moving from invisible to online). _OnlineStatus never seems to trigger however. This is loosely based on your example script. Skype.au3 is in the current path and is most recent UDF. Thanks.

#AutoIt3Wrapper_UseX64=n
#include "Skype.au3"

#Region Skype_OnEvent
_Skype_OnEventOnlineStatus("_OnlineStatus")
#EndRegion Skype_OnEvent

While 1
    Sleep(1000)
WEnd

Func _OnlineStatus($sUserHandle, $TOnlineStatus)
    MsgBox(0,"","User Changed Status: " & $TOnlineStatus & " for username: " & $sUserHandle);
EndFunc
Link to comment
Share on other sites

Hi,

I saw your topic last time but I did not answer because I wanted to make deeper searches on the problem (which I forgot to do).

The result is I don't know why it does not work, maybe this event is bugged or has been removed in the recent Skype versions.

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

Ahh, ok, its not just me then. Are you able to get other events to work (other than attach)? Ultimately, I was trying to write a script to auto-approve any incoming requests, but I couldn't get _Skype_OnEventUserAuthRequestReceived to trigger either. The problem is I need to somehow incorporate auto-approving otherwise if I run my script as normal and a request comes in, I won't see it and if Skype shuts down without processing it, that request is lost forever. So I somehow need to auto-approve new users within my script so I don't lose them. I couldn't get _Skype_OnEventUserAuthRequestReceived to trigger so I tried something very basic (OnlineStatus) but that proved to not work either :( 

Link to comment
Share on other sites

  • 3 weeks later...

the _Skype_ChatGetAll() function had an issue, sometimes the array loop would return "array dimension exceeded" so i fixed that simply by doing a check on the incremental variable compared to the array size as follows:

Func _Skype_ChatGetAll()
    Local Const $iChatCount = $oSkype.Chats.Count
    If $iChatCount = 0 Then Return 0

    Local $aChats[$iChatCount], $i = 0

    For $oChat In $oSkype.Chats
       If $aChats[0] <= $i Then
        $aChats[$i] = $oChat
        $i += 1
       EndIf
    Next

    Return $aChats
EndFunc
Edited by lionfaggot
Link to comment
Share on other sites

one last thing, there is no way to check if  user exists or not from within skypes api. so i did a bit of a workaround using the signup page jquery. its fairly simple, if a user exists the jquery returns "Skype Name Not Available" meaning you cant use it on the registration page as it is already in use. pretty straight forward solution. fast and easy. i posted the function a few paes back but somehow managed to botch up the code i pasted. heres the correct example:

Func _Skype_UserExists($sUser)

$skhtml = BinaryToString(InetRead("https://login.skype.com/json/validator.php?new_username="&$sUser, 1))
If StringInStr($skhtml, "Skype Name not available") Then
    Return 1
EndIf
EndFunc

so for example, to use this you would do:

$user = "poopfarm"
if _Skype_UserExists($user) Then
MsgBox(0, "User Exists", "true")
EndIf
Edited by lionfaggot
Link to comment
Share on other sites

Ahh, ok, its not just me then. Are you able to get other events to work (other than attach)? Ultimately, I was trying to write a script to auto-approve any incoming requests, but I couldn't get _Skype_OnEventUserAuthRequestReceived to trigger either. The problem is I need to somehow incorporate auto-approving otherwise if I run my script as normal and a request comes in, I won't see it and if Skype shuts down without processing it, that request is lost forever. So I somehow need to auto-approve new users within my script so I don't lose them. I couldn't get _Skype_OnEventUserAuthRequestReceived to trigger so I tried something very basic (OnlineStatus) but that proved to not work either :(

to answer your question, in some versions of skype the task you wish to accomplish is impossible. however in the latest it is not. let me give you a run down, using _SkypeChatGetAll() you can loop through the userhandle of the last person to message you. at which point you add them to your list the same way you send a contact request. however this method is not perfect and randomly fails for no reason i can see. looks like microsoft is trollin

Link to comment
Share on other sites

@lionfaggot

Thank you for the fix, I updated the UDF.

According to the _Skype_UserExists function, this one is not reliable because the website itself does not return valid results (reload the page multiples times and you will see different results).

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

@lionfaggot

Thank you for the fix, I updated the UDF.

According to the _Skype_UserExists function, this one is not reliable because the website itself does not return valid results (reload the page multiples times and you will see different results).

Br, FireFox.

ah yeah i didnt notice that. alternatively, in live http headers this transaction requires an OAuth token. the backend probably wont let you spam the reload without that key. easy fix i should presume, ill get back to you with a fix

Edited by lionfaggot
Link to comment
Share on other sites

dammit now i cant remember how i found that jquery. it was a tad bit annoying since im not too crazy over javascript. you mind giving me a hand here @firefox? all we gotta do is append an auth token to the end of the jquery in the userexists function. basically, itll never fail after that as its exactly what your browser would do on the registration page. just a bit of looping through tokens in autoit, inetread on the signup page grab the auth token and throw it onto the jquery. i just cant remember how it was organized.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...