Jump to content

ControlSend help


Recommended Posts

Hi guys i am new here and also new to this cute AutoIt language.

i am writing a script to buzz yahoo chat screen with AutoIt but i don't know why it sends only G?

have a look on cede and plz help

; Identify the Yahoo window
; Change into the WinTitleMatchMode that supports classnames and handles
AutoItSetOption("WinTitleMatchMode", 4)

$handle = WinGetHandle("[CLASS:CConvWndBase]")
If @error Then
    MsgBox(4096, "Error", "Could not find the correct window")
Else
; Ctrl + G is shortcut for buzzing but not working here it sends only G
    ControlSend($handle, "", "YIMInputWindow1", "{LCtrl}G")
    EndIf
Edited by RMR
Link to comment
Share on other sites

It proves how helpful this forum is!

Did you read rules from the forum about bumping your topic?

...that isnt someting to say when you did not provide enought info on your problem and did not read rules on forum.

Are you trying to activate hotkey from other window? If thats the case did you try to use Send instead ControlSend?

Send is difrent from controlsend in many wayes, one is used to send strings mostly to specific control, the other is used to send key strokes.

Try

If WinExists ( "[CLASS:CConvWndBase]" ) Then
    If Not WinActive ( "[CLASS:CConvWndBase]" ) Then
        WinActivate ( "[CLASS:CConvWndBase]" )
        WinWaitActive ( "[CLASS:CConvWndBase]" )
    EndIf
    Send ( "^g" )
Else
    MsgBox ( 0 , "" , "You dont have that win" )
EndIf

if its working for you

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

Dont tank me,

Inconspicuous posted you the link to Send command in his post, dono why you did not try that command it in the first palce. You where one click to solution.

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

OK Thanks but, one more question how to attach a text file or pic with autoit to yahoo chat window?

Here is my try!

If WinExists ( "[CLASS:CConvWndBase]" ) Then
        WinActivate ( "[CLASS:CConvWndBase]" )
        WinWaitActive ( "[CLASS:CConvWndBase]" )
        Send("D:\AVI-Songs\Akon\AKON-NA-NA-NA.avi")
Else
    MsgBox ( 0 , "" , "You dont have that window" )
EndIf
Edited by RMR
Link to comment
Share on other sites

Dont know how yahoo chat is working. If ctrl+c +v is working on files in yahoo chat then

_ClipPutFile to load file

and ctrl+v to send it to win shud work

If yahoo chat dont have that option and have button or hotkey that activate that process then controlclick to click that option or send to activate it from meny or WinMenuSelectItem. then use send or control send for file path on win that request file path.

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
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
 Share

  • Recently Browsing   0 members

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