Jump to content

Can not get data from pos


Recommended Posts

Hi all, 

I have 2 application windows, (app1 , aap2)

so I want to get data from textbox app1 to textbox app2 and come back app 1 get again

I send data by hotkey "Enter".

Can anyone help me?

But,first time, i got data --> send --> ok

second times, i can not get data --> send value ""

.....

this code:

step1:  get pos

$pos = ControlGetPos ($title,"","[CLASSNN:WindowsForms10.EDIT.app.0.1e6fa8e1; INSTANCE:1]"); get pos

step 2: check pos and get data of texbox app1

if ($pos[1]=97) then

     $temp=ControlGetText($title, "", "[CLASSNN:WindowsForms10.EDIT.app.0.1e6fa8e1; INSTANCE:1]");

        if($temp <>"") then
         $scqmvalue =$temp
         ;ConsoleWrite($scqmvalue & @CRLF);
       endif

endif

 

Link to comment
Share on other sites

Hello,

welcome to the Forum!

When posting your autoit code, use this control to do so:

 

Place-Code.jpg

 

Try ControlGetText() to get the text without knowing it's exact Position. What program is that?

 

CU, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

  • 2 weeks later...
$ControlText=ControlGetText("Window Title","Window Text","Edit1")

will give you the text in the Edit "Edit1" in a Window with Title "Window Title" and some text inside the program window telling "Window Text".

 

Pls. lookup the help file.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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...