PowerShell Automation Involving MouseClicks

%3CLINGO-SUB%20id%3D%22lingo-sub-460658%22%20slang%3D%22en-US%22%3EPowerShell%20Automation%20Involving%20MouseClicks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-460658%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20create%20an%20automation%20for%20Power%20BI%20so%20that%20it%20is%20able%20to%20refresh%20and%20publish%20a%20dataset%20to%20its%20online%20work%20space.%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20doing%20this%20through%20creating%20a%20PowerShell%20script%20that%20will%20open%20Power%20BI%20Desk%2C%20then%20click%20refresh%2C%20then%20click%20publish.%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20having%20trouble%20getting%20the%20mouse%20clicks%20down.%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20like%20a%20suggestion%20for%20a%20line%20I%20can%20add%20to%20my%20script%20so%20that%20I%20can%20place%20a%20left%20mouse%20click%20at%20location%20x%20by%20y.%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20can%20figure%20out%20how%20to%20place%20one%20mouse%20click%20at%20coordinates%20I'll%20be%20able%20to%20work%20out%20the%20rest.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-460658%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPower%20BI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-504197%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20Automation%20Involving%20MouseClicks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-504197%22%20slang%3D%22en-US%22%3ELooks%20like%20the%20guys%20in%20Stackoverflow%20had%20two%20answers%20you%20may%20be%20interested%20in.%3CBR%20%2F%3EThe%20first%20is%20that%20you%20could%20user%20PowerBI%20online%2C%20but%20I%20don't%20know%20if%20that%20covers%20your%20use%20case.%3CBR%20%2F%3EThe%20other%20is%20a%20bit%20of%20PowerShell%20and%20VB%20in%20order%20to%20automate%20the%20action%20of%20refresh.%3CBR%20%2F%3EHope%20it%20helps%3A%20%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F54429867%2Frefresh-power-bi-with-powershell%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F54429867%2Frefresh-power-bi-with-powershell%3C%2FA%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

I'm trying to create an automation for Power BI so that it is able to refresh and publish a dataset to its online work space. 

I'm doing this through creating a PowerShell script that will open Power BI Desk, then click refresh, then click publish. 

I'm having trouble getting the mouse clicks down. 

I'd like a suggestion for a line I can add to my script so that I can place a left mouse click at location x by y. 

If I can figure out how to place one mouse click at coordinates I'll be able to work out the rest. 

 

Thank you for your help!

1 Reply
Highlighted
Looks like the guys in Stackoverflow had two answers you may be interested in.
The first is that you could user PowerBI online, but I don't know if that covers your use case.
The other is a bit of PowerShell and VB in order to automate the action of refresh.
Hope it helps: https://stackoverflow.com/questions/54429867/refresh-power-bi-with-powershell