pyautogui hotkey combination is not working - pyautogui

I was trying going through an entire row by using pyautogui.hotkey('ctrl','shift','right') in ms excel. i have also tried using pyautogui.hold, pyautogui.keydown but nothing seems to work.

Related

Pyautogui and PyDirectInput does not work on just one program

Im trying to automate a process on my job which is just creating and downloading pdf file like 1000 times but the problem is, i tried both library and both working normal on every test i made except one program that i need. Its not giving error, it looks like working but nothing happens.
I can still locate image on the screen but when i tried to send key or click to a button on program nothing happens. What can i do about this, is there any other way for this?
I tried both library with different programs but the only one i need is the only one that i get issue
I solved my problem today. There is no problem with any library, it was just because of the program that I need running as "Run as administrator" and because of that when I tried to run cmd administrator it's just working well. looks like both should be at the same level to get control over it.

VBA behaves differently after close and re-open

I am using Access 2007 on a PC running Windows Vista.
The Access database with VBA code in many modules works as expected. However, one module acts differently after I have exited the database and re-entered. As soon as I re-enter, I can select View Code and Save without changing any code and the program goes back to working the way I expected. Any ideas?
Details:
The Access module with the inconsistency opens Word 2007 and creates a new document from a template (.dotx) file using bookmarks to merge Access data into the document. This works as designed without a problem and works every time. Once the document is created, the vba code calls the Word window to front. This does not happen unless I select View Code and Save. I do not have to modify any code, just select Save. Then it works as expected until I close the database. When I next open the database and select the button that creates the Word document, the document is not brought to front but remains behind the Access window. If I select View Code and Save, the subsequent documents created during that session come to front as desired. This is consistent and repeatable.
I am not sure about why this is occurring, but a quick fix that I thought might work would be to programmatically save the module when you load your DB.
docmd.save acmodule, "module name"
Hope this works!

Sikuli Key.CTRL does not work

Using Sikuli IDE 1.0.1 (according to the "About SikuliX" menu).
Ubuntu 14.04.3, 64 bit, virtual server, via tightvnc + Xfce 4.
One day everything just stopped working though we did not change the sources. Server updates (ubuntu software) are off. Combinations like type('a', Key.CTRL) started to type plain 'a' char, not selecting a text (as before).
We even tried to spin up the same instance type, set everything up there, and run agian. And Sikuli failed to type "Ctrl" again!
We also tried to run the script with "-r", skipping IDE. Same thing - no Ctrl.
Can anybody help?
Thanks!
I suppose you should do it as sequential actions (like you actually do on your keyboard):
keyDown(Key.CTRL)
type("a")
keyUp(Key.CTRL)
Alternatively, you can use the KeyModifier.CTRL in the function type
type("a", KeyModifier.CTRL)
If you're using the
type('a', Key.CTRL)
to simulate holding CTRL and pressing the 'a' key, the method you're using has been depricated. It should more properly be
type('a', KeyModifier.CTRL)
as per the documentation.
Try that and see if that will solve your problem. :)

Unable to perform database compare

Recently, not since three or four days, we have been facing an issue when trying to compare within visual studio 2013 on a database project. The compare screen loads up but I'm not able to select source or target. Nothing happens if I click the target combo and select "Select target...". Sa for source. I tried using the menu bar's "SQL" with the compare screen open and tries "Select Target" from there only to be presented with a error message: An item with the same key has already been added. Same behaviour on source.
We tried reading the logs of visual studio, searched all over internet and got suggestion to update SSDT but thats not really an option as the search results are from 2011/2012 and those update don't exists or apply to VS2013.
We did more testing:
A stand-alone new solution with new DB projects works fine
Loading our DB project directly into a new solution works fine
Our full solution 'A' fails.
Other of our solutions 'B' and 'C' also fails
Couldn't find anything in the solution file that could prevent comparing.
Anyone facing/had similar issues?
I had the same problem in VS2010. Solved after renaming projects with the same name which were located in different virtual solution folders.
Looks like "New Schema Comparison" form doesn't respect solution folders structure when fills "Project" combobox.

Issue with clipboard

I have a legacy app I am currently supporting that is having problems when people copy large quantities of data from a datasheet view.
The App is built in MS Access and the amount of rows being copied can get pretty large (sometimes in the thousands).
The funny thing about it is, you can paste the data out, but then Access keeps "rendering" the data into different formats and becomes CPU bound for LONG periods of time.
The Status message beside the progress bar at the bottom right of the MS Access Window is
Rendering Data to format: Biff5
Biff5 is a "Binary Interchange File Format (BIFF) version 5" According to Source
The app code doesn't use BIFF5 anywhere so I don't think this is an app problem.
I cannot find any data on this error anywhere on the web so I thought it would be a good question for stackoverflow.
So, can anyone help please?
Instead of trying to copy-paste, can't you just export the query to Excel?
I am not sure what the problem is but sometimes you can run into some very quirky bugs with Access. Have you tried running this on different machines? Different OS's? Would it be possible to paste the data into Excel and then import into Access using import functionality? Can you import the data directly instead of pasting it?
Try copy-paste operation through VBA:
Once user has selected data to copy, you can execute the code below when click on a button in the form, and then do a pastespecial in excel:
--- Data selected by user ---
RunCommand acCmdCopy
Dim xlApp As Object
Set xlApp = CreateObject(Class:="Excel.Application")
'New Excel Workbook
Dim xlWbook As Object 'Excel.Workbook
Set xlWbook = xlApp.Workbooks.Add
'Paste in excel
xlWSheet.Range("A1").Select
xlWSheet.PasteSpecial Link:=False, DisplayAsIcon:=False, Format:="Biff5"
We are all on the same OS here for this, I am investigating the possibility that some update sent out in the last maintenance window has caused this, as it wasn't a problem before this and there have been no new releases of the software in that time period.
Tried in on lot's of machines, same issue on them all.
The problem is actually with copying from a datasheet view in Access and pasting to Excel, not the other way around strangely.
Here is the use case
Access --> "Copy from datasheet"(Normal Ctrl+C) --> "paste into Excel" (Normal Ctrl+V)
(this works fine!)
When you then go back to Access to continue working, it is CPU bound doing the "Rendering Data to format: " thing, I mentioned above.
I'm stumped to be honest, it's all a bit strange.