revird
Junior Member
Posts: 11
|
Post by revird on Feb 10, 2023 12:16:39 GMT
Can anyone tell me why this line:
47 | RUN ACTION | OUTPUT TO FILE | C:\MMM\Logs\pending points.txt::APPEND_NEWLINE::%STRING%, UserID= %STRING1%, Before= %STRING2%, After= %STRING3%
Inserts lines like this in a text file?
5/02/2023 9:10:47 AM, UserID= 724338, Before= Pending: 4,760 Points , After= Pending: 3,260 Points
5/02/2023 9:12:58 AM, UserID= 715072, Before= Pending: 4,680 Points , After= Pending: 1,280 Points
Thanks for any help.
|
|
revird
Junior Member
Posts: 11
|
Post by revird on Feb 20, 2023 4:23:01 GMT
Can anyone help please?
|
|
revird
Junior Member
Posts: 11
|
Post by revird on May 21, 2023 8:24:10 GMT
Asking again,
Can anyone tell me why the line below saves the data on separate lines?
38 | RUN ACTION | OUTPUT TO FILE | C:\MMM\Logs\tw_delete.txt::APPEND_NEWLINE::%STRING%, %STRING2%, %STRING3%, %STRING4%, %STRING5%
21/05/2023 5:49:59 PM, UserId: 338915
, Email: oliver.lion.3@gmail.com ( Yes )
, Signup Date: 2022-10-06T10:40:26-04:00
, Detected Country: PT
This is how I want it to save to the txt file
21/05/2023 5:50:28 PM, UserId: 338915, Email: oliver.lion.3@gmail.com ( Yes ), Signup Date: 2022-10-06T10:40:26-04:00, Detected Country: PT
Thanks..
|
|
|
Post by TonyG on May 21, 2023 10:40:53 GMT
How are you declaring your strings? It looks like you’ve got a CRLF (a new line) at the start of your string variables.
What does the variables look like when you output them to a message box?
|
|
revird
Junior Member
Posts: 11
|
Post by revird on May 21, 2023 22:51:36 GMT
1 | RUN ACTION | DEBUG | CLEAR CUSTOM VARIABLES
2 | RUN ACTION | DEFINE STRING VARIABLE | %STRING%::%date% %time%
3 | RUN ACTION | DEFINE STRING VARIABLE | %STRING1%::%CLIPBOARD%
4 | 351 | 765 | 2000 | Left Click Down
5 | 351 | 765 | 103 | Left Click Release
6 | 351 | 765 | 89 | Left Click Down
7 | 351 | 765 | 87 | Left Click Release
8 | 351 | 765 | 88 | Left Click Down
9 | 351 | 765 | 136 | Left Click Release
10 | 140 | 795 | 500 | Keypress Ctrl+ | c
11 | RUN ACTION | DEFINE STRING VARIABLE | %STRING2%::%CLIPBOARD%
Basically, I am highlighting a section on the screen, saving it to the clipboard, assigning the clipboard to a string, then going to the next item highlighting, saving, and then at the end, sending all strings to a text file.
I hope you can help, I have been manually editing the text files to get the format I need, pete
|
|
|
Post by Steve on May 26, 2023 19:30:42 GMT
Hi revird , I think the issue is you're clipboard variable is carrying a new line. Whatever your have copied to your clipboard buffer has this new line so when you are pasting it you get the spaces you are seeing. Try testing whats in you're buffer with a message prompt ( www.turnssoft.com/conditions.html#messageprompt). Throw a test into your current macro. Something like this will work for a test: 1 | 351 | 765 | 2000 | Left Click Down 2 | 351 | 765 | 103 | Left Click Release 3 | 351 | 765 | 89 | Left Click Down 4 | 351 | 765 | 87 | Left Click Release 5 | 351 | 765 | 88 | Left Click Down 6 | 351 | 765 | 136 | Left Click Release 7 | 140 | 795 | 500 | Keypress Ctrl+ | c 8 | RUN ACTION | DEFINE STRING VARIABLE | %STRING2%::%CLIPBOARD% 9 | RUN ACTION | MESSAGE PROMPT | Here is the contents of my clipboard buffer:<THIS IS THE START>%CLIPBOARD%<THIS IS THE END>::What is in my clipboard buffer::0::Information If you see something that looks like the below in your output then it's safe to say you're coping blank lines to your clipboard: Here is the contents of my clipboard buffer:<THIS IS THE START>UserId: 338915
<THIS IS THE END> Further to this, you could consider changing the way you pass to the clipboard and retrieve from the clipboard. Take a look at this example: Hope this helps, Steve.
|
|