Sign in to follow this  
Followers 0
Nino

Sending Text to a hidden window?

8 posts in this topic

Hello, I'm trying to send text to a minimized/hidden notepad. Is this possible?

I don't have much done, but I don't know where to really go from here:

WinWaitActive("note.txt - Notepad","")
Sleep(2000)
WinSetState ( "note.txt - Notepad", "", @SW_HIDE)

Is it possible to use the Send command but maybe have it send to a non active window?

Many thanks for any help,

Nino

Share this post


Link to post
Share on other sites



What if the program has no Control ID? Leaving it blank results in an error for me. :shocked:

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

#include <GUIConstants.au3>

opt('MustDeclareVars', 1)
Dim $s_Text = "This is a test"

Run("Notepad")
WinWaitActive("Untitled - Notepad")
Sleep(2000)
WinSetState ( "Untitled - Notepad", "", @SW_HIDE)
Sleep ( 1000 )
ControlSetText("Untitled - Notepad","", "Edit1", $s_Text)
Sleep ( 1000 )
WinSetState ( "Untitled - Notepad", "", @SW_SHOW)

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Ya, I figured that part out but now i'm working on doing it for a game - World of Warcraft. But the only problem is that when I try and find a Control ID/Class name, nothing shows up, that whole portion is empty. I thought I could also find it by doing a CTRL+ALT+DELETE and finding the Control ID through the list of processes, but that value didn't work. Any ideas?

Share this post


Link to post
Share on other sites

It always seems like everyone and their brother is trying to make a bot for that game. DO a search for WOW, and you should find everything you need.

I can't see whats so good about it.... Mind you I haven't tried it so I cant talk.

Share this post


Link to post
Share on other sites

It's actually quite a good game. I couldn't imagine what you'd want to use Autoit for, though, unless it was something bad. WoW has some powerful scripting options already built in to it.

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  
Followers 0