Bobby 14 Posted September 8, 2011 Report Share Posted September 8, 2011 Hi uBot-Fans, I have something to do, that I was able to solving with uBot 3.5 - but now I have since 1-2 days uBot 4, and now I'm not able to do this. What I wanna do: 1.] I have a TXT-file called "article.txt", which contains some placeholders (for example "FIRSTNAME" and "EMAILADDRESS") Here is an example of the "article.txt" file: Dear FIRSTNAME, thank you very much for your eMail. Your Email-Address is EMAILADDRESS. Bye 2.] I put the content of this "article.txt" in a variable (I can do this)3.] And now I would need to change the placeholders with something else (for example "FIRSTNAME" with "John"), before I paste this somewhere (into Wordpress). I know I can do this with the "replace" command, but I can replace there just 1 placeholder - but I have 6-7 placeholders to change. How can I do this? Thank you!Bye, Bobby Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted September 8, 2011 Report Share Posted September 8, 2011 Is this something you want to accomplish? set(#article file, "Dear FIRSTNAME, thank you very much for your eMail. Your Email-Address is EMAILADDRESS. Bye", "Global") load html($replace($replace(#article file, "FIRSTNAME", "John"), "EMAILADDRESS", "myemail@address.com")) 2 Quote Link to post Share on other sites
Bobby 14 Posted September 8, 2011 Author Report Share Posted September 8, 2011 Kreatus, you are amazing! Thank you very-very much! This is EXACTLY what I was looking for! It works even with 7 "replace"-s perfect! Is this something you want to accomplish? set(#article file, "Dear FIRSTNAME, thank you very much for your eMail. Your Email-Address is EMAILADDRESS. Bye", "Global") load html($replace($replace(#article file, "FIRSTNAME", "John"), "EMAILADDRESS", "myemail@address.com")) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.