本文整理汇总了Python中myTools.getFocus函数的典型用法代码示例。如果您正苦于以下问题:Python getFocus函数的具体用法?Python getFocus怎么用?Python getFocus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFocus函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: fCreate_CreditsForMonth
def fCreate_CreditsForMonth(pMonth):
# ---------------------------------------------------#
myTools.sectionStartTimeStamp("credits" + str(pMonth))
logging.debug("Create_CreditsForMonth: " + str(pMonth))
allClients = names_Init.fInit_Clients()
count = 0
myTools.getFocus()
# open a/r tran list
type("t", KeyModifier.CTRL)
myTools.waitForTransList()
for oneClient in allClients:
count += 1
# always create credits for first 5 clients
# then create credits for 1 out of 9 next clients
if (count in range(6)) or ((count + pMonth) % 9 == 0):
creditAmount = pMonth + pMonth / float(100)
fCreate_OneCredit(oneClient, count, pMonth, creditAmount)
else:
logging.debug("-- skip: " + str(pMonth) + "-" + oneClient)
type(Key.F4, KeyModifier.CTRL)
time.sleep(1)
type(Key.F4, KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
myTools.checkProcesses()
示例2: fSetup_ClientHold
def fSetup_ClientHold():
#---------------------------------------------------#
myTools.sectionStartTimeStamp("set up client hold")
logging.debug('set up client hold')
# make sure timeslips has focus
myTools.getFocus()
logging.debug('- open client list')
type("n",KeyModifier.ALT)
type("i")
time.sleep(1)
fHold_Time_NextBill_Hours()
fHold_Exp_AllBills_Amount()
fHold_Bill_AllBills_AmountAndHours()
fHold_AR_AllBills()
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
示例3: fChange_ClientSettings
def fChange_ClientSettings():
#---------------------------------------------------#
logging.debug('- Change_ClientSettings')
myTools.getFocus()
logging.debug('-- change a client')
type("i",KeyModifier.CTRL)
time.sleep(1)
type(Key.ENTER)
time.sleep(1)
myTools.pressF6(4)
if Settings.tsVersion > "2014":
myTools.pressF6(3)
time.sleep(1)
myTools.pressTAB(3)
time.sleep(1)
type("my")
logging.debug('-- save client')
type("s",KeyModifier.CTRL)
fExport_ClientSettings()
fExport_TemplateSettings()
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
type(Key.F4,KeyModifier.CTRL)
示例4: fFundsAccouts_Setup
def fFundsAccouts_Setup():
# - - - - - - - - - - - - - - - - - - - - - - - - - #
myTools.sectionStartTimeStamp("funds account")
logging.debug('FundsAccount_Setup')
# make sure timeslips has focus
myTools.getFocus()
# switch date to 1/27/13
fSet_BillDate(1)
fBankAccount_Create()
# open client list
type("i",KeyModifier.CTRL)
time.sleep(1)
clientList = ["Hadley","Halifax"]
count = 0
for oneCli in clientList:
count += 1
fFundsAccount_Create(oneCli,count)
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
示例5: fSetup_SplitBills
def fSetup_SplitBills():
#---------------------------------------------------#
myTools.sectionStartTimeStamp("setup split")
logging.debug('- set up split bills')
myTools.getFocus()
# open split billing rule list
type("b",KeyModifier.ALT)
time.sleep(1)
type("i")
time.sleep(1)
fSetup_Primary("Beverly")
# new secondary
myTools.pressTAB(7)
fSetup_Secondary("Peabody",15)
fSetup_Secondary("Saugus",20)
# done
myTools.pressTAB(4)
type(Key.SPACE)
myTools.sectionEndTimeStamp()
backup_Data.fBackup_Checkpoint("split")
示例6: fEdit_Client
def fEdit_Client():
#---------------------------------------------------#
myTools.sectionStartTimeStamp("edit client")
logging.debug('Edit_Client')
# make sure timeslips has focus
myTools.getFocus()
fEdit_CliGenInfo()
fEdit_CliCustom()
fEdit_CliRatesNotes()
logging.debug('- save')
type("s",KeyModifier.CTRL)
time.sleep(1)
fEdit_DefaultRates()
fEdit_InterestSetting()
type(Key.F4,KeyModifier.CTRL)
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
示例7: fPrint_FeeAllocPer
def fPrint_FeeAllocPer(pReportMonth,pRepExt):
#---------------------------------------------------#
myTools.sectionStartTimeStamp("print FeeAllocPer")
# name report file: ex: PreBill-03
reportName = myTools.buildRepName("FeeAllocPer",pRepExt)
logging.debug('Print_FeeAllocPer: ' + reportName)
# make sure timeslips has focus
myTools.getFocus()
logging.debug('- open FeeAllocPer')
type("r",KeyModifier.ALT)
type("t")
time.sleep(1)
myTools.pressDOWN(3)
time.sleep(1)
# choose csv
myTools.pressSHIFTTAB(2)
type("c")
time.sleep(1)
myTools.enterCurrentMonthOnList(pReportMonth)
# print the report
type(Key.ENTER)
time.sleep(1)
myTools.finishReport(reportName)
示例8: fCreate_Discounts
def fCreate_Discounts(pMonth):
#---------------------------------------------------#
myTools.sectionStartTimeStamp("discounts" + str(pMonth))
logging.debug('fCreate_Discounts: ' + str(pMonth))
# list the client that will get a refund each month
discountClients = ["Natick","Orange","Oakham","Oak Bluffs","Southampton","Otis","Oxford","Leyden","Monroe","Monson","Methuen","Uxbridge"]
oneClient = discountClients[(pMonth - 1)]
myTools.getFocus()
# open a/r tran list
type("t",KeyModifier.CTRL)
myTools.waitForTransList()
discountAmount = 49 + pMonth/float(100)
fCreate_OneDiscount(oneClient,pMonth,discountAmount)
type(Key.F4,KeyModifier.CTRL)
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
myTools.checkProcesses()
示例9: fCreate_Categories
def fCreate_Categories():
# ---------------------------------------------------#
myTools.sectionStartTimeStamp("categories")
logging.debug("fCreate_Categories")
# make sure timeslips has focus
myTools.getFocus()
logging.debug("- open category list")
type("p", KeyModifier.ALT)
# hot keys changed for TS2014
if int(Settings.tsVersion) < 2014:
type("i")
else:
type("o")
time.sleep(1)
for category in ["Construction", "General", "Landscape", "Hardware", "Supplies", "Materials", "Other"]:
logging.debug("-- create: " + category)
type("n", KeyModifier.ALT)
type(category)
type(Key.ENTER)
logging.debug("- close list")
myTools.pressTAB(4)
type(Key.ENTER)
myTools.sectionEndTimeStamp()
示例10: fCreate_FinanceCharges
def fCreate_FinanceCharges(pMonth):
#---------------------------------------------------#
myTools.sectionStartTimeStamp("finance" + str(pMonth))
logging.debug('Create_FinanceCharges: ' + str(pMonth))
allClients = names_Init.fInit_Clients()
count = 0
myTools.getFocus()
# client list
type("i",KeyModifier.CTRL)
for oneClient in allClients:
count += 1
# always create finance charge for first 5 clients
# then create finance charge for 1 out of 35 next clients
if (count in range(6)) or ((count + pMonth) % 35 == 0):
financeCharge = str(count) + ".99"
fCreate_OneFinanceCharge(oneClient,count,pMonth,financeCharge)
else:
logging.debug('-- skip: ' + str(pMonth) + "-" + oneClient)
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
示例11: fBill_BillFields
def fBill_BillFields():
#---------------------------------------------------#
myTools.sectionStartTimeStamp("bill fields")
logging.debug("fBill_BillFields")
buName = Settings.tsVersion + "-bill-12b"
backup_Data.fRestore_Backup(buName)
reportName = "BillFields-13-" + Settings.tsVersion + ".txt"
myTools.getFocus() # make sure timeslips has focus
if int(Settings.tsVersion) < 2016: # to get around a defect in pre-2016
type("i",KeyModifier.CTRL) # open client info and close it to load custom fields
time.sleep(1)
type("o",KeyModifier.CTRL)
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
bill_ImportLayout.fImport_BillLayout("Fields") # import the layout
fSet_BillDate(12) # set billing data to 12/27 for text bills
fPrint_BillsToText(reportName) # print all bills to one text file
reports_Compare.Compare_OneReport(reportName)
myTools.sectionEndTimeStamp()
示例12: fCreate_Writeoffs
def fCreate_Writeoffs(pMonth):
#---------------------------------------------------#
myTools.sectionStartTimeStamp("writeoffs" + str(pMonth))
logging.debug('Create_Writeoffs: ' + str(pMonth))
count = 0
myTools.getFocus()
# open a/r tran list
type("t",KeyModifier.CTRL)
myTools.waitForTransList()
clientList = ["Blackstone","Carver"]
for woClient in clientList:
count += 1
if woClient == "Blackstone":
woAmount = 2
else:
woAmount = 3
woAmount = woAmount + pMonth/float(100)
fCreate_OneWriteOff(woClient,count,pMonth,woAmount)
type(Key.F4,KeyModifier.CTRL)
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
myTools.checkProcesses()
示例13: fBudget_Setup
def fBudget_Setup():
#---------------------------------------------------#
myTools.sectionStartTimeStamp("budgets")
logging.debug('budgets')
myTools.getFocus()
# open budget setup
type("n", KeyModifier.ALT)
type("b")
time.sleep(1)
if (int(Settings.tsVersion) > 2016) and (Settings.tsDB == "PREM"):
fTimekeeperBudget_New()
fClientBudget_New()
fFirmBudget_New()
else:
fTimekeeperBudget()
fClientBudget()
fFirmBudget()
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
示例14: fCreate_Refunds
def fCreate_Refunds(pMonth):
#---------------------------------------------------#
myTools.sectionStartTimeStamp("refunds" + str(pMonth))
logging.debug('fCreate_Refunds: ' + str(pMonth))
# list the client that will get a refund each month
refundClients = ["Hawley","Haverhill","Hatfield","Harwich","Harvard","Hawley","Haverhill","Hatfield","Harwich","Harvard","Hawley","Haverhill"]
oneClient = refundClients[(pMonth - 1)]
myTools.getFocus()
# open a/r tran list
type("t",KeyModifier.CTRL)
myTools.waitForTransList()
refundAmount = 99 + pMonth/float(100)
fCreate_OneRefund(oneClient,pMonth,refundAmount)
type(Key.F4,KeyModifier.CTRL)
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
myTools.checkProcesses()
示例15: fCreate_Transfers
def fCreate_Transfers(pMonth):
#---------------------------------------------------#
myTools.sectionStartTimeStamp("transfers" + str(pMonth))
logging.debug('Create_Transfers: ' + str(pMonth))
allClients = ["East.Bridgewater","North.Adams","West.Boylston"]
count = 0
myTools.getFocus()
# open a/r tran list
type("t",KeyModifier.CTRL)
myTools.waitForTransList()
for oneClient in allClients:
count += 1
transferAmount = 10 + int(count) + pMonth/float(100)
fCreate_OneTransfer(oneClient,count,pMonth,transferAmount)
type(Key.F4,KeyModifier.CTRL)
time.sleep(1)
type(Key.F4,KeyModifier.CTRL)
myTools.sectionEndTimeStamp()
myTools.checkProcesses()