merkaba 36 Posted March 21, 2013 Report Share Posted March 21, 2013 I figure I'd toss this up, I haven't contributed much in a while. This is generally noobish tutorial, no bells and whistles, quite literally it's a hit run and let go kind of program. With a little bit of know-how you can edit it to run multiple pages, also adding descriptions (csv may be a better way to do it) etc. Examples of why something like this is worth having around : http://tubesoftheinterweb.com/images/fgbgroup.jpg That's one of the pages I manage, we have under 2000 fans and haven't actually ever posted much of anything in the last 2 years. I decided to toss some pictures up and wrote a program to run it. I'll toss up two codes, one of them is if you have code view, the other is if you don't (standard edition). Code view version : clear list(%list) add list to list(%list, $get files("{$special folder("Application")}\\pictures\\", ""), "Delete", "Global") set list position(%list, 0) comment("All of the above is just good form generally. $get files returns a list of files from a folder (pictures) in the application folder. For the love of god, only put pictures in it. ") set(#un, "", "Global") set(#pw, "", "Global") comment("un and pw if you cant tell are your facebook email/password. You can also just set this with ui text boxes if you want it to be a bit more versitile. ") loop($list total(%list)) { clear cookies navigate("http://www.facebook.com", "Wait") wait for element($element offset(<email field>, 0), "", "Appear") type text(<name="email">, #un, "Standard") type text(<name="pass">, #pw, "Standard") click(<login button>, "Left Click", "No") wait for element(<innerhtml="exact page name you admin">, "", "Appear") comment("replace exact page name with the page you admin, leave quotes") wait(3) click(<title="exact page name you admin">, "Left Click", "No") comment("same as above") wait for element(<tagname="canvas">, "", "Appear") click(<innertext="Photo / Video">, "Left Click", "No") wait for element(<innertext="Upload Photos/Video">, "", "Appear") click(<innertext="Upload Photos/Video">, "Left Click", "No") wait for element(<name="file1">, "", "Appear") set(#file, $next list item(%list), "Global") change file field(<name="file1">, #file) wait for element(<innertext="Post">, "", "Appear") click(<innertext="Post">, "Left Click", "No") wait(10) comment("I just set a quick timer to give it time to upload, you can be creative here and use a wait for element, for me though this works fine") delete file(#file) comment("deletes the picture from the pictures folder, this can be removed if you want. ") navigate("http://google.com", "Wait") clear cookies wait(18000) comment("Set this wait timer to whatever you want, I chose 5 hours so it only posts about 4 pictures a day.") } And Standard define facebook { clear list(%list) add list to list(%list, $get files("{$special folder("Application")}\\pictures\\", ""), "Delete", "Global") set list position(%list, 0) comment("All of the above is just good form generally. $get files returns a list of files from a folder (pictures) in the application folder. For the love of god, only put pictures in it. ") set(#un, "", "Global") set(#pw, "", "Global") comment("un and pw if you cant tell are your facebook email/password. You can also just set this with ui text boxes if you want it to be a bit more versitile. ") loop($list total(%list)) { clear cookies navigate("http://www.facebook.com", "Wait") wait for element($element offset(<email field>, 0), "", "Appear") type text(<name="email">, #un, "Standard") type text(<name="pass">, #pw, "Standard") click(<login button>, "Left Click", "No") wait for element(<innerhtml="exact page name you admin">, "", "Appear") comment("replace exact page name with the page you admin, leave quotes") wait(3) click(<title="exact page name you admin">, "Left Click", "No") comment("same as above") wait for element(<tagname="canvas">, "", "Appear") click(<innertext="Photo / Video">, "Left Click", "No") wait for element(<innertext="Upload Photos/Video">, "", "Appear") click(<innertext="Upload Photos/Video">, "Left Click", "No") wait for element(<name="file1">, "", "Appear") set(#file, $next list item(%list), "Global") change file field(<name="file1">, #file) wait for element(<innertext="Post">, "", "Appear") click(<innertext="Post">, "Left Click", "No") wait(10) comment("I just set a quick timer to give it time to upload, you can be creative here and use a wait for element, for me though this works fine") delete file(#file) comment("deletes the picture from the pictures folder, this can be removed if you want. ") navigate("http://google.com", "Wait") clear cookies wait(18000) comment("Set this wait timer to whatever you want, I chose 5 hours so it only posts about 4 pictures a day.") } } 1 Quote Link to post Share on other sites
Beele 3 Posted July 16, 2013 Report Share Posted July 16, 2013 [question closed] was only a little error, I have found it Hey merkaba, thanks for share this. I have one question, maybe you can help me: The first part i changed for german Facebook and my site and up to this point all is easy: click(<innertext="Upload Photos/Video">, "Left Click", "No") wait for element(<name="file1">, "", "Appear") but than i have this button to click (see the picture, I´m not allowed to use the image extension on this community. Hmm ??? ) http://s1.directupload.net/images/130716/kdpd2hp5.jpg and for this the following doesn´t work: set(#file, $next list item(%list), "Global") change file field(<name="file1">, #file) Click and change file field doesn´t work too... any idea ? 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.