Jump to content
Sign in to follow this  
Templarion

Cannot find Control ID & ControlSend not working without

Recommended Posts

Templarion

I managed to get ControlSend working in an application without Control ID. However, I was not able to do the same with another application which uses DirectX.

So...

1) How can I do it without?

or

2) How can I dig the Control ID out of the application?

Here is the code that works with first application (almost directly copied from one of the example scripts in ControlSend function description).

; Press n to type d.

Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

HotKeySet("n", "DeeDee")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage")  ;Shift-Alt-d

$handle = WinGetHandle("Application") ;I used this code in the other application but there I used different name "Application2".

;;;; Body of program would go here ;;;;
While 1
    Sleep(100)
WEnd

Func DeeDee()
    ControlSend ($handle, "", "", "{d}")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc
Edited by Templarion

Share this post


Link to post
Share on other sites
Templarion

did you read the Forum Rules ?

No. Didn't know they were so strict. I am sorry I have violated the rules.

EDIT: I have fixed the 1st post. Tell me if I am still breaking the rules.

Edited by Templarion

Share this post


Link to post
Share on other sites
wakillon

No. Didn't know they were so strict. I am sorry I have violated the rules.

Any ideas where I could ask help for this matter?

An AutoIt Bot Forum i suppose...but not here !


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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  

×