Re: [Sikuli-driver] [Question #280168]: Date.time triggering event regardless of time
Question #280168 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/280168 Description changed to: Hi, This is my first time using Sekuli and I have to say I am very impressed. With that in mind I am also a scripting newbie so forgive me if this question is obvious. I have searched the launchpad for answers but the closest I have is this :https://answers.launchpad.net/sikuli/+question/223076 I have replaced my original code with RaiMan's but tweaked it slighlty for my purpose. The issue I am having is that the code runs no matter the time I try. I intend for it to run at a given time and if it runs successfully then not run again until the next day. I have a feeling that the time might differ from my local time so I am not inputting the right value. I have tried to print the time to a popup but for some reason I can't get it to do so. Here is my code, thanks for any help and advice. Debug.on(3) Settings.MoveMouseDelay = 0.0 Settings.UserLogs = True Settings.ActionLogs = True Settings.InfoLogs = True Settings.DebugLogs = True Settings.LogTime = True Debug.setLogFile("D:\Sikuli\Bot\shardsbot testing.sikuli\sombot.txt") pause = 0.0 import datetime running = True Idle = 1 Variablereset = (datetime.datetime.today() + datetime.timedelta(1)).replace(hour=00, minute=1, second=0) Banquetone = (datetime.datetime.today() + datetime.timedelta(1)).replace(hour=16, minute=35, second=0) Banquetonecheck = 1 def runHotkey(event): global running running = False Env.addHotkey(Key.F1, KeyModifier.CTRL, runHotkey) SOM = switchApp ("Bluestacks App Player") while (SOM.hasWindow() and running): if datetime.datetime.today() > Banquetone: break if Banquetonecheck >= 1: if exists(Pattern("1451134605300.png").exact()): click(Pattern("1451134605300.png").exact()) if exists(Pattern("1451134711266.png").similar(0.90)): click(Pattern("1451134711266.png").similar(0.90)) if exists("1451134799206.png"): click("1451134799206.png") Banquetonecheck = 0 if exists("crossbutton.png"): click("crossbutton.png") else: if exists("crossbutton.png"): click("crossbutton.png") **EDIT 1**: I added this to get a double check on the time: Timecheck = (datetime.datetime.today() + datetime.timedelta(1)) popup ("Sikuli time is " +str(Timecheck)) This pop up tells me that the time is 24 hours ahead of the time I have inputted, not sure if the day difference is hindering the event trigger. I wouldn't have thought so considering I am only using the hours and minutes but I'll investigate more. **EDIT 2**: Ok I am a derp, the delta was offset by one in the original code, I've now taken it out but it still runs without regard for the time trigger. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #278079]: App.open() cannot open a 'duplicate' app
Question #278079 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/278079 Status: Open => Expired Launchpad Janitor expired the question: This question was expired because it remained in the 'Open' state without activity for the last 15 days. -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1529457] [NEW] Auto generated images names causes a problem
Public bug reported: In the new sikuli 1.1 there is a nice feature that automatically names your images. For example class screenDialog1: button_OK = If you put your cursor after "=" and take a image the name will aromatically generated -> button_OK.png That excellent idea however there is a problem In a bigger UI map you will definitely have more dialogues screen with different buttons... like this: class screenDialog1: button_OK = "button_OK.png" class screenDialog2: button_OK = now if you put your cursor on after "=" on the second button_OK and try to get image you will mess up your UI map without even knowing it. The problem is that sikuli will again generate "button_OK.png" and will replace the first one. There is no warning and even no visual change in in the first button until you reload sikuli. Suggested fix: - when image already exist just pop up dialogue for user to enter different name or - in old 1.0 sikuli there was automatic indexation 1,2,3 etc or - if you are in a class you may compose image name like this: screenDialog1.button_OK.png Happy holidays Neven ** Affects: sikuli Importance: Undecided Status: New -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1529457 Title: Auto generated images names causes a problem Status in Sikuli: New Bug description: In the new sikuli 1.1 there is a nice feature that automatically names your images. For example class screenDialog1: button_OK = If you put your cursor after "=" and take a image the name will aromatically generated -> button_OK.png That excellent idea however there is a problem In a bigger UI map you will definitely have more dialogues screen with different buttons... like this: class screenDialog1: button_OK = "button_OK.png" class screenDialog2: button_OK = now if you put your cursor on after "=" on the second button_OK and try to get image you will mess up your UI map without even knowing it. The problem is that sikuli will again generate "button_OK.png" and will replace the first one. There is no warning and even no visual change in in the first button until you reload sikuli. Suggested fix: - when image already exist just pop up dialogue for user to enter different name or - in old 1.0 sikuli there was automatic indexation 1,2,3 etc or - if you are in a class you may compose image name like this: screenDialog1.button_OK.png Happy holidays Neven To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1529457/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1529457] Re: Auto generated images names causes a problem
** Description changed: In the new sikuli 1.1 there is a nice feature that automatically names your images. For example class screenDialog1: - button_OK = + button_OK = If you put your cursor after "=" and take a image the name will aromatically generated -> button_OK.png That excellent idea however there is a problem In a bigger UI map you will definitely have more dialogues screen with different buttons... like this: class screenDialog1: - button_OK = "button_OK.png" + button_OK = "button_OK.png" class screenDialog2: - button_OK = + button_OK = now if you put your cursor on after "=" on the second button_OK and try to get image you will mess up your UI map without even knowing it. The problem is that sikuli will again generate "button_OK.png" and will replace the first one. There is no warning and even no visual change in in the first button until you reload sikuli. Suggested fix: - when image already exist just pop up dialogue for user to enter different name or - in old 1.0 sikuli there was automatic indexation 1,2,3 etc or - - if you are in a class you may compose image name like this: screenDialog1.button_OK - + - if you are in a class you may compose image name like this: screenDialog1.button_OK.png Happy holidays Neven -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1529457 Title: Auto generated images names causes a problem Status in Sikuli: New Bug description: In the new sikuli 1.1 there is a nice feature that automatically names your images. For example class screenDialog1: button_OK = If you put your cursor after "=" and take a image the name will aromatically generated -> button_OK.png That excellent idea however there is a problem In a bigger UI map you will definitely have more dialogues screen with different buttons... like this: class screenDialog1: button_OK = "button_OK.png" class screenDialog2: button_OK = now if you put your cursor on after "=" on the second button_OK and try to get image you will mess up your UI map without even knowing it. The problem is that sikuli will again generate "button_OK.png" and will replace the first one. There is no warning and even no visual change in in the first button until you reload sikuli. Suggested fix: - when image already exist just pop up dialogue for user to enter different name or - in old 1.0 sikuli there was automatic indexation 1,2,3 etc or - if you are in a class you may compose image name like this: screenDialog1.button_OK.png Happy holidays Neven To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1529457/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1528642] Re: type("v", KEY_CTRL) not pastng the value copied
Hi, In order to verify your issue I done similar example - http://screencast.com/t/NqqyYz0AmblJ - that seems to work fine Just wndering why you are using type in such strange way(not sure it will work at all) Can you try just with plain type as in my example. Also you may try using value from clipboard directly - Env.getClipboard (http://doc.sikuli.org/globals.html#Env.getClipboard) -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1528642 Title: type("v", KEY_CTRL) not pastng the value copied Status in Sikuli: New Bug description: I am trying to copy multiple cells from excel and paste it on a new excel file with the command type("v"+KEY_CTRL). It pastes the value "1" only. I checked this by print type("v"+KEY_CTRL) still getting 1 only. click("1450733489461.png") # this is an image in the report which has the value HC00184829 type("c", KEY_CTRL) #above value copies correctly in the excel sheet which is already on the screen but the following command fails. print type('v', KEY_CTRL) # prints the value "1" also fails the following which is my actual requirement. It prints the value "1"(without double quotes) on cell(0,0) import xlwt book1 = xlwt.Workbook() sheet1 = book1.add_sheet("Sheet1",cell_overwrite_ok=True) print type('v', KEY_CTRL) sheet1.write(0,0,type('v', KEY_CTRL)) book1.save("C:\\sikuli_applications\\bbq_patient.sikuli\\bbq_data.xls") I am using sikuli 1.1.0 on windows 7 32 bit To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1528642/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
Re: [Sikuli-driver] [Question #277167]: import can not resolve Key constant --- from sikuli import * needed in imported scripts
Question #277167 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/277167 Chandrima posted a new comment: Please provide some examples for importing of scripts -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp