Servant Posted November 26, 2013 Share Posted November 26, 2013 (edited) I already spend two days by reviewing AutoIt Documentation and I still don't know what to do.. Would you please give me a full example script how to do these steps: Start the AutoIt script. A customized GUI will now appear. I will input the 3 URLs of my Facebook pages on the GUI and save them! Now I will log in my Facebook account manually. Post a photo with message on the GUI. The content will now start posting on my 3 different FB pages. When it's finish, I will click "Close" on the GUI but the 3 URLs will be saved. And then the script will now be exited. But when I open it again the 3 URLs of my pages will still be there! If you can't provide me this hard thing, just please refer me to the specific example scripts that matches those actions. I'm really tired right now and I think, this is the right time to ask for a help. Anyway, thanks for any help.. Edited November 26, 2013 by Servant http://developingsites.blogspot.com Link to comment Share on other sites More sharing options...
water Posted November 26, 2013 Share Posted November 26, 2013 After reading the documentation, what have you tried so far? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Myicq Posted November 26, 2013 Share Posted November 26, 2013 Maybe you are trying to do this the long way around, automating the web page ? A better way would be to study the Facebook API, or just to see some simple example ? You can use/call Curl directly from AutoIT - and achieve what you want without making it over-complicated. I am just a hobby programmer, and nothing great to publish right now. Link to comment Share on other sites More sharing options...
Servant Posted November 26, 2013 Author Share Posted November 26, 2013 (edited) After reading the documentation, what have you tried so far? Here, but this is so unfinished and just a test (I also want to reconstruct it to the steps that I've wanted): expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Language: English Author: Mark Anthony B. Dungo Website: http://developingsites.blogspot.com Script Function: Instantiate the posting to all of your handle Facebook pages. #ce ---------------------------------------------------------------------------- ; Script Start #include <IE.au3> ; Create an IE Object Local $oIE = _IECreate("https://www.facebook.com/", 0, 1, 1, 1) ; Read the text in IE Body Local $oText = _IEBodyReadText($oIE) Local $location = StringInStr($oText, "Sign Up") If $location > 0 Then _IENavigate($oIE, "https://www.facebook.com/login.php", 1) MsgBox(0, "Facebook", "Please log in first.") Else ; GUICreate("Facebook Pages' Poster") ; GUISetState(@SW_SHOW) _IENavigate($oIE, "https://www.facebook.com/TheAdmins", 1) EndIf $oHWND = _IEPropertyGet($oIE, "hwnd") WinSetState($oHWND, "", @SW_MAXIMIZE) Sleep(5000) $oForm = _IEGetObjById($oIE, "u_0_3g") $oQuery = _IEFormElementGetObjByName($oForm, "xhpc_message") ; $oSubmit = _IEFormElementGetValue($oForm, "1") ; _IEAction($oQuery, "click") _IEFormElementSetValue($oQuery, "TEST") ; _IEAction($oSubmit, "click") MsgBox(0, "Script End", "The end of our test.") It looks like the command _IEFormElementSetValue($oQuery, "TEST") was once worked at the first time that I test it, but not on the next time around thinking Facebook knows that this command is trying to manipulate their code. But not so sure about it.. Maybe you are trying to do this the long way around, automating the web page ? A better way would be to study the Facebook API, or just to see some simple example ? You can use/call Curl directly from AutoIT - and achieve what you want without making it over-complicated. Is using Curl the standard for manipulating web pages? Or just using automation software such as AutoIt is the standard one? What I mean is I don't want to use such as other artificial method for manipulating pages. And also, nice link but it looks like not updated. Edited November 26, 2013 by Servant http://developingsites.blogspot.com Link to comment Share on other sites More sharing options...
Myicq Posted November 26, 2013 Share Posted November 26, 2013 No, Curl is not the "standard" for manipulating web pages, but one of many ways to achieve the goal. I just personally like to get the job done easily, even if it involves having a call to a small external utility. As in "do not re-invent the wheel". Just my personal taste. I am just a hobby programmer, and nothing great to publish right now. Link to comment Share on other sites More sharing options...
Servant Posted November 26, 2013 Author Share Posted November 26, 2013 (edited) Unfortunately, the IDs on the post form are changing.. How can I automate now the posting on my Facebook pages? Please show me a real example script, even by using Curl or not.. Please help. Edited November 26, 2013 by Servant http://developingsites.blogspot.com Link to comment Share on other sites More sharing options...
water Posted November 26, 2013 Share Posted November 26, 2013 If you can't identify the form then you need to try the API. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Servant Posted November 26, 2013 Author Share Posted November 26, 2013 If you can't identify the form then you need to try the API. So I need to create a new Facebook app to be able to use the Facebook API? But I still wondered how this man finished his work? http://developingsites.blogspot.com Link to comment Share on other sites More sharing options...
Bert Posted November 26, 2013 Share Posted November 26, 2013 I already spend two days by reviewing AutoIt Documentation and I still don't know what to do.. Would you please give me a full example script how to do these steps:Start the AutoIt script. Simple enough. Just run the exe or run from SciTE.A customized GUI will now appear. Make a GUI with Koda - Koda is part of the toolbox when you install the full AutoIt suiteI will input the 3 URLs of my Facebook pages on the GUI and save them! Save the URLs to an INI file. Many examples in the helpfile and in the forum on how to do thisNow I will log in my Facebook account manually. Manual process - no coding needed (question - You have 3 browser windows open to handle the 3 accounts? Or do you use the "Managing Ads & Campaigns" functionality? Some type of process map on how you do this part here would help.Post a photo with message on the GUI. Have two fields on the GUI - one for the input text and one to point to the picture file you are uploadingThe content will now start posting on my 3 different FB pages.How do you want to cycle through the pages? is it sent to all 3 pages at once or cycles through them? When it's finish, I will click "Close" on the GUI but the 3 URLs will be saved. Simple enough. Save URL to INI. Have a button called "Closed" on the GUI.And then the script will now be exited. simple - script will exitBut when I open it again the 3 URLs of my pages will still be there! On restart the GUI will first read the INI for the last three URLs used. If you can't provide me this hard thing, (We like to teach people to fish, not give you fish) just please refer me to the specific example scripts that matches those actions. (what is called out in red will give you PLENTY of direction. You will need to show us some code on what you have tried in order for us to help you further.)I'm really tired right now and I think, this is the right time to ask for a help. Get some sleep, clear your brain, and come back when you are fresh. Odds are this will be MUCH easier for you then! Anyway, thanks for any help..Your welcome - and welcome to the forum! Xandy 1 The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Servant Posted November 27, 2013 Author Share Posted November 27, 2013 (edited) If you can't identify the form then you need to try the API. Can you give me an example script for posting photo on a handle Facebook page by this method? Edited November 27, 2013 by Servant http://developingsites.blogspot.com Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 27, 2013 Moderators Share Posted November 27, 2013 Servant, this is a forum for assisting people with their own scripts. We lean toward the "teach a man to fish" motto, rather than spoon-feeding you code. Please show us the work you have put in, based on Yogi's suggestions, and explain where it is failing. Help us help you "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Servant Posted December 3, 2013 Author Share Posted December 3, 2013 I want to make an app that can publish post to many of my handle pages at the same time but if it's against the Facebook rules then I'll go to publish one by one. I'm now learning Facebook API and I don't want my FB app to become blocked in the future. Is there any FB violation when I try to publish a single post e.g. to my 10 handle pages at the same time using my created app? I'm now on my way, please help.. http://developingsites.blogspot.com Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 3, 2013 Moderators Share Posted December 3, 2013 Is there any FB violation when I try to publish a single post e.g. to my 10 handle pages at the same time using my created app? Would this not be something better asked of FB support, or worth you looking through the site's TOS yourself? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Bert Posted December 3, 2013 Share Posted December 3, 2013 I hope I'm not speaking out of turn here but I think I can safely say this: If it is against the TOS of Facebook then I would think this thread will be closed as well by a moderator. The reason being is we try not to run afoul of other sites TOS. In doing a quick google I believe it is not against their TOS. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now