Jump to content

Recommended Posts

Posted

Hello, im pretty new at Autoit so im sure my question is elementary to you fellow auto-ers

ANYWAYS, i was creating simple-ish program that when ran would ask a couple questions, once the correct answer was selected it would launch IE and then log into my myspace then show a message then log out and close (yea pretty pointless). So what i need help with is that making all of the msgs work together and fluintly(sp?), but it doesnt work as planned and i keep getting errors, and every time i try to fix them i get new ones.

here is the code:

#NoTrayIcon
#include <IE.au3>
 
$answer = MsgBox(36, "CLICK YES!!!", "Would you like to go on my Myspace?")
        if $answer = 6 then
            Dim $oIE
    Elseif $answer = 7 then 
            dim $rawr = MsgBox(36, "Why?", "Are you sure you would not like to go on my myspace?")
    Endif
        if $rawr = 6 then 
            dim $poop = Msgbox(36, "Wtf", "Why the hell not? Just click yes to go on it. If you dont you're a loser")
    Elseif $rawr = 7 then
            dim $answer
    EndIf
        if local $poop = 7 then
            dim $answer
    Elseif $poop = 7 then
            dim $answer
    Endif

; Open IE and log into myspace
$sUsername = "myusername"
$sPassword = "mypassword"
 
$oIE = _IECreate("http://myspace.com")
 
$oform = _IEFormGetObjByName($oIE, "LoginForm")
$ologin = _IEFormElementGetObjByName($oform, "ctl00$ctl00$Main$cpMain$LoginBox$Email_Textbox")
$opassword = _IEFormElementGetObjByName($oform, "ctl00$ctl00$Main$cpMain$LoginBox$Password_Textbox")
 
_IEFormElementSetValue($ologin, $sUsername)
_IEFormElementSetValue($opassword, $sPassword)
_IEFormSubmit($oform)


MsgBox(64, "Congratulations", "nice myspace eh?")

; Log Out & close IE
_IENavigate($oIE, "http://collect.myspace.com/index.cfm?fuseaction=signout")
_IEQuit ($oIE)

The actual purpose of logging into my myspace and closing IE works but stringing the messages together doesnt seem to work, althogh im sure i did something wrong.

P.S. the contents of the msgs are by my lovely friend :)

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...