Hey guys,

I want to make a Python program which I will use to automate certain tasks like opening TweetDeck and Skype everytime I boot up my laptop.

The problem is, I know how to open the programs(using subprocess.call), but I don't know how to pass the user ID and password. Can anybody help me?

Thanks a lot!

A simple thing to do would be to have skype remember your login information and connect every time it starts up. You could then launch it from whereever you chose - startup (msconfig) or using ur own script.

If you dont want to do that but want to know how to actually pass the username and password i suggest you try exploring the command line options for skype. As far as i recall, there aren't any options to pass login info. Try looking up a book (try flazx.com) called "skype hacks"

Another approach could be the use of win32com libraries in python. These libraries provide a way for programs to interact with GUI widgets in other programs that are running (eg. you could actually write a program to click the ok button of some dialog box on the screen). I don't know how these libraries will work with the widgets skype uses.

I have just one question.. why would u wanna go through all that trouble for a simple task like this

I just thought I would start off with the basics, and then implement some where else, like in make programs for my friends which starts Thunderbird on boot up, or TweetDeck on boot up, or heck, both!

And thanks for the link and mentioning Win32 module, I will surely look into it.

Also, how can I make a program to open on startup(any other way than dragging and dropping the program in the Startup group in the Start menu?)

Don't keep bumping on your thread.
No one is free enough to help you if you don't show effort.
I have see many thread started by you stating "How do I do this" without any efforts.

Learn to ask question the smart way : Read this page http://www.catb.org/~esr/faqs/smart-questions.html

Also, read the guidelines mentioned on this thread http://www.daniweb.com/forums/thread202628.html

Since you are a very experienced poster, I am showing some respect.

And, if you don't have a solution to my question, please don't clutter my thread by posting unnecessary replies!

import platform, shutil

a = platform.release() #  retrieves Windows release version

def vistamove():
    src = "your.file" # The name and directory of your file
    dst = "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup" # Where you want it to go
    shutil.move(src, dst) # Perform the moving action

def xpmove():
    src = "your.file"
    dst = "C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Startup"
    shutil.move(src, dst)

if a == "Vista":
    vistamove() 
elif a == "XP":
    xpmove()

This code checks the Windows release (XP or Vista only), and then copies the file to the All Users startup. If you want it for only specific users, just change it as necessary. Hope this helped.

This is done because the startup folder is placed in different areas on each OS.

Dude, you're asking a complicated question. (Also saw that you mentioned threading in another thread)

Not to discourage you, but taking on large projects that you don't fully understand usually end badly, because the code you spend so much time on turns out to be badly written and impossible to maintain or make changes. My advice: Plot out the bigger project, figure out the concepts you have to learn and write separate projects around those concepts. Then you can apply what you've learned towards the larger project.

Also: Begging for replies and asking people not to post is a bit contradictory, no? ;)

This article has been dead for over six months. Start a new discussion instead.