Hi!
I have a text file, like this:
text.txt: rullbandspelare,det,e,jag,1234
(I have some freedom in the way this file will look)
I whant this text to fill a form that always is the same.
So the result in my case if i use key pressing would be.
paste rullbandspelare
tab
paste det
tab
paste jag
etc
How can i do this in Macro Scheduler? Any input on where to start would make me glad.
Thanks!
/tomas
Extracting text from a file?
Moderators: Dorian (MJT support), JRL
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
No time to help right now but I think the sensible solution will be SEPARATE.
From the HELP file:
From the HELP file:
Use TABs vs. Messages in the Example file, use comma vs. semicolon as delimiter.Separate>list,delimiter,returnvar
Separate takes a list, a delimiter and returns the elements of the list. The command returns a number of variables, one for each list element, each with the suffix "_n" where n is the index of the element in the list. The variable names are determined by the name given in returnvar. e.g. returnvar_1, returnvar_2, etc. Also returned is the number of elements in the list, in returnvar_count.
Abbreviation : SEP
Example
GetFileList>c:\temp\*.*,files
Separate>files,;,file_names
MessageModal>Num Files: %file_names_count%
Let>k=0
Repeat>k
Let>k=k+1
Message>file_names_%k%
Until>k,file_names_count
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Another option, cause ...
text.ini
[DATA]
1=rullbandspelare
2=det
3=e
4=jag
5=1234
-----
Let>KeyNo=0
INILoop:
Add>KeyNo,1
ReadIniFile>c:\text.ini,DATA,%KeyNo%,KeyValue
SetFocus>MyWebsite*
Send>%KeyValue%
Press TAB
If>KeyNo=5, Done, INILoop
Label>Done
Exit
Use an INI file as the data source (so you would be able to update that file if necessary)(I have some freedom in the way this file will look)
text.ini
[DATA]
1=rullbandspelare
2=det
3=e
4=jag
5=1234
-----
Let>KeyNo=0
INILoop:
Add>KeyNo,1
ReadIniFile>c:\text.ini,DATA,%KeyNo%,KeyValue
SetFocus>MyWebsite*
Send>%KeyValue%
Press TAB
If>KeyNo=5, Done, INILoop
Label>Done
Exit