AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Outlook Script

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
MAD-DUKE



Joined: 08 Jun 2009
Posts: 4

PostPosted: Wed Mar 17, 2010 11:17 pm    Post subject: Outlook Script Reply with quote

I have been using this script for about a year now. I have learned a lot more from scripting my video games, and could actually do a little cleaning up on this, but I do not know enough to do what I want.

Basically when I hold Alt and hit Period the script asks me to fill in a few boxes and then types it out in an Email. I have noticed even though it is rare that it will sometimes type what should be in the body of the email inside the subject line or same with subject inside the address bar.

I am also interested in speeding this up so instead of it waiting for it to type the information out it kind of just poof appears where it should be. Any ideas?

I plan to make another program similar to this and any help would be appreciated, my next project is making some Oracle scripts to go with this.

Quote:

!.::gosub, emailit
pause::reload

emailit:
gosub, setwin
gosub, gatherinfo
gosub, opennewemail
gosub, tobar
gosub, ccbar
gosub, subject
gosub, body
return

setwin:
IfWinExist, Inbox - Microsoft Outlook
winActivate
else
run, outlook.exe
sleep, 1000
return

gatherinfo:
InputBox, firstname, Enter END-USER's First Name, Enter the first three letters of the End-User's First Name,
InputBox, lastname, Enter END-USER's Last Name, Enter the first three letters of the End-User's Last Name,
InputBox, item, Enter IT Equipment, Enter IT Equipment,
InputBox, po, Enter Purchase Order Number, Enter Purchase Order Number,
InputBox, workordnum, Enter Work Order Number, Enter Work Order Number,
return

testplay:
MsgBox, You entered "%name%", "%item%", "%po%", "%workordnum%"
return

opennewemail:
send {alt down}
sleep, 100
send {n}
sleep, 100
send {m}
sleep, 100
send {alt up}
sleep, 2000
return

pullrest:
sleep, 100
send, {ctrl down}
sleep, 100
send, {k}
sleep, 100
send, {ctrl up}
sleep, 100
return

tobar:
send it service lake
gosub, pullrest
send bev ka
gosub, pullrest
send {tab}
sleep, 100
return

ccbar:
send % firstname " " lastname
gosub, pullrest
sleep, 100
send {enter}
sleep, 100
send {tab}
sleep, 100
return

subject:
send % item
sleep, 100
send {tab}
sleep, 100
return

body:
send The IT Equipment you ordered under PO
send {#}
send % po " (" item ") has been received and will be turned over to the IT group for configuration, licensing or other necessary processes. If you do not receive product or status update from the IT group within 7 business days of this notice please contact them for an update."
sleep, 100
send {enter 2}
sleep, 100
send % "Please DO NOT create a track-It Work-Order for deployment, Work Order No. " workordnum " already in place."
sleep, 100
return
Back to top
View user's profile Send private message
poo_noo



Joined: 08 Dec 2006
Posts: 248
Location: Sydney Australia

PostPosted: Thu Mar 18, 2010 12:32 am    Post subject: Reply with quote

I would look into 'mailto' if I were you. EG
Code:
Run, mailto:someone@domain.com?subject=Subject text&body=This is the message body's text `%0ALine 2 is here

_________________
Paul O
Back to top
View user's profile Send private message Visit poster's website
MAD-DUKE



Joined: 08 Jun 2009
Posts: 4

PostPosted: Thu Mar 18, 2010 10:38 pm    Post subject: Reply with quote

Thanks I will look into that

Any other ideas are welcomed as well.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group