Skip to content

Commit ea8ce67

Browse files
committed
transaction recording function
1 parent 53d9694 commit ea8ce67

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

model/DataStorage.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
path_to_bot = ""
12
import sikuli.Sikuli
23

34

@@ -12,15 +13,9 @@ def __init__(self, program):
1213

1314
def write(self, transaction):
1415
#write the transaction record to a text file
15-
transaction_file = open(
16-
17-
record_app = App("Notepad")
18-
if not record_app.window():
19-
App.open("Notepad"); wait(1)
20-
record_app.focus()
21-
type(self.convert_trans_to_string(transaction))
22-
wait(0.5)
23-
App.focus("Magic Online")
16+
transaction_file = open(path_to_bot + "transaction_records/transactions.txt", "w")
17+
current_transaction = self.convert_trans_to_string(transaction)
18+
#now write the transaction to the file
2419

2520
def convert_trans_to_string(self, transaction):
2621
"""takes the transaction variable created in Session class and converts it to string"""

0 commit comments

Comments
 (0)