Sign in to follow this  
Followers 0
inm101

Emailing Verizon Wireless Text Message

4 posts in this topic

Hello,

I'm new to Auto - IT and have been experimenting with a program that will email me my text messaging usage from the Verizon Wireless website. Is there anything you see here that can be done differently/better?

Specifically, I'd like to come up with a better way to copy and paste the texting information. Currently, I'm just highlighting hit and hitting Control - C to copy it and then Control - V to paste it into a gmail message.

I'd also like to understand the IEGetobj function. I don't know how to identify the object.

Let me know what you think!

Thank you

-I changed my personal info in the code

#include <IE.au3>

;Close all IE windows
$list = ProcessList("iexplore.exe")
for $i = 1 to $list[0][0]
  ProcessClose("iexplore.exe")
next

;Getting VZW text message info
Send("#m")
Local   $URL = "www.verizonwireless.com/signin/"
Local $PID = Run (@ComSpec & " /c " & 'start /max iexplore ' & $url, "", @SW_HIDE)
WinWaitActive("My Verizon Online Sign In - Verizon Wireless - Windows Internet Explorer","","")
Sleep(5000)
MouseMove(657, 458)
MouseClick("Left",657,458,2)
Sleep(1000)
Send("USERNAME")
Sleep(500)
Send("{Tab}")
Sleep(500)
Send("{Tab}")
Sleep(500)
Send("PASSWORD")
Sleep(500)
Send("{ENTER}")
WinWaitActive("Verizon Wireless - My Verizon Overview - Windows Internet Explorer","","")
Sleep(2000)
MouseMove(448, 662)
MouseClick("left")
Sleep(3000)
MouseClickDrag("left", 347, 687, 524, 711)
Send("^c")
Sleep(2000)
WinClose("Verizon Wireless - My Verizon Overview - Windows Internet Explorer")

$oIE = _IECreate("http://www.gmail.com", 0, 1, 1, 1)
$UserName = "USERNAME"
$PassWord = "PASSWORD" 

;Found this little bit from another autoitforum post
$_UserName = _IEGetObjById($oIE, "Email")
;I don't understand how to identify the IEgetobjbyid object!
If IsObj($_UserName) Then $_UserName.value = $UserName
$_PassWord = _IEGetObjById($oIE, "Passwd")
If IsObj($_PassWord) Then $_PassWord.value = $PassWord 
$submit = _IEGetObjByName($oIE, "signIn")
If IsObj($submit) Then $submit.click

Sleep(3000)
WinWaitActive("Gmail - Inbox")
Send("{F4}")
Sleep(2000)
Send("http://mail.google.com/mail/")
Send("{#}")
Send("compose")
Send("{Enter}")
WinWaitActive("Gmail - Compose Mail - email@gmail.com - Windows Internet Explorer","","")
Send("emailaddress")
Sleep(5000)
Send("{tab}")
Sleep(5000)
Send("Messages")
Sleep(5000)
Send("{tab}")
Sleep(5000)
Send("^v")
Sleep(5000)
Send("{tab}")
Sleep(5000)
Send("{enter}")
Sleep(5000)
_IEQuit($oIE)

Share this post


Link to post
Share on other sites



Go to autoit help file, and look for _IE

There is a whole function UDF for IE and you can use it to not make the mouse move and make it more accurate

Share this post


Link to post
Share on other sites

Go to autoit help file, and look for _IE

There is a whole function UDF for IE and you can use it to not make the mouse move and make it more accurate

I've changed the initial VZW login so I'm not relying on mouse movement. But, the VZW text messaging statistics don't have an "ID" or a "Name" so I'm not sure how to best pull the messaging information.

Share this post


Link to post
Share on other sites

You probably want _IEFormElementGetCollection.

It gets a list of all the elements in a form, by number.

Look in the html and count how many elements are before the one you want (the username box, probably) and that will probably be the number you need. If that doesn't work you'll have to try trial and error...

heres a little excerpt from a chat program I made:

$OFORM = _IEFormGetObjByName($LOGINS, "Login")
$NAME = _IEFormElementGetCollection($OFORM, 0)
_IEFormElementSetValue($NAME, $LOGINNAME)

Search "_IEFormElementGetCollection " in the help file


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0