Hack Forums
[Python] Controlling win32 apps - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Controlling win32 apps (/showthread.php?tid=5626155)



Controlling win32 apps - Folks - May 18, 2017

So I have looked around the pyautogui docs but haven't been able to find anything as of yet on this but I am trying to select the menubar of an exe (Flash player standalone) and open an swf file within it.

All of the examples open a notepad's menubar but it doesn't show how to use menubars for non built-in windows apps like notepad.


* - TheWarOwl - May 18, 2017

I can't say it's possible without a windows api of some sort, you could probably do it via memory if you're serious enough... but that'd be a pain in the ass and python isn't really the language for that.

If it is possible I hope to see a solution - I've been curious about this too.


* - datguy.dev - May 19, 2017

I never used pyautogui. But are you not able to do this by using shortcut keys? Such as using .press to do alt+f, then o, then release alt, etc?


* - hunter24957 - May 19, 2017

Not sure if it's possible with Python but you could try hooking into the process and sending binary key values.