Esempio n. 1
0
    def __init__(self):



        self.forms = Form((490,233),195,fontsize=15,bg=(255,255,255),hlcolor=((90,40,40)),maxlines=1)
        self.forms.CURSOR = False

        #Carregando o vetor da fase pelo construtor
        self.backGround = Object("src/Fases/Main/fundo.png")

        self.MainObjects = [ObjectEvent((21,500), "src/Fases/Main/btnSair.png",
                                    "src/Fases/Main/btnSair_move.png",
                                    "src/Fases/Main/btnSair_click.png",self.out),
                            ObjectEvent((875,470),"src/Fases/Main/btnJogar.png",
                                    "src/Fases/Main/btnJogar_move.png",
                                    "src/Fases/Main/btnJogar_click.png",self.next),
                            ObjectEvent((320,376),"src/Fases/Main/btnEscolaPublica.png",
                                    "src/Fases/Main/btnEscolaPublica_click.png",
                                    "src/Fases/Main/btnEscolaPublica_click.png",self.escolaPublica),
                            ObjectEvent((520,376),"src/Fases/Main/btnEscolaParticular.png",
                                    "src/Fases/Main/btnEscolaParticular_click.png",
                                    "src/Fases/Main/btnEscolaParticular_click.png",self.escolaParticular)]


        self.NextCurrentState = "Fase1"
        self.updateState = False
        self.effect = 0

        pass
Esempio n. 2
0
parser.add_argument('--password', nargs=1, required=True)
parser.add_argument('--company', nargs=1, required=True)
parser.add_argument('--headless', nargs=1, required=True)
args = parser.parse_args()

inputFile = str(args.inputFile[0])
outputFile = str(args.outputFile[0])
companyId = str(args.company[0])
userId = str(args.userId[0])
password = str(args.password[0])
headless = str(args.headless[0])

spreadsheet = Spreadsheet(inputFile)
# To begin, we load the form on the supplied URL.
# This is just the starting point, so the URL will change as we navigate around.
form = Form('https://www.e-oscar-web.net/EntryController?trigger=Login',
            headless)

# First we need to log in.
form.fill([
    form.select(id='companyId', val=companyId),
    form.select(id='userId', val=userId),
    form.select(id='password', val=password),
    form.select(id='securityMsgAck1'),
    form.select(selector='.loginBtn')
])

#We need to get the correct AUD Panel

with form.frame('topFrame'):
    form.fill([form.select(id='DFProcessAUDanch')])
Esempio n. 3
0
class MainState(GameState):


    def next(self):
        self.updateState = True
        self.NextCurrentState = "Fase1"
        self.effect =2

    def out (self):
        self.updateState = True
        self.NextCurrentState = "Quit"

    def escolaParticular(self):
        self.MainObjects[3].idle = self.MainObjects[3].click
        self.MainObjects[2].idle = self.MainObjects[2].oldIdle
        pass

    def escolaPublica (self):
        self.MainObjects[2].idle = self.MainObjects[2].click
        self.MainObjects[3].idle = self.MainObjects[3].oldIdle
        pass

    def __init__(self):



        self.forms = Form((490,233),195,fontsize=15,bg=(255,255,255),hlcolor=((90,40,40)),maxlines=1)
        self.forms.CURSOR = False

        #Carregando o vetor da fase pelo construtor
        self.backGround = Object("src/Fases/Main/fundo.png")

        self.MainObjects = [ObjectEvent((21,500), "src/Fases/Main/btnSair.png",
                                    "src/Fases/Main/btnSair_move.png",
                                    "src/Fases/Main/btnSair_click.png",self.out),
                            ObjectEvent((875,470),"src/Fases/Main/btnJogar.png",
                                    "src/Fases/Main/btnJogar_move.png",
                                    "src/Fases/Main/btnJogar_click.png",self.next),
                            ObjectEvent((320,376),"src/Fases/Main/btnEscolaPublica.png",
                                    "src/Fases/Main/btnEscolaPublica_click.png",
                                    "src/Fases/Main/btnEscolaPublica_click.png",self.escolaPublica),
                            ObjectEvent((520,376),"src/Fases/Main/btnEscolaParticular.png",
                                    "src/Fases/Main/btnEscolaParticular_click.png",
                                    "src/Fases/Main/btnEscolaParticular_click.png",self.escolaParticular)]


        self.NextCurrentState = "Fase1"
        self.updateState = False
        self.effect = 0

        pass


    def draw(self,tela):

        #Pintando o vetor da fase
        self.backGround.draw(tela)
        DrawVector(self.MainObjects,tela)

        self.forms.show()

        pass


    def event (self,event):

        #self.forms.wakeup(event)

        if event.type == pygame.MOUSEMOTION:
            for q in self.MainObjects:
                q.update(pygame.mouse.get_pos())

        if event.type == pygame.MOUSEBUTTONDOWN:
            for q in self.MainObjects:
                q.clickStart(pygame.mouse.get_pos())

        if event.type == pygame.MOUSEBUTTONUP:
            for q in self.MainObjects:
                if q.clickEnd(pygame.mouse.get_pos()):
                    return



    def update(self,dt):
        pass

    pass
Esempio n. 4
0
from file_lib import Spreadsheet
from lib import SleepElement, Form

# We create a reference to our spreadsheet so that we can fill data from it and update it.
spreadsheet = Spreadsheet('sample.csv')

# To begin, we load the form on the supplied URL.
# This is just the starting point, so the URL will change as we navigate around.
form = Form('https://www.e-oscar-web.net/EntryController?trigger=Login')

# First we need to log in.
form.fill([
    form.select(id='companyId', val='RegID'),
    form.select(id='userId', val='UserID'),
    form.select(id='password', val='password'),
    form.select(id='securityMsgAck1'),
    SleepElement(
        3
    ),  # For demonstration purposes only. Fills in info and then waits 3 seconds.
    form.select(selector='.loginBtn')
])

with form.frame('topFrame'):
    form.fill([form.select(id='AUDButton')])

# Clicking the .loginBtn will cause the form to submit and we'll be navigated to a new page.
# Now we want to submit the form a bunch of times. Let's use our spreadsheet.
for row in spreadsheet.rows:
    #  We can update the spreadsheet with data from the form.
    #  Here, we are updating the AUD column of each row to be the text of the #aud element.
    row.set('AUD', form.select(id='aud').text)