Created
September 1, 2015 08:36
-
-
Save cruor99/13759cdc3768b1af7b76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Cruor' | |
from kivy.app import App | |
from kivy.uix.button import Button | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.screenmanager import Screen | |
from kivy.config import Config | |
#from pywinauto.findwindows import find_window | |
#from pywinauto.win32functions import SetForegroundWindow, ShowWindow, SetFocus | |
# from pywinauto.win32defines import SW_MAXIMIZE, SW_SHOW, SW_HIDE, SW_RESTORE | |
#from pywinauto.win32defines import * | |
Config.set('graphics', 'borderless', 1) | |
import threading | |
class CodeScreen(Screen): | |
def confirm_code(self, displaycode): | |
print displaycode | |
class MsaleRoot(BoxLayout): | |
def __init__(self, **kwargs): | |
super(MsaleRoot, self).__init__(**kwargs) | |
# List of previous screens | |
self.screen_list = [] | |
def changeScreen(self, next_screen): | |
if self.ids.msale_screen_manager not in self.screen_list: | |
self.screen_list.append(self.ids.msale_screen_manager.current) | |
if next_screen == "gavekort": | |
self.ids.msale_screen_manager.current = "code_screen" | |
class mSaleSMSApp(App): | |
def __init__(self, **kwargs): | |
super(mSaleSMSApp, self).__init__(**kwargs) | |
# t = threading.Timer(10, self.makefg) | |
# t.start() | |
#def makefg(self): | |
#window = find_window(title="mSaleSMS") | |
#SetForegroundWindow(window) | |
#ShowWindow(window, SW_HIDE) | |
#ShowWindow(window, SW_MAXIMIZE) | |
#ShowWindow(window, SW_SHOW) | |
#ShowWindow(window, SW_RESTORE) | |
#ShowWindow(window, SW_SHOWNORMAL) | |
#SetFocus(window) | |
#print "Set foreground test" | |
#t = threading.Timer(60, self.makefg) | |
#t.start() | |
def build(self): | |
return MsaleRoot() | |
if __name__ == "__main__": | |
mSaleSMSApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment