Jump to content
Sign in to follow this  
bmouth

Any way to call an external menu item without clicking or shortcut keys?

Recommended Posts

bmouth

I have a tiny script that activates a window, and then sends ALT-E, L (Select All), ALT-E, C (Copy)

#include <GUIConstants.au3>

WinActivate( "My Window 1" )
SendKeepActive( "My Window 1" )
Send( "!el!ec" )
ProcessData( ClipGet() )

where ProcessData is a user-defined function that I wrote.

It runs perfectly fine when no one is using the computer, but if I happen to click on another window as this script runs, the Send commands failed.

Is there a more reliable way to simulate a click on these menu items without using send keys or clicking on the menu?

Share this post


Link to post
Share on other sites
someone

If you haven't tried already, try WinGettext() or ControlGetText.


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites
bmouth

If you haven't tried already, try WinGettext() or ControlGetText.

I tried it, actually it's a SysListView32 Control, but all ...GetText or ...GetTextArray functions return empty strings. So the only way (afaik) is to use the menu Copy command. Even pressing CTRL+C fails to copy the data.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×