Prob with ReplaceAll

Ask questions about how to create a script or swap scripts with other users.
Post Reply
PAEz
Posts: 3
Joined: 06 Aug 2009 13:43

Prob with ReplaceAll

Post by PAEz »

Im trying to do a few ReplaceAlls as you cant put them in a macro and its going all funny on the last one...even goes funny if i do a search and replace from the menu..

Code: Select all

begin
Document.ReplaceAll('",','",'+#13#10,False,False,False);
Document.ReplaceAll(':{',':{'+#13#10,False,False,False);
Document.ReplaceAll('},','},'+#13#10,False,False,False);
Document.ReplaceAll('],','],'+#13#10,False,False,False);
end.
and Im doing it on this....

Code: Select all

{"version":"1.0","name":"Glow","theme":{"images":{"theme_frame":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUYmMsBDA","theme_toolbar":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY_uIBDA","theme_tab_background":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY1OoBDA","theme_button_background":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY2-IBDA"},"colors":{"frame":[0,0,0],"toolbar":[0,0,0],"tab_text":[255,255,255],"tab_background_text":[255,255,255],"bookmark_text":[255,255,255],"ntp_background":[0,0,0],"ntp_text":[255,255,255],"ntp_link":[255,255,255],"ntp_section":[96,96,96,0.4],"ntp_section_text":[255,255,255],"ntp_section_link":[255,255,255]},"properties":{"ntp_background_alignment":"bottom","ntp_background_repeat":"no-repeat","ntp_logo_alternate":1},"tints":{"buttons":[1,1,1]}}}
I dont know if its just the ] or Im doing something wrong
Im using version 5.30 beta 1 and this is how it ends up after the script...

Code: Select all

{"version":"1.0",
"name":"Glow",
"theme":{
"images":{
"theme_frame":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUYmMsBDA",
"theme_toolbar":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY_uIBDA",
"theme_tab_background":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY1OoBDA",
"theme_button_background":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY2-IBDA"},
"colors":{
"frame":[0,0,0],
"toolbar":[0,0,0],
"tab_text":[255,255,255],
"tab_background_text":[255,255,255],
"bookmark_text":[255,255,255],
"ntp_background_alignment":"bottom",
"ntp_background_repeat":"no-repeat",
"ntp_logo_alternate":1},
"tints":{
"buttons":[1,1,1]}}}
"ntp_section_link":[255,255,255]},
"properties":{ 
the order of the lines gets mixed up?
fred
Posts: 87
Joined: 02 Oct 2008 11:43
Location: The Netherlands

Post by fred »

Using TextEd 5.40 copied your script in a Pascal script and it results in this:

{"version":"1.0",
"name":"Glow",
"theme":{
"images":{
"theme_frame":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUYmMsBDA",
"theme_toolbar":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY_uIBDA",
"theme_tab_background":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY1OoBDA",
"theme_button_background":"i/agxjaHJvbWV0aGVtZXNyDAsSBEZpbGUY2-IBDA"},
"colors":{
"frame":[0,0,0],
"toolbar":[0,0,0],
"tab_text":[255,255,255],
"tab_background_text":[255,255,255],
"bookmark_text":[255,255,255],
"ntp_background":[0,0,0],
"ntp_text":[255,255,255],
"ntp_link":[255,255,255],
"ntp_section":[96,96,96,0.4],
"ntp_section_text":[255,255,255],
"ntp_section_link":[255,255,255]},
"properties":{
"ntp_background_alignment":"bottom",
"ntp_background_repeat":"no-repeat",
"ntp_logo_alternate":1},
"tints":{
"buttons":[1,1,1]}}}
PAEz
Posts: 3
Joined: 06 Aug 2009 13:43

Post by PAEz »

Thanks for taking the time to do that fred.
Ill get that version now and give it a shot, that output was what I was hopeing for.

EDIT
Thanks again fred, its all working sweet now.
Post Reply