Jump to content

Recommended Posts

Posted

Hi, if I understand you correct, you're asking if it's possible to have 2 Skype accounts running at the same time and one of them being manupulated with the UDF? If this is what you want to accomplish, then simply deny the access of the complied script when it asks for permission to use Skype.

 

That permission to use Skype wont pop up anymore.

Multiaccount would be very usefull! Now I use websites like plus.im to run my skype. I have 3 skype profiles and I need to run them at the same time (one skype for family/friends, other for my work...)

Posted (edited)

I don't understand. Make a 3 shortcuts with the following target :

"C:Program FilesSkypePhoneSkype.exe" /secondary /username:hiho /password:password

and run them. Then run the script. When scite (if it's not compiled) or the compiled .exe requiers accesw, you'll have a pop up in every Skype window - chose which Skype account you want to be manipulated from the script and which not.

Edited by hiho
Posted

@lionfaggot

I am sorry, I missed your post.

If you still need help for your problem here is the solution : list all contacts and check their buddy status, if this one equals to $cBudPendingAuthorization (2) then the contact has sent you a buddy request.

Br, FireFox.

Posted

I'm trying to do a simple name lookup given a handle using the snipped code below:

 
... code to attach to skype ...
 
sleep(1000)
$oUser = $oSkype.User("INSERTSKYPEIDHERE")
MsgBox(0,"",$oUser.Handle & "|" & $oUser.FullName)
 
The above keeps returning a blank name even though its defined. Here's where it gets really weird, if I manually go to skype and do a search for the SkypeID and then re-run the above code, it works. It seems as though the AutoIT code isn't actually binding to skype (even though its clearly attached and I get the default successfully attached MsgBox)? Any ideas what may be causing this or how to fix (other than manually doing searches in Skype before running the script?).
 
Thanks
Posted

@PeerMedia

You could at least try what you want to do with the Skype UDF (because you are half off topic)... then come back if it does not work.

Br, FireFox.

Posted

Hi FireFox, I was using the UDF but decided to try and recreate the code via the Skype4COM API directly so I could try and figure out exactly what was going on with results that worked sometimes and didn't other times. Turns out that doing a name lookup on users who aren't in my contact list was the problem. You either have to do a search by username and then iterate over the results for the correct handle and then extract the data, or have the user in your contact list. I thought doing a name lookup would query the skype servers directly, but you have to do a search yourself or have them in your contact list. 

Posted (edited)

My apologies, I was not aware of that.

Did you find a workaround?

Br, FireFox.

Edited by FireFox
Posted

Yeah, I itterate over my contact list, if I find an exact match by handle, I just take the information directly from $oUser.FullName. If its not in the contact list, I do a Search, itterate over all search results for the exact match by handle and then do $oUser.FullName on that skype search result. Its a bit of a workaround but it works. I have noticed doing searches too fast can yield no search results back. Probably a Skype anti-spam filter, but simply slowing it down with a sleeper keeps results being correct.

Posted

You need to run the Skype with this parameter " /secondary"

I don't know if you can target a skype instance with the Skype4COM library, I will make some searches tonight. Meanwhile if you find something you can post it :)

Br, FireFox.

Hi again, was there any update to this post? I'm having this exact issue right now. I'm running 2 skype's and the au3 is trying to bind to both. It would be great if I could specify to bind to which, although I doubt there's an easy way to do this.

Posted

Since I ended up debugging with Skype4COM directly, my source isn't applicable to this UDF so it wouldn't mean much to most users.

Please post it, I should be able to "translate" it using the Skype UDF.

you'll have a pop up in every Skype window - chose which Skype account you want to be manipulated from the script and which not.

Follow his idea, I don't see another way to do it.

Br, FireFox.

Posted

I approved the popup in each skype window to allow API access to AutoIT, but then I tried a simple script to just change status from Online to Away but it seems to randomly bind to just 1 skype object. Is there any way such that AutoIT can bind to either 1 specific or all Skype windows? Seems only way is to launch Skype, run code, kill skype, repeat. Then after all changes are done, launch all skypes. Not a great way to programmatically do things though.

Posted (edited)

Thinking a second time about it and it turns out that it's not possible with hiho's trick.

Indeed, even if you make two separated scripts and accept a script for one skype instance it will be the same skype settings so both scripts will be allowed.

Unfortunately, there is no documentation concerning the automation of multiple skype instances. Therefore I doubt it's possible.

Edit: Try to suspend the skype instance with which you don't want to interact using the NtSuspendProcess function (and when you're done resume it of course).

Br, FireFox.

Edited by FireFox
Posted

Thinking a second time about it and it turns out that it's not possible with hiho's trick.

Indeed, even if you make two separated scripts and accept a script for one skype instance it will be the same skype settings so both scripts will be allowed.

Unfortunately, there is no documentation concerning the automation of multiple skype instances. Therefore I doubt it's possible.

Edit: Try to suspend the skype instance with which you don't want to interact using the NtSuspendProcess function (and when you're done resume it of course).

Br, FireFox.

I tried compiling the same scripts as AwayMode1.exe, AwayMode2.exe, etc. for each version of Skype to bind. Upon, executing, all Skype sessions request API permission. I'd grant access to just the intended skype session and specifically reject access to the other Skype windows (otherwise Skype waits in Pending Authorization mode). By using a unique filename like this only 1 skype window would have API access. I was hoping this would force $oSkype to bind to the correct window as there's only 1 skype window with granted API access. It seemed to work with 2 skype's but it was just a random luck of the draw. I repeated this for 5 skype windows and only 2/5 skype windows updated the status to Away mode. I tried running many times and it was always random, it rarely bound to the correct skype. I didn't try the NtSuspendProcess idea as I think it would be quite an overhead to determine the correct processID and micromanage pausing/resuming skype windows. 

I also tried a few other options such as creating different usernames within windows and launching via RunAs hoping Skype would bind to the only session launched by that user, same results. 

I ended up doing a sequential approach. Launch skype from the command line hardcoded with the username/password, [Do requests to Skype via API], logoff Skype, goto next account. 

I don't like that I can't manage multiple skype's at the same time but the sequential approach does work which is better than random binding to $oSkype.

I could not find a way to return a list of all $oSkype objects as I would just code a loop over every $oSkype.

Thanks for your help FireFox, your UDF really did make coding this a lot easier :) 

Posted

I'm not sure if this ever came up for you, but do you see a way to capture all oSkype objects that might be running? I don't think its possible since the API appears to return only the first oSkype object it finds, but I thought I'd ask :) 

Posted

Hi,

Iv been trying to use your skype udf together with <IE.au3> but im really having problems with the COM error handler.

Iv got the skype udf working fine on its own and also iv got the embedded html control working fine on its own to but when i try to put the two together i get these kind of errors

--> IE.au3 V2.4-0 Warning from function _IELoadWait, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
--> IE.au3 V2.4-0 Warning from function _IELoadWait, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)
E:\Program Files (x86)\AutoIt3\Include\IE.au3 (3767) : ==> Variable must be of type "Object".:
$IEComErrorScriptline = $oIEErrorHandler.scriptline
$IEComErrorScriptline = $oIEErrorHandler^ ERROR

It happens when i try to _IEDocWriteHTML() (but probably many other func's of the IE.au3 udf as well)

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.

I really dont have enough understanding of com objects (or even just objects) to be able to track down what is causing this, any suggestions ?

Thx.

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

Posted (edited)

Hi, I had  the same problem too. Open Skype.au3, find line 17 and comment it :

before

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

after

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

I was advised to do is from FireFox and it did the job. :)

Edited by hiho

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
×
×
  • Create New...