Hi,
I am working with an application where I need to automatically copy and paste the opened file name into the mentioned blank space. Attached in the image below. Is there any way for it? using use application -Type into
attached below the screen shot. File Name should be copied to the lookup table wbs.
Anil_G
(Anil Gorthi)
April 23, 2024, 3:03am
2
@vignesh.maruthappan
Use get attribute and get the title by indicating the whole window which would give you the filename
Then use type into on the required field
After get attribute based on what value you need …you might need to do some string manipulations.check the same
Cheers
1 Like
thanks and let me try it out
1 Like
i tried but i do get a error.in the area of type into-type this i need to type the variable name?\
Anil_G
(Anil Gorthi)
April 23, 2024, 7:11am
5
@vignesh.maruthappan
What you gave looks correct…may I know what is the error?
cheers
is it because of special characters. Can we define or assign like i required certain name from it.
can we write a conditiion for it
Anil_G
(Anil Gorthi)
April 23, 2024, 7:39am
7
@vignesh.maruthappan
try to split with - and .
str.Split("-"c)(1).Split("."c).First
cheers
1 Like
AJ_Ask
April 23, 2024, 7:44am
8
Hi @vignesh.maruthappan
If it always starts with ex & end with PSW
System.Text.RegularExpressions.Regex.Match(TestText, "ex.*?PSW").Value
Hope this helps
thanks a lot. Starts with ex and always do not end with psw. may be i can try out with substring value if possible
great. Let me try it.thanks
Ajay_Mishra
(Ajay Mahendra Mishra)
April 23, 2024, 7:56am
12
@vignesh.maruthappan
Use the expression mentioned by @Anil_G directly in Type Into with some edit,
OPA.Split("-"c)(1).Split("."c).First
regards,
Ajay Mishra
1 Like
@Anil_G @Ajay_Mishra i do get this error.any solution or idea on it?
Ajay_Mishra
(Ajay Mahendra Mishra)
April 23, 2024, 8:08am
14
@vignesh.maruthappan Screenshot of Typeinto activity?
adiijaiin
(Aditya Jain)
April 23, 2024, 8:12am
15
hi @vignesh.maruthappan
I guess you need to remove the Special Characters such as _ .
Can you try with
yourStringVariable.Replace(“_”," ")
This might help.
Hi @adiijaiin can’t get you. Can help to eloborate.sorry
Anil_G
(Anil Gorthi)
April 23, 2024, 8:38am
18
@vignesh.maruthappan
try using hardware events in the properties…that should solve
or if you dont need any special characters then you can remove all of them…let us know
cheers
Ajay_Mishra
(Ajay Mahendra Mishra)
April 23, 2024, 8:41am
19
@vignesh.maruthappan rewrite quotes once again or just copy below mentioned query
OPA.Split("-"c).First().Split("."c).First.ToString
Regards,
Ajay Mishra
adiijaiin
(Aditya Jain)
April 23, 2024, 9:59am
20
Is the field in which you takes special characters? if it doesn’t takes it. You would have to replace the special characters such as _ (underscores) using this expression:
yourStringVariable.Replace(“_”," ")
or By using this :
System.Text.RegularExpressions.Regex.Replace(variable, “[^a-z A-Z 0-9]”, “”)