Skip to Content
avatar image
Former Member

The control could not be found by id

Hello all.

I have script .vbs recorded on one notebook[A]. The part of code:

session.findById("wnd[0]/usr/ctxtLIKP-LIFNR").text = "103005"

On the other notebook[B] the same part looks like:

session.findById("wnd[0]/usr/ctxt[0]").text = "103005"

When i try to run scrip from the first Notebook[A] on the other [B], the second one gives message: "The control could not be found by id"

The same error i have got when run script from notebook[B] on notebook [A].

Also we have many others notebooks in company. They record scripts in the same way as the notebook [B] (session.findById("wnd[0]/usr/ctxt[0]").text)

But we have huge script recorded on the notebook [A] and we need to run it on others notebooks.

Is there any ways to make other notebooks read the script (session.findById("wnd[0]/usr/ctxtLIKP-LIFNR").text = "103005") correctly?

Thank you in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 28, 2017 at 12:13 PM
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you ScriptMan for a quick answer.

      The problem is that the "Paper icon" is inactive in my clent. Thу reason is the access policy of the company. I have already created the list of available connections and it seems it cant be edit.

      What elsу can I do?

  • Aug 30, 2017 at 06:31 AM

    Hi Nick,

    my workaround as follows:

           
    on error resume next
    session.findById("wnd[0]/usr/ctxtLIKP-LIFNR").text = "103005"
    
    if err.number <> 0 then session.findById("wnd[0]/usr/ctxt[0]").text = "103005"
    
    on error goto 0
    
    
    
    

    Regards,

    ScriptMan

    Add comment
    10|10000 characters needed characters exceeded