Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
invcble committed Mar 11, 2024
1 parent f37892b commit a746579
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
IP_LIST.txt
surveybrowser.exe
5 changes: 4 additions & 1 deletion Macro Development/surveybrowser.py
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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)

Expand Down
47 changes: 47 additions & 0 deletions Macro Development/test.py
Original file line number Diff line number Diff line change
@@ -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)


8 changes: 8 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

-------------------------------

Expand Down

0 comments on commit a746579

Please sign in to comment.