parent
cac1a84c6a
commit
6d442a424e
@ -0,0 +1,3 @@
|
|||||||
|
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
|
||||||
|
%windir%\System32\tscon.exe %%s /dest:console
|
||||||
|
)
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.1
|
Metadata-Version: 2.1
|
||||||
Name: pyOpenRPA
|
Name: pyOpenRPA
|
||||||
Version: 1.0.29
|
Version: 1.0.30
|
||||||
Summary: First open source RPA platform for business
|
Summary: First open source RPA platform for business
|
||||||
Home-page: https://gitlab.com/UnicodeLabs/OpenRPA
|
Home-page: https://gitlab.com/UnicodeLabs/OpenRPA
|
||||||
Author: Ivan Maslov
|
Author: Ivan Maslov
|
@ -0,0 +1,3 @@
|
|||||||
|
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
|
||||||
|
%windir%\System32\tscon.exe %%s /dest:console
|
||||||
|
)
|
@ -0,0 +1,14 @@
|
|||||||
|
import time #lib to create delay
|
||||||
|
from . import Screen # module to detect screen exists
|
||||||
|
#Check screen every 1 second
|
||||||
|
def CheckScreen(inIntervalSeconds=1):
|
||||||
|
while True:
|
||||||
|
#Check if screen exist
|
||||||
|
if not Screen.Exists():
|
||||||
|
#Send os command to create console version (base screen)
|
||||||
|
Screen.ConsoleScreenBase()
|
||||||
|
#Delay to create console screen
|
||||||
|
time.sleep(2)
|
||||||
|
#Delay
|
||||||
|
time.sleep(inIntervalSeconds)
|
||||||
|
return None
|
@ -0,0 +1,20 @@
|
|||||||
|
from PIL import ImageGrab
|
||||||
|
import os # to execute cmd commands
|
||||||
|
#Check if screen is exists
|
||||||
|
def Exists():
|
||||||
|
#Try to get 1 px from screen
|
||||||
|
try:
|
||||||
|
#Take 1 px
|
||||||
|
ImageGrab.grab(bbox=(0,0,1,1))
|
||||||
|
#Screen is exists - return True
|
||||||
|
return True
|
||||||
|
#Catch exception
|
||||||
|
except Exception:
|
||||||
|
#Screen does not exists - return false
|
||||||
|
return False
|
||||||
|
#Make console session
|
||||||
|
def ConsoleScreenBase():
|
||||||
|
#Get script folder path
|
||||||
|
lFolderPath = "/".join(__file__.split("\\")[:-1])
|
||||||
|
#Send command to cmd
|
||||||
|
os.system(os.path.join(lFolderPath,"ConsoleStart.bat"))
|
@ -0,0 +1,16 @@
|
|||||||
|
#Run example
|
||||||
|
#cd %~dp0..\..\Sources
|
||||||
|
#..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe -m pyOpenRPA.Tools.RobotScreenActive
|
||||||
|
#pause >nul
|
||||||
|
#Import parent folder to import current / other packages
|
||||||
|
#########################################################
|
||||||
|
import sys
|
||||||
|
import subprocess #start process async
|
||||||
|
import os #path, run, remove
|
||||||
|
import time #timer
|
||||||
|
import importlib
|
||||||
|
#lFolderPath = "\\".join(__file__.split("\\")[:-4])
|
||||||
|
lFolderPath = "/".join(__file__.split("/")[:-4])
|
||||||
|
sys.path.insert(0, lFolderPath)
|
||||||
|
from pyOpenRPA.Tools.RobotScreenActive import Monitor
|
||||||
|
Monitor.CheckScreen()
|
@ -0,0 +1,3 @@
|
|||||||
|
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
|
||||||
|
%windir%\System32\tscon.exe %%s /dest:console
|
||||||
|
)
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.1
|
Metadata-Version: 2.1
|
||||||
Name: pyOpenRPA
|
Name: pyOpenRPA
|
||||||
Version: 1.0.29
|
Version: 1.0.30
|
||||||
Summary: First open source RPA platform for business
|
Summary: First open source RPA platform for business
|
||||||
Home-page: https://gitlab.com/UnicodeLabs/OpenRPA
|
Home-page: https://gitlab.com/UnicodeLabs/OpenRPA
|
||||||
Author: Ivan Maslov
|
Author: Ivan Maslov
|
@ -0,0 +1,3 @@
|
|||||||
|
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
|
||||||
|
%windir%\System32\tscon.exe %%s /dest:console
|
||||||
|
)
|
@ -0,0 +1,14 @@
|
|||||||
|
import time #lib to create delay
|
||||||
|
from . import Screen # module to detect screen exists
|
||||||
|
#Check screen every 1 second
|
||||||
|
def CheckScreen(inIntervalSeconds=1):
|
||||||
|
while True:
|
||||||
|
#Check if screen exist
|
||||||
|
if not Screen.Exists():
|
||||||
|
#Send os command to create console version (base screen)
|
||||||
|
Screen.ConsoleScreenBase()
|
||||||
|
#Delay to create console screen
|
||||||
|
time.sleep(2)
|
||||||
|
#Delay
|
||||||
|
time.sleep(inIntervalSeconds)
|
||||||
|
return None
|
@ -0,0 +1,20 @@
|
|||||||
|
from PIL import ImageGrab
|
||||||
|
import os # to execute cmd commands
|
||||||
|
#Check if screen is exists
|
||||||
|
def Exists():
|
||||||
|
#Try to get 1 px from screen
|
||||||
|
try:
|
||||||
|
#Take 1 px
|
||||||
|
ImageGrab.grab(bbox=(0,0,1,1))
|
||||||
|
#Screen is exists - return True
|
||||||
|
return True
|
||||||
|
#Catch exception
|
||||||
|
except Exception:
|
||||||
|
#Screen does not exists - return false
|
||||||
|
return False
|
||||||
|
#Make console session
|
||||||
|
def ConsoleScreenBase():
|
||||||
|
#Get script folder path
|
||||||
|
lFolderPath = "/".join(__file__.split("\\")[:-1])
|
||||||
|
#Send command to cmd
|
||||||
|
os.system(os.path.join(lFolderPath,"ConsoleStart.bat"))
|
@ -0,0 +1,16 @@
|
|||||||
|
#Run example
|
||||||
|
#cd %~dp0..\..\Sources
|
||||||
|
#..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe -m pyOpenRPA.Tools.RobotScreenActive
|
||||||
|
#pause >nul
|
||||||
|
#Import parent folder to import current / other packages
|
||||||
|
#########################################################
|
||||||
|
import sys
|
||||||
|
import subprocess #start process async
|
||||||
|
import os #path, run, remove
|
||||||
|
import time #timer
|
||||||
|
import importlib
|
||||||
|
#lFolderPath = "\\".join(__file__.split("\\")[:-4])
|
||||||
|
lFolderPath = "/".join(__file__.split("/")[:-4])
|
||||||
|
sys.path.insert(0, lFolderPath)
|
||||||
|
from pyOpenRPA.Tools.RobotScreenActive import Monitor
|
||||||
|
Monitor.CheckScreen()
|
@ -0,0 +1,3 @@
|
|||||||
|
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
|
||||||
|
%windir%\System32\tscon.exe %%s /dest:console
|
||||||
|
)
|
@ -0,0 +1,14 @@
|
|||||||
|
import time #lib to create delay
|
||||||
|
from . import Screen # module to detect screen exists
|
||||||
|
#Check screen every 1 second
|
||||||
|
def CheckScreen(inIntervalSeconds=1):
|
||||||
|
while True:
|
||||||
|
#Check if screen exist
|
||||||
|
if not Screen.Exists():
|
||||||
|
#Send os command to create console version (base screen)
|
||||||
|
Screen.ConsoleScreenBase()
|
||||||
|
#Delay to create console screen
|
||||||
|
time.sleep(2)
|
||||||
|
#Delay
|
||||||
|
time.sleep(inIntervalSeconds)
|
||||||
|
return None
|
@ -0,0 +1,20 @@
|
|||||||
|
from PIL import ImageGrab
|
||||||
|
import os # to execute cmd commands
|
||||||
|
#Check if screen is exists
|
||||||
|
def Exists():
|
||||||
|
#Try to get 1 px from screen
|
||||||
|
try:
|
||||||
|
#Take 1 px
|
||||||
|
ImageGrab.grab(bbox=(0,0,1,1))
|
||||||
|
#Screen is exists - return True
|
||||||
|
return True
|
||||||
|
#Catch exception
|
||||||
|
except Exception:
|
||||||
|
#Screen does not exists - return false
|
||||||
|
return False
|
||||||
|
#Make console session
|
||||||
|
def ConsoleScreenBase():
|
||||||
|
#Get script folder path
|
||||||
|
lFolderPath = "/".join(__file__.split("\\")[:-1])
|
||||||
|
#Send command to cmd
|
||||||
|
os.system(os.path.join(lFolderPath,"ConsoleStart.bat"))
|
@ -0,0 +1,16 @@
|
|||||||
|
#Run example
|
||||||
|
#cd %~dp0..\..\Sources
|
||||||
|
#..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe -m pyOpenRPA.Tools.RobotScreenActive
|
||||||
|
#pause >nul
|
||||||
|
#Import parent folder to import current / other packages
|
||||||
|
#########################################################
|
||||||
|
import sys
|
||||||
|
import subprocess #start process async
|
||||||
|
import os #path, run, remove
|
||||||
|
import time #timer
|
||||||
|
import importlib
|
||||||
|
#lFolderPath = "\\".join(__file__.split("\\")[:-4])
|
||||||
|
lFolderPath = "/".join(__file__.split("/")[:-4])
|
||||||
|
sys.path.insert(0, lFolderPath)
|
||||||
|
from pyOpenRPA.Tools.RobotScreenActive import Monitor
|
||||||
|
Monitor.CheckScreen()
|
@ -0,0 +1,3 @@
|
|||||||
|
cd %~dp0..\..\Sources
|
||||||
|
..\Resources\WPy64-3720\python-3.7.2.amd64\python.exe -m pyOpenRPA.Tools.RobotScreenActive
|
||||||
|
pause >nul
|
Loading…
Reference in new issue