Sign in to follow this  
Followers 0
erikj

Automated Daily copy from table calendar

1 post in this topic

I have a room reservation systtem that has a web based viewer for staff members. I am automating a script to pull the events of the current day - room #, event name and time. place these events into an excel document, which will subsequently automatically be viewed in the kiosk. I have everything down up to the point where the autoit script copies the event/room/time and pastes it into my excel doc. Cannot figure out how to make it work. any help would be appreciated!

#include <IE.au3>
#Include <Date.au3>
#include <Array.au3>
#include <ExcelCOM_UDF.au3>
$oIE = _IECreate()
_IENavigate($oIE, "http://128.164.182.42:8001/Calendar/")
$oFrame = _IeFrameGetObjByName ($oIe, "buttonbar")
Sleep(750)
Send("{Enter}")
$oform = _IEFormGetObjByName($oFrame, "CalForm")
$oSelect = _IEFormElementGetObjByName ($oForm, "calendar")
 _IEFormElementOptionselect ($oSelect, "All_Room_View", 1, "byText")
Sleep(1000)
Send("{Tab}")
Send("{Tab}")
Send("{Enter}")
        
        
Sleep(750)
$oFrame = _IEFrameGetObjByName ($oIE, "mainframe")
$oTable = _IETableGetCollection ($oIE, 10)
$aTableData = _IETableWriteToArray ($oTable, True)
_IELoadWait($oIE)
$todayevent = "c:\todaysevents.xlsx"
$oExcel= _ExcelBookOpen($todayevent)
sleep(1500)
_ExcelWriteSheetFromArray($oExcel, $aTableData, 3)

sleep(1500)

the html from the viewer looks something like this

CODE
<BODY BGCOLOR="#EFEEE5" rightmargin="0px" leftmargin="0px" topmargin="0px" LINK="#0000CC" VLINK="#9999FF"ALINK="#0000CC">

<TABLE BORDER = "1" CELLPADDING = "5" CELLSPACING = "0" CLASS="milummain" WIDTH="100%">

<TR>

<TD COLSPAN=4 BGCOLOR="#DBE4F8" ALIGN=CENTER CLASS="monthhead" >

Events For Today Wednesday September 24, 2008 - Forward 0 Days

</TD>

</TR>

<TR CLASS="milummain" >

<TD BACKGROUND="./Calendar_art2/bluegrad2.gif"><B>Date</B></TD>

<TD WIDTH=190 BACKGROUND="./Calendar_art2/bluegrad2.gif"><B>Time</B></TD>

<TD BACKGROUND="./Calendar_art2/bluegrad2.gif"><B>Event Name</B></TD>

<TD BACKGROUND="./Calendar_art2/bluegrad2.gif"><B>Event Details</B></TD><TR>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">Wednesday , <A HREF=calendar.cgi/calendar.cgi?offset=20&calendar=./All_Room_View&day=24&year=2008&month=9&session_file=1222303895534&view_day=on style=color:990033>9/24/2008</A></TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">10:30 AM - 12:00 PM</TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">Capitol Educators Meeting</TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">Names are: 208{2134-G-St.}Deans-Conference-12max, All Room View, tebattle<BR>Keyword: None<BR>Label: None<BR>Agenda: Name: Tee Battle <BR/>Phone: 4-6161 <BR/>Event Title: Capital Educators Meeting <BR/>E-mail: tebattle@gwu.edu <BR/>Room: 208 (Reserved for Deans) - Cap. 12 <BR/>Start time: 10:30 AM End time: 12:00 PM <BR/>Date: September : 24 : 2008</TD></TR>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">Wednesday , <A HREF=calendar.cgi/calendar.cgi?offset=20&calendar=./All_Room_View&day=24&year=2008&month=9&session_file=1222303895534&view_day=on style=color:990033>9/24/2008</A></TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">11:00 AM - 12:00 PM</TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">HEA </TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">Names are: All Room View, B08{2134-G}-12max, billym<BR>Keyword: None<BR>Label: None<BR>Agenda: Name: Billy Molasso <BR/>Phone: 4-0839 <BR/>Event Title: HEA <BR/>E-mail: billym@gwu.edu <BR/>Room: B08(2134 G St) - Cap. 12 <BR/>Start time: 11:00 AM End time: 12:00 PM <BR/>Date: September : 24 : 2008 <BR/>Attendees: 5</TD></TR>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">Wednesday , <A HREF=calendar.cgi/calendar.cgi?offset=20&calendar=./All_Room_View&day=24&year=2008&month=9&session_file=1222303895534&view_day=on style=color:990033>9/24/2008</A></TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">2:00 PM - 3:30 PM</TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">Elementary Education Seminar</TD>

<TD BGCOLOR="#ffffff"VALIGN="top" class="milummain" style="color:990033">Names are: 312{2134-G}-10max, All Room View, sbeck<BR>Keyword: None<BR>Label: None<BR>Agenda: Name: Sylven Beck <BR/>Phone: x49084 <BR/>Event Title: Elem Ed Seminar <BR/>E-mail: sbeck@gwu.edu <BR/>Room: 312 (2134 G St.) - Cap. 10 <BR/>Start time: 2:00 PM End time: 3:30 PM <BR/>Date: September : 24 : 2008 <BR/>Attendees: 6</TD></TR>

<TD BGCOLOR="#DBE4F8" COLSPAN=4 CLASS="milummain">Event Colors Represent The Number of Day Until The Event :<BR><SPAN style="color:990033">Red = Today</SPAN>, <SPAN style="COLOR:FF6600">Orange = Tomorrow</SPAN> , <SPAN Style="COLOR:336633">Green = Three Days Away </Span>& Blue = More Than 3 Days Away</TD>

</TD>

</TR>

</TABLE>

</BODY>

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