[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
[Sikuli-driver] [Bug 1528642] Re: type("v", KEY_CTRL) not pastng the value copied
type() is a visual command, that writes something into the GUI-element, that has focus and that returns 0 or 1 depending on success. so print type('v', KEY_CTRL) will always print a 1 after having issued the command CTRL-V to the system (what ever that does in that moment) when working with xlwt you are working against the internal structures of an Excel sheet and not against the visual representation on the screen. So you have to use the features of xlwt, to fill your sheet. Hence the suggestion of dinev is correct: after having issued a CTRL-C, you can programmatically access the clipboard content using 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
[Sikuli-driver] [Bug 1528642] Re: type("v", KEY_CTRL) not pastng the value copied
Thank you both Dinev and Raiman for your reply. I understood CTRL +V is a GUI command. Dinev: MY requirement is to copy upto 10 report (in a tabular format) from other application and paste it into excel sheet either in one sheet or in separate sheet. If I was successful in my way then it would be easy to dump my data. -- 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
[Sikuli-driver] [Bug 1528642] Re: type("v", KEY_CTRL) not pastng the value copied
** Changed in: sikuli Status: New => Invalid -- 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: Invalid 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