sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #34886
Re: [Question #272075]: Using multiple hotkeys without popups? Is this possible?
Question #272075 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/272075
Sam gave more information on the question:
scr2 = Screen(2)
#scr2.click("1443724310615.png")
data= [None]*33 # creating a list full of 0s
def CopyPage(event):
scr2.click("1444047041130.png")
# data= [None]*34 # creating a list full of 0s
# data[12]= "Unknown" # should reset clipboard like stated below - temp fix
x = 0
for x in range(0, len(data),1):
# App.setClipboard(data[x]) # sends data to keyboard
# wasn't using e== before that's why swap wasn't working but != was
type(Key.TAB)
type("c", KeyModifier.CTRL)
data[x] = Env.getClipboard()
App.setClipboard("0")
# should clear clipboard or set to known value here - this would avoid repeats in front of no copies like heating system
++x
print data[x]
print x
scr2.click("1444055393604.png")
type(Key.TAB)
type(Key.TAB)
type(Key.TAB)
x=0
print data[0]
for x in range(0, len(data),1):
# App.setClipboard(data[x]) # sends data to keyboard
# wasn't using e== before that's why swap wasn't working but != was
if data[x] == "0" :
type(Key.TAB)
++x
else:
paste(data[x])
type(Key.TAB)
++x
print data[x]
#Passive Hotkeys
Env.addHotkey(Key.NUM1,KeyModifier.CTRL, CopyPage)
popup("Press Ctrl+num1 instead of clicking a button") # need this popup to run in the background and the script can continue to run in the background
def PasteCalendar(event):
paste(data[17])
type(",")
paste(data[11])
type(",")
paste(data[23])
type(",")
paste( data[24])
Env.addHotkey(Key.NUM2,KeyModifier.CTRL, PasteCalendar)
popup("Press Ctrl+num2 instead of clicking a button")
Thanks for the reply RaiMan. I can press all my hotkeys at once now. I thought there was something wrong with the popups and I'd rather not have them, but I suppose I do need some way to exit the script.
Everything is working now, but I've posted my (very sloppy) code above.
Thanks again for the reply
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.