# ActionDetails_Str

VALUE:
'Dim the primary objects.

Dim objApp
Dim objIE
Dim objWindow

'Set the primary objects.

Set objApp = CreateObject("Shell.Application")
Set objIE = Nothing

'Identify the IE window and connect.

For Each objWindow In objApp.Windows
  If (InStr(objWindow.


VALUE:
Name, "Internet Explorer")) Then
    Set objIE = objWindow
    Exit For
  End If
Next

With objIE
 
  .Visible = True 'Make sure to set the window of IE to visible.

  Do While .Busy Or .readyState <> 4
    'Do nothing, wait for the browser to load.
  Loo


VALUE:
p

  Do While .Document.ReadyState <> "complete"
    'Do nothing, wait for the VBScript to load the document of the website.
  Loop

  'Retrieve the variable values.

  Dim intMonth
  Dim intWeekStart
  Dim intDay
  Dim intDayNumber

  RPAEngine.GetVar "M


VALUE:
onth", intMonth
  RPAEngine.GetVar "WeekStart", intWeekStart
  RPAEngine.GetVar "Day", intDay
  RPAEngine.GetVar "DayNumber", intDayNumber

  'Perform the action.

  If (intMonth = 0) Then
    'Click on a date in the current month

    .Document.getElemen


VALUE:
tsByClassName("calendar-month").Item(0).getElementsByClassName("calendar-day-button").Item(intDayNumber).Click
 
  Else
    'Click on a date in a future month
    
    intDay = intWeekStart + intDay - 2
    .Document.getElementsByClassName("calendar-month


VALUE:
").Item(intMonth).getElementsByClassName("calendar-day-button").Item(intDay).Click

  End If

End With

'Clear the objects.

On Error Resume Next

objApp = Nothing
objIE = Nothing
objWindow = Nothing


# Actions

NOTES:
Retrieve the week day of the first of the month


NOTES:
Retrieve the day to click if in current month


NOTES:
Execute the click on the website based on the variables above


NOTES:
Delete the temp variables after using them


