a2mateit 395 Posted January 10, 2012 Report Share Posted January 10, 2012 Hello, I am trying to upload a picture inside of a wordpress blog post after the predefined text of "Screenshot:". This text only appears once, and I need to be able to upload a picture after the text. Is this possible? Thanks,-Justin Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 10, 2012 Report Share Posted January 10, 2012 click(<id="content-add_media">, "Left Click", "No") wait for element(<innertext="browser uploader">, "", "Appear") click(<innertext="browser uploader">, "Left Click", "No") wait for element(<innertext="Switch to the new uploader">, "", "Appear") change file field(<name="async-upload">, "C:\\Users\\Tj Development\\Desktop\\TJ2.jpg") click(<name="html-upload">, "Left Click", "No") wait for element(<value="Insert into Post">, "", "Appear") click(<value="Insert into Post">, "Left Click", "No") Example: http://screencast.com/t/6raMx1qmjIOG Quote Link to post Share on other sites
a2mateit 395 Posted January 10, 2012 Author Report Share Posted January 10, 2012 Hey TJ, Thanks for the code, but how do I specify where to upload the picture to. For example, Screenshot: is half way through the post and surrounded by other text. So it should upload right after Screenshot: I watched your video a couple of times, but I think I am missing something. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 10, 2012 Report Share Posted January 10, 2012 Split your content to post into 2 lists add the first half up to that point then upload pic then add the rest (list 2) to the text area Quote Link to post Share on other sites
a2mateit 395 Posted January 10, 2012 Author Report Share Posted January 10, 2012 Thanks I will give this a try. Quote Link to post Share on other sites
a2mateit 395 Posted January 10, 2012 Author Report Share Posted January 10, 2012 Forgot to mention I'm doing this in 3.5 so above code doesn't work. Nevermind, got it to work. Thanks again TJ. Instead of creating a new thread, I am having trouble choosing just one category in 3.5, it is selecting all categories. Any fix for this? Edit: Cannot click the Insert into Post button. Tried everything. Any fix for 3.5 Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 10, 2012 Report Share Posted January 10, 2012 Why aren't you doing it in v4? Runs much faster, and anything wordpress I have been able to do with ease. Quote Link to post Share on other sites
a2mateit 395 Posted January 10, 2012 Author Report Share Posted January 10, 2012 TJ, The type text in v4 has some kind of bug I believe. It will only enter the first 140 characters into my blog post, but works flawlessly in 3.5 I tried multiple times, but it just won't enter in my full blog post for some reason. Quote Link to post Share on other sites
a2mateit 395 Posted January 10, 2012 Author Report Share Posted January 10, 2012 I also have not been successful in getting version 4 to work on my VPS running Windows 2008. So I have to code in 3.5 if I want to be able to run it on my server 24/7. Still trying to click the Insert into Post button, I hope it's possible. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 11, 2012 Report Share Posted January 11, 2012 i have posted in wordpress, successfully more then 2500 + character articles as for the VPS setup. there is multiple things to check to make sure it has everything Ubot needs to run. Quote Link to post Share on other sites
a2mateit 395 Posted January 11, 2012 Author Report Share Posted January 11, 2012 Hey TJ, I opened up v4 and it is working now. But as far as my VPS, it worked for the first couple of days but now it won't open. It shows it running in my processes under task manager, but never loads up. Any documentation on how to make v4 work on a VPS windows 2008, I know it's not technically a supported platform but it would be nice if it could work. Any work around on clicking the Insert into Post button in v3.5? Thanks for all your responses. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 11, 2012 Report Share Posted January 11, 2012 if you have anti virus, firewall, anti spyware, or anti malware software on the vps then make sure it is not blocking ubot at all. Another reason it might not work is check to make sure .NET v3 and 4 are installed Also make sure the support files are installed. Quote Link to post Share on other sites
a2mateit 395 Posted January 11, 2012 Author Report Share Posted January 11, 2012 Split your content to post into 2 lists add the first half up to that point then upload pic then add the rest (list 2) to the text area Finally got the picture to upload. But now, when the second part of the text gets added into the text area it deletes everything that is already there (first half of text and picture). Any idea on how to keep the first half of text and picture when I add in the second half of the text? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 11, 2012 Report Share Posted January 11, 2012 try this after first part of content is thereyou add picture then flip to html tab scrape the value on the section to a list then add the second portion to that same list you scraped to then write it all to the value of the content area TJ 1 Quote Link to post Share on other sites
a2mateit 395 Posted January 11, 2012 Author Report Share Posted January 11, 2012 Thanks TJ, Got it to work finally. Thank you. Now i'm gonna have to re-configure how it works, and use a .csv in order to do mulitple blog posts with multiple pictures. Hopefully, when I get stuck you will allow me to pick your brain some more. Still trying to get v4 to work on my VPS, but that is another issue for another day. Thanks again,-Justin Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 11, 2012 Report Share Posted January 11, 2012 no problem. glad i was able to help you out. Make sure to edit initial post to [sOLVED] Quote Link to post Share on other sites
a2mateit 395 Posted January 11, 2012 Author Report Share Posted January 11, 2012 Done and Done. 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.