Jump to content

Recommended Posts

Posted

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?

Posted

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

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

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...