Posts: 276
Threads: 34
Joined: Dec 2016
I often manually enter the ID in the input control of the TeamViewer software, and now I want to automate the input ID
I have encountered some problems:
TeamViewer just started, the input box is unable to enter ID (the following picture), need to wait a while, I can enter
I used almost all the wait-related commands, can not solve this problem, use the command E.g: WA WE WV Wacc
I hope someone can help me with some ideas and methods, any suggestions are welcome, thanks in advance
Posts: 12,071
Threads: 140
Joined: Dec 2002
try
Macro
Macro2800
str sID="abcd"
rep
,paste sID; err 0.1; continue
,break
Posts: 276
Threads: 34
Joined: Dec 2016
ID can not be entered into the control, need to set where? :oops:
The input box can not be activated
Macro
Macro2
#region Recorded 2017-02-22 20:58:31
run "C:\TeamViewer\TeamViewer.exe" "" "" "*"
int w2=wait(17 win("TeamViewer" "#32770"))
str sID="123456789"
rep
,paste sID; err 0.1; continue
,break
#endregion
Posts: 12,071
Threads: 140
Joined: Dec 2002
Then before paste need to click the control.
lef ...
paste ...
Posts: 276
Threads: 34
Joined: Dec 2016
Yes, need to click,
However, teamviever just started ,input contrl unable to click :oops:
when the input control is not activated, Can not click.
How to write code, waiting for the control to activate?
I tried a lot and did not succeed
Posts: 276
Threads: 34
Joined: Dec 2016
Use the following code, success, and thank you for your technical support, I am stupid
Macro
Macro2
#region Recorded 2017-02-22 20:58:31
run "C:\TeamViewer\TeamViewer.exe" "" "" "*"
int w2=wait(17 win("TeamViewer" "#32770"))
int w=win("TeamViewer" "#32770")
str sID="123456789"
rep
,lef 51 12 id(1001 w) 1
,paste sID; err 0.1; continue
,break
#endregion
Posts: 276
Threads: 34
Joined: Dec 2016
Why is the following code failed?
err and continue must be written on one line?
hock:
Macro
Macro3
#region Recorded 2017-02-22 20:58:31
run "C:\TeamViewer\TeamViewer.exe" "" "" "*"
int w2=wait(17 win("TeamViewer" "#32770"))
int w=win("TeamViewer" "#32770")
str sID="123456789"
rep
,lef 51 12 id(1001 w) 1
,paste sID; err 0.1
,continue
,break
#endregion
Posts: 12,071
Threads: 140
Joined: Dec 2002
err is like else. One line or tab-indented.
Posts: 276
Threads: 34
Joined: Dec 2016
Thank you for reminding
Posts: 276
Threads: 34
Joined: Dec 2016
The following code is successful, I added, Ctrl + A, the original ID selected, overwrite the original ID
Macro
Macro3
#region Recorded 2017-02-22 20:58:31
run "C:\TeamViewer\TeamViewer.exe" "" "" "*"
int w2=wait(17 win("TeamViewer" "#32770"))
int w=win("TeamViewer" "#32770")
str sID="123456789"
rep
,lef 51 12 id(1001 w) 1
,key Ca; paste sID
,err 0.1; continue
,break
#endregion