metis Posted February 20, 2011 Share Posted February 20, 2011 (edited) Hello. Trying to make a bot to a page. This is my AutoIt code. expandcollapse popup#include <FF.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Bw = GUICreate("Chomikuj - BOT", 686, 438, 203, 145) $tabs = GUICtrlCreateTab(0, 0, 686, 638) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $tabLogowanie = GUICtrlCreateTabItem("Logowanie") $groupLogowanie = GUICtrlCreateGroup("Logowanie", 4, 29, 385, 169) $InputLogin = GUICtrlCreateInput("", 112, 50, 121, 21) $InputHaslo = GUICtrlCreateInput("", 112, 80, 121, 21) $Label1 = GUICtrlCreateLabel("Login", 32, 55, 36, 17) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Haslo", 32, 85, 36, 17) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $ButtLoguj = GUICtrlCreateButton("Loguj", 96, 184, 75, 25, $WS_GROUP) $ButtWyjscie = GUICtrlCreateButton("Wyjscie", 216, 184, 75, 25, $WS_GROUP) $tabReklama = GUICtrlCreateTabItem("Reklama") $groupLogowanie = GUICtrlCreateGroup("Treść Reklamy", 4, 29, 670, 400) $InputRek = GUICtrlCreateInput("Tu wpisz treść reklamy", 10, 50, 650, 300) $Buttwys = GUICtrlCreateButton("Wysyłaj", 96, 380, 75, 25, $WS_GROUP) $ButtWyjscie2 = GUICtrlCreateButton("Wyjscie", 216, 380, 75, 25, $WS_GROUP) $tabins = GUICtrlCreateTabItem("Instrukcja Obsługi") $groupLogowanie = GUICtrlCreateGroup("Instrukcja Logowania", 4, 29, 675, 189) $Label1 = GUICtrlCreateLabel("Najpierw Ściągamy Mozille oraz Dodatek Do niej : MozRepl. Wersja FireFoxa musi być zgodna z dodatkiem. Kroki które spą pod spodem wykonujemy tylko gdy jesteśmy wylogowani. Teraz tylko wpisujemy swoj login,hasło klikamy Loguj a program automatycznie włączy nam Foxa i nas zaloguje. Okna nie zamykamy.!", 8, 50, 671, 185) $groupLogowanie = GUICtrlCreateGroup("Instrukcja Reklamy", 4, 220, 675, 189) $Label2 = GUICtrlCreateLabel("Musimy być zalogowani.W polu Treści wpisujemy treść reklamy i klikamy na wysyłaj.Otowrzy nam się nowe okno FF które bedzie rozsyłało naszą reklamę. Program jest ustawiony że co 20 wysłanych reklam bedzie nas pytał czy wysyłać dalej. Ma to na cel abysmy mieli czas wpisać KodAntySpamerski. Okno nr.1 możemy juz zamknąc ponieważ ono słuzyło tylko do zalogowania", 8, 249, 671, 185) $tabcopy = GUICtrlCreateTabItem("CopyRight") $groupLogowanie = GUICtrlCreateGroup("Prawa Autorskie Metiso", 4, 29, 675, 434) $Label2 = GUICtrlCreateLabel(" Uzytkownik Metiso nie ponosi odpowiedzialności za skutki wynikające z działania programu. Wszelkie prawa zastrzeżone. © Copyright by Metiso", 8, 50, 671, 185) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ButtLoguj Logowanie() Case $ButtWyjscie Exit Case $Buttwys Wysylanie() Case $ButtWyjscie2 Exit EndSwitch WEnd Func Logowanie() If _FFConnect() Then _FFOpenURL("http://prisonwars.pl/") _FFXPath("//input[@id='ct100$LoginTop$LoginChomikName' and @type='text']", "", 9) _FFObj("xpath.value = '" & GUICtrlRead($InputLogin) & "'") _FFXPath("//input[@id='ctl00$LoginTop$LoginChomikPassword' and @type='password']", "", 9) _FFObj("xpath.value = '" & GUICtrlRead($InputHaslo) & "'") _FFFormSubmit("ctl00$LoginTop$LoginButton", "id") EndIf EndFunc Func Wysylanie() If _FFConnect() Then _FFStart ("www.chomikuj.pl") _FFOpenURL("www.chomikuj.pl") _FFXPath("//textarea[@id='ChatText']", "", 9) _FFObj("xpath.value = '" & GUICtrlRead($InputRek) & "'") _FFClick(_FFXPath("//a[@class='sendB']", "", 9)) EndIf EndFunc/code] When I click on the login (GUI-Button), the computer does not do anything just hangs for a moment. What could be the cause? And how to make the function "wysylanie"? Please help. HTML code is given here. Login HTML :<td> <input name="ctl00$LoginTop$LoginName" id="ctl00_LoginTop_LoginName" tabindex="1" class="text" style="width: 145px;" type="text"><span id="ctl00_LoginTop_LRV" style="color: Red; visibility: hidden;"></span> </td>Password HTML : <td style="white-space: nowrap;"> <input name="ctl00$LoginTop$LoginChomikPassword" id="ctl00_LoginTop_LoginChomikPassword" tabindex="1" class="text" onblur="topLoginRemember(event)" onkeydown="topLoginRemember(event)" style="width: 90px;" type="password"> </td>HTML For sendingHere is the text type ($InputRek)<textarea id="ChatText" onkeydown="ch.ChatControl.Send(event)" rows="3" cols="" style="width: 260px; height: 35px"></textarea>After typing the text is to click on this button <a class="sendB" href="javascript:;" onclick="ch.ChatControl.AddMessage();"></a> Legend PL-EN : Login - Login/Nick Haslo - Password Loguj - Log In Wyjscie - Exit wysylanie - Send Reklama - Advertisement Edited February 20, 2011 by metis Link to comment Share on other sites More sharing options...
guinness Posted February 20, 2011 Share Posted February 20, 2011 Read this first: http://www.autoitscript.com/forum/forum-2/announcement-12-game-bots-and-automation/ UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
metis Posted February 20, 2011 Author Share Posted February 20, 2011 It is not only a bot to play for this page Link to comment Share on other sites More sharing options...
DW1 Posted February 20, 2011 Share Posted February 20, 2011 It is not only a bot to play for this pageThat makes it worse....You will not find help for your bot here. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
metis Posted February 20, 2011 Author Share Posted February 20, 2011 this is where I get help? 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