Sign in to follow this  
Followers 0
BoogY

Help with function

5 posts in this topic

Hello everyone.

I have this function and i need to send the content of the variable $TFS to the Opend windows

How can i do that ?

Func LancerConsoleSMS($TFS)
    Run("SMSRemote.exe")
    WinWait("SMS Remote Control")
    ;Send("{" & $TFS & "}")
    ControlSend("SMS Remote Control", "", "" ,$TFS)
EndFunc

Thaks a lot for your help

Share this post


Link to post
Share on other sites



Hello everyone.

I have this function and i need to send the content of the variable $TFS to the Opend windows

How can i do that ?

Func LancerConsoleSMS($TFS)
    Run("SMSRemote.exe")
    WinWait("SMS Remote Control")
    ;Send("{" & $TFS & "}")
    ControlSend("SMS Remote Control", "", "" ,$TFS)
EndFunc

Thaks a lot for your help

Hi,

you need the controlID. See helpfile ControlSend ( "title", "text", controlID, "string" [, flag] ).

You can get the controlID with AutoIt Window Info.

If you have any further problems, you should post a screenshot of the Window Info.

;-))

Stefan

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

>>>> Window <<<<
Title:  SMS Remote Control
Class:  WindowsForms10.window.8.app.0.378734a
Position:   811, 514
Size:   298, 112
Style:  0x16C80000
ExStyle:    0x00050101
Handle: 0x00820356

>>>> Control <<<<
Class:  WindowsForms10.EDIT.app.0.378734a
Instance:   1
ClassnameNN:    WindowsForms10.EDIT.app.0.378734a1
Advanced (Class):   [CLASS:WindowsForms10.EDIT.app.0.378734a; INSTANCE:1]
ID: 3146948
Text:   
Position:   120, 8
Size:   160, 20
ControlClick Coords:    33, 13
Style:  0x560100C0
ExStyle:    0x00000200
Handle: 0x003004C4

>>>> Mouse <<<<
Position:   967, 564
Cursor ID:  0
Color:  0xFFFFFF

>>>> StatusBar <<<<

>>>> Visible Text <<<<
Démarrer la prise de contrôle à distance
Nom du poste


>>>> Hidden Text <<<<

and my code :

Run("SMSRemote.exe")
WinWait("SMS Remote Control")
ControlSend("SMS Remote Control", "Nom du poste", 3146948, $TFS)

Each time i run the .exe the ID is diferent !!?? Is that normal ?

ans if it is how can i call it by the ID

post-52062-1252331411108_thumb.png

Edited by BoogY

Share this post


Link to post
Share on other sites

>>>> Window <<<<
Title:  SMS Remote Control
Class:  WindowsForms10.window.8.app.0.378734a
Position:   811, 514
Size:   298, 112
Style:  0x16C80000
ExStyle:    0x00050101
Handle: 0x00820356

>>>> Control <<<<
Class:  WindowsForms10.EDIT.app.0.378734a
Instance:   1
ClassnameNN:    WindowsForms10.EDIT.app.0.378734a1
Advanced (Class):   [CLASS:WindowsForms10.EDIT.app.0.378734a; INSTANCE:1]
ID: 3146948
Text:   
Position:   120, 8
Size:   160, 20
ControlClick Coords:    33, 13
Style:  0x560100C0
ExStyle:    0x00000200
Handle: 0x003004C4

>>>> Mouse <<<<
Position:   967, 564
Cursor ID:  0
Color:  0xFFFFFF

>>>> StatusBar <<<<

>>>> Visible Text <<<<
Démarrer la prise de contrôle à distance
Nom du poste


>>>> Hidden Text <<<<

and my code :

Run("SMSRemote.exe")
WinWait("SMS Remote Control")
ControlSend("SMS Remote Control", "Nom du poste", 3146948, $TFS)

Each time i run the .exe the ID is diferent !!?? Is that normal ?

ans if it is how can i call it by the ID

Hi,

try this:

ControlSend("SMS Remote Control", "", [CLASS:WindowsForms10.EDIT.app.0.378734a; INSTANCE:1], $TFS)

Instead of

please use [autoit].

;-))

Stefan

Share this post


Link to post
Share on other sites

OK thanks it works...

Ans sory about the code option.

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