Hello everyone, I am trying a case, I want to get the value of a control on the window, and save the value to the variable(id), I can't think of a solution, I hope someone can help me, thanks in advance
run"$program files$\TeamViewer\TeamViewer.exe""""""*";;TeamViewer 13 ;Here is a little problem, how to wait for the control to activate, then, get the control value int w=wait(0 WA win("TeamViewer""#32770")) str txt.getwintext(child("""Edit" w 0x0"id=1"));;editable text 'YOUR ID' out txt str txt1.getwintext(child("""Edit" w 0x0"id=1"2));;editable text 'PASSWORD' out txt1
int w run"$program files$\TeamViewer\TeamViewer.exe"""""""0x800win("TeamViewer""#32770") w ;again str txt.getwintext(child("""Edit" w 0x0"id=1"));;editable text 'YOUR ID' ifempty(txt);0.3;goto again out txt str txt1.getwintext(child("""Edit" w 0x0"id=1"2));;editable text 'PASSWORD' out txt1
int w run"$program files$\TeamViewer\TeamViewer.exe"""""""0x800win("TeamViewer""#32770") w ;again str txt.getwintext(child("""Edit" w 0x0"id=1"));;editable text 'YOUR ID' if(empty(txt)or txt="-")0.3;goto again out txt str txt1.getwintext(child("""Edit" w 0x0"id=1"2));;editable text 'PASSWORD' out txt1
11-08-2018, 01:34 PM (This post was last modified: 11-08-2018, 02:00 PM by Kevin.)
another way but waits for Ready to connect(secure connection) status message (english language only) since it appears your trouble is because your not connected .
int w run"$program files$\TeamViewer\TeamViewer.exe"""""""0x800win("TeamViewer""#32770") w ;again str text.getwintext(child("""Static" w 0x0"id=1"));;text ' if(text !="Ready to connect (secure connection)")0.3;goto again str txt.getwintext(child("""Edit" w 0x0"id=1"));;editable text 'YOUR ID' out txt str txt1.getwintext(child("""Edit" w 0x0"id=1"2));;editable text 'PASSWORD' out txt1
if using another language besides english in teamviewer use code below.
int w run"$program files$\TeamViewer\TeamViewer.exe"""""""0x800win("TeamViewer""#32770") w ;again str txt.getwintext(child("""Edit" w 0x0"id=1"));;editable text 'YOUR ID' if(empty(txt)or txt="-")0.3;goto again out txt str txt1.getwintext(child("""Edit" w 0x0"id=1"2));;editable text 'PASSWORD' out txt1