I'm not sure if I really need to brush up my Google-fu skills or if this is actually impossible... but I'm going to ask here to try and save myself a bit of a headache.
Is it possible to call custom Python scripts from Power Bi via button clicks or any other user triggered event?
I'm also curious if this is possible. I am new to Power Bi and Python and I was looking at how I can make dashboards more user friendly with the addition of buttons.
Related
I'm attempting to use VBA to transfer data from an Excel sheet to a number of input boxes on a webpage. Due to a couple of considerations specific to this site it would be much, much easier if I could simply log in to the webpage manually then use Selenium (or whatever) to take control of the browser window and execute the data entry tasks. My impression is that this was quite doable with Internet Explorer, but that's been phased out, and it looks like there's not a very robust method for doing this with Google Chrome. Is there a way to do this with Edge?
I managed to get half of the data entered using the AppActivate statement and a series of SendKeys commands - this was with Chrome - but that approach won't work for the rest of it, since AppActivate doesn't seem to really commandeer the browser window in a way that allows Selenium to click buttons etc.
Yes you can use control browser with selenium Basic. You can follow instruction on how to get it working with vba here. https://simpleexcelvba.com/google-chrome-automation-with-selenium-basic/#:~:text=Selenium%20Basic%20is%20a%20Selenium,by%20double%2Dclicking%20on%20it.
I have an window application that install in pc, I wish to used Python code to auto click on a icon after the application open. Below is my application look:
from this case I wish to used code to look for the Excel Icon and auto click it, the purpose of this icon is download the data.
I cannot used webdriver function because this is not the web application and this application don't have any coding behind, that mean when i run on Sample.exe it will direct pop up this window as the picture shown here.
Anyone have any idea on this?
import pyautogui
while True:
iconX, iconY = pyautogui.locateCenterOnScreen('icon.png')
pyautogui.doubleClick(iconX, iconY)
There are many different types of modules that you can use in order to achieve this but the one i would recommend is python auto GUI. This allows for screen searches and control over peripherals such as a mouse and keyboard. The code is relatively simple and is very basic. You can install it using the pip function using pip install pyautogui.
The code to achieve something like you say is one of the first things you will be able to do and if you need further help then feel free to ask but for convenience I will drop a website with the following functions.
https://pypi.org/project/PyAutoGUI/
I shall provide a demo code above.
thanks for your amazing support!
Now i have again a question. To get access to some raw datas (i'm working in a call center) we using a website to get an CSV/xls file from our SQL Database (the IT Department doesnt allow me to get direct access to the SQL database).
For an automatic update of my sheet i use an shell command to trigger chrome with the right parameters in the link (chrome starts the download).
Everything works fine but, when i trigger Chrome per shell, i have to minimize chrome again (otherwise you can't see the Excel screen). So i can't find an command to minimize external windows so i'm using shell to minimize all, after that i maximize excel again, works great, but after excel has done the updates, it should activate "VLC Media Player", i tried to use AppActivate for that, but its just blikink orange in the taskbar and dont get focus.
Can you help me?
I can share you the code but it's really just the AppActivate() line that interest you :)
Thanks again!
Br
Olvier
NirCmd from NirSoft is what you need.
It is well documented how built-in ribbon buttons in Microsoft Office can be repurposed (here for instance), e.g. the Copy button. However, I am not aware of any method to take full control of the enabled state of repurposed built-in controls. For me this poses a problem since I would like to implement some extended functionality in Excel and PowerPoint for which in some cases the alignment buttons make sense. But they are disabled by Excel/PowerPoint so repurposing them does not work.
Disabling built-in button that would be enabled by default is not a problem. Defining a getEnabled callback for the built-in button seems to do the trick - problem solved.
But how to enable built-in ribbon button that would be disabled by default? (getEnabled does not help here)
I suspect there is no "VBA/VSTO way" to accomplish the task? Do you think it would be possible using COM, e.g. via IAccessible? So far I have only found ways to enumerate, select and invoke the button commands but not to change their state.
As the question got a few views I only wanted to confirm that there is no supported way to achieve what I wanted to the best of my knowledge. Neither the ribbon interface nor IAccessible help here. This is unfortunately the best answer I can give.
I'm interested on how to get the old menus back for Office 2007. I know you can buy add-ins that do this, but I'm more interested on how these are done? I want to implement this at home and just need to be pointed in the correct direction!
Thanks!
These programs don't actually restore the old menu system, they modify the current Ribbon and then write the code to mock the old design.
This is where you need to start in order to modify the Ribbon.
http://msdn.microsoft.com/en-us/library/aa942866%28VS.80%29.aspx
I doubt the Ribbon is going to go away, so you probably will be better off taking the time to get used to it. I have, and now I much prefer this style menu system. In fact, I have been looking at code to implement this style in applications that I build.