how to capture backslash for a variable
Moderators: Dorian (MJT support), JRL
how to capture backslash for a variable
I have a code as below
Let>VAREXPLICIT=1
Let>LoginId=TMMASTER\s10780
Press alt
Send Character/Text>u
Release alt
send>%LoginId%
when execute loginId=TMMASTER\s10780, ms assign loginId with only TMMASTER. How can I make sure ms assign TMMASTER\s10780 to loginID
Thank in advance
Let>VAREXPLICIT=1
Let>LoginId=TMMASTER\s10780
Press alt
Send Character/Text>u
Release alt
send>%LoginId%
when execute loginId=TMMASTER\s10780, ms assign loginId with only TMMASTER. How can I make sure ms assign TMMASTER\s10780 to loginID
Thank in advance
Still Error
I have changed to script as below:
let>backslash=\
Let>LoginId=TMMASTER%backslash%s10780
Press alt
Send Character/Text>u
Release alt
wait>1
send>LoginId
when view in watchlist, login show it has been assign TMMASTER\s10780 which is correct.
But when send>LoginId, when is send to the text box is only TMMASTER, ms omit the \s10780.
Is this a abug and how to work around it.
I am using ms 10.1.21
let>backslash=\
Let>LoginId=TMMASTER%backslash%s10780
Press alt
Send Character/Text>u
Release alt
wait>1
send>LoginId
when view in watchlist, login show it has been assign TMMASTER\s10780 which is correct.
But when send>LoginId, when is send to the text box is only TMMASTER, ms omit the \s10780.
Is this a abug and how to work around it.
I am using ms 10.1.21
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I can't replicate with Notepad. This works fine:
Must be something to do with the app you are sending to?
Code: Select all
Let>VAREXPLICIT=1
Let>LoginId=TMMASTER\s10780
SetFocus>Notepad*
Send>%LoginId%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Still Error
I am trying to login into ms outlook
below is the new code
Let>VAREXPLICIT=1
Let>LoginId=TMMASTER\s10780
//SetFocus>Notepad*
SetFocus>Connect to SMSGVS32.tm.my
//let>backslash=\
//Let>LoginId=TMMASTER%backslash%s10780
Press alt
Send Character/Text>u
Release alt
wait>1
Send>%LoginId%
wait>5
The output on the screen is TMMASTER\[/img]
below is the new code
Let>VAREXPLICIT=1
Let>LoginId=TMMASTER\s10780
//SetFocus>Notepad*
SetFocus>Connect to SMSGVS32.tm.my
//let>backslash=\
//Let>LoginId=TMMASTER%backslash%s10780
Press alt
Send Character/Text>u
Release alt
wait>1
Send>%LoginId%
wait>5
The output on the screen is TMMASTER\[/img]
I am trying to login into ms outlook
below is the new code
Let>VAREXPLICIT=1
Let>LoginId=TMMASTER\s10780
//SetFocus>Notepad*
SetFocus>Connect to SMSGVS32.tm.my
//let>backslash=\
//Let>LoginId=TMMASTER%backslash%s10780
Press alt
Send Character/Text>u
Release alt
wait>1
Send>%LoginId%
wait>5
The output on the screen is TMMASTER\
below is the new code
Let>VAREXPLICIT=1
Let>LoginId=TMMASTER\s10780
//SetFocus>Notepad*
SetFocus>Connect to SMSGVS32.tm.my
//let>backslash=\
//Let>LoginId=TMMASTER%backslash%s10780
Press alt
Send Character/Text>u
Release alt
wait>1
Send>%LoginId%
wait>5
The output on the screen is TMMASTER\
If cut and paste it works
if I used manual copy and paste. it correctly paste into the outlook login as below.
TMMASTER\s10780
TMMASTER\s10780
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Can you show us a screenshot of the outlook login?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
How to upload png file
Sorry I cannot find how to upload image to the forum. Appreciate if you can guide.
I found to solution
The above problem only occurs when I do debug/trace.
But when I compile into exe and run the script using exe,
the program input correct TMMASTER\s10780 into the text box
But when I compile into exe and run the script using exe,
the program input correct TMMASTER\s10780 into the text box
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The debugger is probably steeling focus back. Try disabling Refocus Windows under the debug menu.
At least it works when run live!
At least it works when run live!
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?