Beispiel #1
0
def hi():
    KeyboardUtil.setDefaultLanguage()
    storedClipboard = beforeSetClipboard()
    sendText("Hi ,")
    sendKey("Return Return Return Return")
    sendText("Regards,")
    sendKey("Return")
    sendText(Common.NAME)
    sendKey("Up Up Up Up Up End Left")
    afterSetClipboard(storedClipboard)
Beispiel #2
0
def hi():
    KeyboardUtil.setDefaultLanguage()
    storedClipboard = beforeSetClipboard()
    sendText("Hi ,")
    sendKey("Return Return Return Return")
    sendText("Regards,")
    sendKey("Return")
    sendText(Common.NAME)
    sendKey("Up Up Up Up Up End Left")
    afterSetClipboard(storedClipboard)
Beispiel #3
0
def newTask():
    """
    Sends a task template
    """
    KeyboardUtil.setDefaultLanguage()
    output = datetime.datetime.now().strftime("%Y%m%d%H%M%S")

    Tk().withdraw()
    text = tkSimpleDialog.askstring('Task category', 'Category::')

    if text is None or text == "": sys.exit()

    #works as well
    #time.sleep(0.24)
    #output = system.exec_command("date +%Y%m%d%H%M%S")
    #time = output.stdout.readline()
    storedClipboard = ClipboardUtil.pasteFromClipboardXsel()
    sendText("task " + text + "\n" + "    " + output + " " +  "\n\n" + "solution" + "\n\n" + "info" + "\n\n" + "keywords")
    sendKey("Home Up Up Up Up Up Up End")
    ClipboardUtil.copyToClipboardXclip(storedClipboard)
Beispiel #4
0
def newTask():
    """
    Sends a task template
    """
    KeyboardUtil.setDefaultLanguage()
    output = datetime.datetime.now().strftime("%Y%m%d%H%M%S")

    Tk().withdraw()
    text = tkSimpleDialog.askstring('Task category', 'Category::')

    if text is None or text == "": sys.exit()

    #works as well
    #time.sleep(0.24)
    #output = system.exec_command("date +%Y%m%d%H%M%S")
    #time = output.stdout.readline()
    storedClipboard = ClipboardUtil.pasteFromClipboardXsel()
    sendText("task " + text + "\n" + "    " + output + " " + "\n\n" +
             "solution" + "\n\n" + "info" + "\n\n" + "keywords")
    sendKey("Home Up Up Up Up Up Up End")
    ClipboardUtil.copyToClipboardXclip(storedClipboard)
Beispiel #5
0
def gnomeTerminal():
    KeyboardUtil.setDefaultLanguage()
    Common.openProcess('gnome-terminal', 'at@at-arch-laptop', '', '')
Beispiel #6
0
def search(keyword):
    KeyboardUtil.setDefaultLanguage()
    open()
    scanForKeyword()
    if keyword != "":
        SendToUi.sendKey(keyword)
Beispiel #7
0
def gnomeTerminal():
    KeyboardUtil.setDefaultLanguage()
    Common.openProcess('gnome-terminal', 'at@at-arch-laptop', '', '')
Beispiel #8
0
 def hitControF5(self, browser) :
     # body = browser.find_element_by_tag_name('body')
     # webdriver.ActionChains(browser).key_down(Keys.CONTROL, body).send_keys(Keys.F5).key_up(Keys.CONTROL, body).perform()
     browser.switch_to.window(browser.current_window_handle)
     KeyboardUtil.ctrlF5()
Beispiel #9
0
 def hitControlV(self, browser, element=None) :
     webdriver.ActionChains(browser).key_down(Keys.CONTROL, element).send_keys('v').key_up(Keys.CONTROL, element).perform()
     time.sleep(BrowserConstants.DEFAULT_WEBDRIVER_DELAY_FRACTION)
     KeyboardUtil.esc()
Beispiel #10
0
def search(keyword):
    KeyboardUtil.setDefaultLanguage()
    open()
    scanForKeyword()
    if keyword != "":
        SendToUi.sendKey(keyword)