diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..66a5886 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +IP_LIST.txt +surveybrowser.exe diff --git a/Macro Development/surveybrowser.py b/Macro Development/surveybrowser.py index 406440a..0390ec9 100644 --- a/Macro Development/surveybrowser.py +++ b/Macro Development/surveybrowser.py @@ -1,7 +1,7 @@ import sys from PyQt5.QtCore import QUrl, Qt from PyQt5.QtWidgets import QApplication, QMainWindow -from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile +from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineProfile, QWebEngineSettings app = QApplication(sys.argv) window = QMainWindow() @@ -11,6 +11,9 @@ browser = QWebEngineView(window) window.setCentralWidget(browser) +settings = browser.settings() +settings.setAttribute(QWebEngineSettings.PluginsEnabled, False) + profile = browser.page().profile() profile.setPersistentCookiesPolicy(QWebEngineProfile.NoPersistentCookies) diff --git a/Macro Development/test.py b/Macro Development/test.py new file mode 100644 index 0000000..9577702 --- /dev/null +++ b/Macro Development/test.py @@ -0,0 +1,47 @@ +import pyautogui as pag +import pydirectinput +pag.FAILSAFE = False +import time + + +# win = pyautogui.getWindowsWithTitle("WhatsApp") +# if win: +# kaltura = win[1] if len(win) > 1 else win[0] +# if kaltura.isMinimized: +# pyautogui.click(kaltura.left + 10, kaltura.top + 10) +# pyautogui.click(kaltura.left + 10, kaltura.top + 10) + +while True: + pag.moveTo(2511,1200) + time.sleep(2) + Kaltura_windows = pag.getWindowsWithTitle('Kaltura') + + # kaltura = next((win for win in Kaltura_windows), None) + + Kaltura_windows[1].restore() + while True: + try: + Kaltura_windows[1].activate() + break + except: + print("retrying") + time.sleep(0.3) + print(".") + time.sleep(0.3) + print(".") + time.sleep(0.3) + print(".") + + time.sleep(3) + # pydirectinput.click(2511,1333) + pydirectinput.moveTo(2511,1333) + time.sleep(0.5) + pydirectinput.click() + # pag.moveTo(2511,1333) + # time.sleep(2) + # # pag.mouseUp() + # # pag.mouseDown() + # pag.click() + # print(Kaltura_windows) + + diff --git a/TODO.txt b/TODO.txt index 6c3c7b0..a099316 100644 --- a/TODO.txt +++ b/TODO.txt @@ -16,6 +16,7 @@ -->>Participants: Open Survey 1 #Button: Start Mission 2 +====Experimenter: Ends game, Switches to Mission 2 -->>Participants: Closes browser, Loads Mission 2 ***Experimenter HAS CONTROL @@ -24,6 +25,7 @@ -->>Participants: Open Survey 2 #Button: Start Mission 3 +====Experimenter: Ends game, Switches to Mission 3 -->>Participants: Closes browser, Loads Mission 3 ***Experimenter HAS CONTROL @@ -32,6 +34,7 @@ -->>Participants: Open Survey 3 #Button: Stop Recording +====Experimenter: Ends game, Closes Artemis -->>Participants: Closes browser, Closes Artemis, Stops Kaltura, save&upload #Button: Log, SS and Video @@ -48,6 +51,11 @@ -------------NOTES------------- +increase recording button delay +survey next button delay, ID populate delay increase +make the browser fast +include team ID in screenshot, video name +just create an exe for stop recording, run as admins -------------------------------