Sign in to follow this  
Followers 0
Newb

[SOLVED] Can't Send Ctrl+M to a window

11 posts in this topic

#1 ·  Posted (edited)

I tried this:

Do
Send("^m")
Sleep(300)
Until Hex(PixelGetColor(321,725))=000000

This

While Not Hex(PixelGetColor(321,725))=000000
Send("^m")
Sleep(300)
Wend

This

Sleep (2000)
HotKeySet("q","_Exittt")
Func _Exittt()
    Exit
EndFunc
While 1
If Not Hex(PixelGetColor(321,725))=000000 Then
ControlSend("Windows Settings Manager","","","^m")
Sleep(300)
Else
    ExitLoop
EndIf
WEnd

But in any case i didn't manage to send CTRL+m to that damn software....

I need to send it when a particular black writing appears, but by no mean i achieve to do that, it just sends m, and if i press by myself ctrl, it just gets crazy because it keeps sending m (so it keeps going with ctrl+m on and off because i keep pressed it)

Why?

Edited by Newb

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Share this post


Link to post
Share on other sites



With ControlSend, be more specific with the ControlID. Or maybe just WinActivate before the Send. Also, do you need to send ^m once, or continuously, when the text appears?


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

With ControlSend, be more specific with the ControlID. Or maybe just WinActivate before the Send. Also, do you need to send ^m once, or continuously, when the text appears?

This particular windows doesn't have any particular control ID so i can't be more specific with it

>>>> Control <<<<
Class:  
Instance:   
ClassnameNN:    
Name:   
Advanced (Class):   
ID: 
Text:   
Position:   
Size:   
ControlClick Coords:    
Style:  
ExStyle:    
Handle: 

>>>> Mouse <<<<
Position:   302, 384
Cursor ID:  0
Color:  0x67583A

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<


>>>> Hidden Text <<<<

Also, i need to send continuosly ctrl+m because the writing i have to detect it's triggered by ctrl+m, and since program doesn't receive it most of the times, i have to try to activate it continuosly till the hotkey pression doesn't get ignored and actually triggers the command.

Anyway, with winactivate, no luck. ctrl+m still not works


I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hey newb,

based on your last post I can say it is better to push ctrl+m a long time, instead of only briefly. You can do this:

Send("{LCTRL down}")
Send("{m down}")
Sleep(500)
Send("{m up}")
Send("{LCTRL up}")

@Jos, lame ... :)

Edited by Manadar

Share this post


Link to post
Share on other sites

@Jos, lame ... :)

Excuse me... what have I done wrong this time or what did I miss?

ahh... Guess I should have spotted this in the code I guess which makes my question obsolete: "Windows Settings Manager"

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Excuse me... what have I done wrong this time or what did I miss?

ahh... Guess I should have spotted this in the code I guess which makes my question obsolete: "Windows Settings Manager"

Jos

You can't win for losing today.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

You can't win for losing today.

Yea, well I have given up to "fight all battles" and "live up to the expectation to be perfect" for a long time.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Hey newb,

based on your last post I can say it is better to push ctrl+m a long time, instead of only briefly. You can do this:

Send("{LCTRL down}")
Send("{m down}")
Sleep(500)
Send("{m up}")
Send("{LCTRL up}")

@Jos, lame ... :)

When it worked, I cried of joy ;)

I was after it the whole afternoon

Thanks, that stupid app is slow in receiving commands

Edited by Newb

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Share this post


Link to post
Share on other sites

When it worked, I cried of joy :)

I was after it the whole afternoon

Thanks, that stupid app is slow in receiving commands

It is a truly rare occasion that I make men cry of joy. Feels strange..

Share this post


Link to post
Share on other sites

It is a truly rare occasion that I make men cry of joy. Feels strange..

To compensate all the joy, as always there is something given back. In fact now, the script when executing those line, gets frozen in a weird way. I can't Alt-TAB or switch to any other application and it doesn't let me close the script, except for pressing ctrl+break. Life's thoug

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote 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