How to increment values in array
Hi,
I am writing code, in which text file is used as :
(11,50,12)
(11,52,21)
(12,15,20)
(12,30,45)
Check the script:
def myHandler(event):
wait(2)
click(
type('v', KeyModifier.CTRL)
wait(2)
until = list(time.
until[
timeUntil = time.mktime(
timeToWait = int(timeUntil - time.time())
if timeToWait < 1:
timeToWait1 = (86400 + int(timeUntil - time.time()))
else:
click(
wait(8)
click(
wait(2)
# Main function
setThrowExcepti
wait(2)
import array
arr=[]
f=open(
fout = open("D:
for line in f.readlines():
arr.
f.close()
wait(2)
click("
wait(1)
# For clock in for Employee E3
type("D:
wait(1)
type(Key.ENTER)
wait(1)
type('a', KeyModifier.CTRL)
type('c', KeyModifier.CTRL)
type(Key.F4, KeyModifier.ALT)
wait(1)
# Open firefox
click("
wait(5)
click("
type("firefox" + Key.ENTER)
wait(5)
type("t", KeyModifier.CTRL)
wait(5)
type("https:/
wait("RequestXM
click("
type(Key.END )
type (Key.BACKSPACE)
type("http://
type(Key.TAB)
type('v', KeyModifier.CTRL)
wait(2)
until = list(time.
until[3:
timeUntil = time.mktime(
timeToWait = int(timeUntil - time.time())
if timeToWait < 1:
timeToWait1 = (86400 + int(timeUntil - time.time()))
wait(
else:
wait(
click("
wait(8)
click("
wait(2)
# For clock in for Employee E6
click("
wait(1)
type("D:
wait(1)
type(Key.ENTER)
wait(1)
type('a', KeyModifier.CTRL)
type('c', KeyModifier.CTRL)
type(Key.F4, KeyModifier.ALT)
wait(2)
onAppear(
observe(10)
wait(2)
# For clock in for Employee E5
click("
wait(1)
type("D:
wait(1)
type(Key.ENTER)
wait(1)
type('a', KeyModifier.CTRL)
type('c', KeyModifier.CTRL)
type(Key.F4, KeyModifier.ALT)
wait(2)
onAppear(
observe(10)
wait(2)
# For clock in for Employee E2
click("
wait(1)
type("D:
wait(1)
type(Key.ENTER)
wait(1)
type('a', KeyModifier.CTRL)
type('c', KeyModifier.CTRL)
type(Key.F4, KeyModifier.ALT)
wait(2)
onAppear(
observe(10)
wait(2)
Not able to increment the array values when handler is used.
Please help me out.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: