Jump to content

Recommended Posts

Hi all,

I was getting bored this week-end and started playing around with skype in LabVIEW through ActiveX.

On my computer skype is set up to login automatically with my username and password, so when I start skype by calling the ActiveX "Start" method in LabVIEW, skype starts up and logs in with my account. Easy.

Now I've been trying to find some kind of "log out" method and "login" method for which I could input the username and password I'd like skype to use but I didn't find it..

Can anyone help on this ?

Thanks in advance :)

Link to comment
  • 2 weeks later...

QUOTE (LV_FPGA_SE @ Dec 18 2008, 05:01 AM)

Have you looked at the Skype4COM documentation?

https://developer.skype.com/Docs/Skype4COMLib

It has a complete list of the classes and methods/interfaces.

Yes, that's exactly where I started from. I didn't find a way pass in the username and password to login with the account I want :unsure:

Dunno if I missed it or if it's not possible with Skype4COM..

QUOTE

I know programs like AIM store the last used screenname in the registry - you might do well to look there.

If you're terribly desperately, you could use some of the user32 DLL calls to try and manipulate the controls within the Skype window.

I don't feel comfortable enough with the registry to go dig that way. thanks for the idea anyway :)

As I said here, I'll soon post the small skype API I've come up with to LAVAcr, then anyone will be very welcome to help improve it.

Link to comment

QUOTE (Antoine Châlons @ Dec 18 2008, 04:19 AM)

Yes, that's exactly where I started from. I didn't find a way pass in the username and password to login with the account I want :unsure:

Dunno if I missed it or if it's not possible with Skype4COM..

I don't think you can programmatically login. I only looked briefly at the Skype ActiveX interface and it seems if you open a reference to the SkypeClient interface you can define the user to login with in the IClient.OpenAuthorizationDialog method but it has no password so if this is what you are looking for it will simply put up a login dialog to prompt the current user for his password. The IApplication.Connect method doesn't seem better.

Rolf Kalbermatter

  • Like 1
Link to comment

QUOTE (rolfk @ Dec 18 2008, 10:04 AM)

I tried this method but in fact it does open the login dialogue, it opens the dialogue that lets you ask another skype user to be added to your contact list.

QUOTE (rolfk @ Dec 18 2008, 10:04 AM)

The IApplication.Connect method doesn't seem better.

I'm not really sure but it seems to me that this is to allow an application to connect to Skype using ActiveX.

This is a point I really want to dig in before I post my code to LAVAcr because currently when using my skype API in LV, skype prompts the user to allow LabVIEW.exe (or mylabiewapp.exe) to connect to skype.

Link to comment

QUOTE (Antoine Châlons @ Dec 18 2008, 06:08 AM)

I'm not really sure but it seems to me that this is to allow an application to connect to Skype using ActiveX.

This is a point I really want to dig in before I post my code to LAVAcr because currently when using my skype API in LV, skype prompts the user to allow LabVIEW.exe (or mylabiewapp.exe) to connect to skype.

There is probably no way to disable this completely. At least the first time you really do want to have this security check as otherwise every virus could connect to Skype and (ab)use it for whatever it wants. MS had this in the past that any application could conenct to Outlook over ActiveX and that was a perfect way for a Virus to harvest the entire email address list as well as using the Outlook credentials to send out tons of spam mails. So they had to disable unnoticed connection to Outlook over ActiveX with a security patch.

Maybe that Skype will cache a once given acknowledgement for a specific application somehow so it won't prompt each time again but the first prompt you do not want to give up ever!

Rolf Kalbermatter

  • Like 1
Link to comment

QUOTE (rolfk @ Dec 18 2008, 11:25 AM)

There is probably no way to disable this completely. At least the first time you really do want to have this security check as otherwise every virus could connect to Skype and (ab)use it for whatever it wants. MS had this in the past that any application could conenct to Outlook over ActiveX and that was a perfect way for a Virus to harvest the entire email address list as well as using the Outlook credentials to send out tons of spam mails. So they had to disable unnoticed connection to Outlook over ActiveX with a security patch.

Maybe that Skype will cache a once given acknowledgement for a specific application somehow so it won't prompt each time again but the first prompt you do not want to give up ever!

Rolf Kalbermatter

That makes a lot of sense indeed. And (more than) probably for the same reason there is no method to pass in username and password.

I'll have to document that in the API :yes:

Link to comment
  • 3 weeks later...

Just here to add my 2 cents, this won't work for all situations (like other operating systems) but could you use a windows DLL to act like you are pressing keys on the keyboard? Like in your LabVIEW program ask for the user name and password, then call Skype, wait for the login dialog to be active, and send the user name and password as keyboard keys (with tab in between) then return.

This doesn't use any kind of API, and is very prone to problems (like if Skype happens to change the login dialog) but for a quick and dirty solution I think this should work.

Link to comment

QUOTE (hooovahh @ Jan 5 2009, 05:32 PM)

Just here to add my 2 cents, this won't work for all situations (like other operating systems) but could you use a windows DLL to act like you are pressing keys on the keyboard? Like in your LabVIEW program ask for the user name and password, then call Skype, wait for the login dialog to be active, and send the user name and password as keyboard keys (with tab in between) then return.

This doesn't use any kind of API, and is very prone to problems (like if Skype happens to change the login dialog) but for a quick and dirty solution I think this should work.

Hmmm... well... I'm not sure there is a method to launch the login dialogue in the skype4com API, which would just close the debate.

That said I know I've once use a windows dll to set the cursor position, I image it's also possible to "fake" a clic and some keystroke - so technically you're probably right - but all that is kind of ugly and really unsafe :o .

Not sure I'd pass the LAVAcr requirements if I do that :D

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.