@@ -57,22 +57,22 @@ def execute_outlook_script(command)
57
57
end
58
58
59
59
# This function prints a listing of available mailbox folders
60
- def listBoxes
60
+ def list_boxes
61
61
command = 'List-Folder'
62
62
execute_outlook_script ( command )
63
63
end
64
64
65
65
# This functions reads Outlook using powershell scripts
66
- def readEmails ( folder , keyword , atrans , acftrans )
66
+ def read_emails ( folder , keyword , atrans , acftrans )
67
67
view = framework . threads . spawn ( "ButtonClicker" , false ) {
68
- clickButton ( atrans , acftrans )
68
+ click_button ( atrans , acftrans )
69
69
}
70
70
command = "Get-Emails \" #{ keyword } \" \" #{ folder } \" "
71
71
execute_outlook_script ( command )
72
72
end
73
73
74
- def clickButton ( atrans , acftrans )
75
- # This functions clicks on the security notification generated by Outlook.
74
+ # This functions clicks on the security notification generated by Outlook.
75
+ def click_button ( atrans , acftrans )
76
76
sleep 1
77
77
hwnd = client . railgun . user32 . FindWindowW ( nil , "Microsoft Outlook" )
78
78
if hwnd != 0
@@ -90,8 +90,8 @@ def clickButton(atrans,acftrans)
90
90
end
91
91
end
92
92
93
+ # Main method
93
94
def run
94
- # Main method
95
95
folder = datastore [ 'FOLDER' ]
96
96
keyword = datastore [ 'KEYWORD' ] . to_s
97
97
allow = datastore [ 'A_TRANSLATION' ]
@@ -145,9 +145,9 @@ def run
145
145
case action . name
146
146
when 'LIST'
147
147
print_good ( 'Available folders in the mailbox: ' )
148
- listBoxes
148
+ list_boxes
149
149
when 'SEARCH'
150
- readEmails ( folder , keyword , atrans , acftrans )
150
+ read_emails ( folder , keyword , atrans , acftrans )
151
151
else
152
152
print_error ( "Unknown Action: #{ action . name } " )
153
153
end
0 commit comments