nghich3 Posted April 14, 2011 Share Posted April 14, 2011 (edited) #NoTrayIcon #include <IE.au3> $Topic ="http://www.ssc.vn"; or http://www.4teen.vn/forum/ $MyUsername="User is an idiot and provided this information." $MyPassword="User is an idiot and provided this information." $oIE = _IECreate ($Topic,0,1) $oForm = _IEFormGetCollection ($oIE, 1) $oText = _IEGetObjByName ($oIE, "vb_login_username") $oText.value = $MyUsername ;_IEFormElementSetValue ($oText, $MyUsername) $oText = _IEGetObjByName ($oIE, "vb_login_password") $oText.value = $MyPassword $oButtons = _IETagNameGetCollection($oIE,"input") For $oButton In $oButtons if StringLower($oButton.value) = "đăng nhập" or StringLower($oButton.value) = "ðăng nhập" or StringLower($oButton.value) = "log in" Then ;MsgBox(0, "Form Input Type", StringLower($oButton.title) ) ;_IEAction($oButton, 'click') $hwnd = _IEPropertyGet($oIE, "hwnd") _IEAction ($oButton, "focus") ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") ;MsgBox(0, "Form Input Type", StringLower($oButton.outerhtml) ) ;$oButton.InvokeMember("click") EndIf Next This code run with all forum vbb 3. but not with vbb4. or highler Any one help me . Many thanks Edited April 29, 2011 by Valik Credentials removed because the user is an idiot. Link to comment Share on other sites More sharing options...
JScript Posted April 14, 2011 Share Posted April 14, 2011 Check what has changed between vbb3. and vbb4! I guarantee that you will find the solution... http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
guinness Posted April 14, 2011 Share Posted April 14, 2011 And probably best to remove your credentials from the OP! 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...
nghich3 Posted April 29, 2011 Author Share Posted April 29, 2011 (edited) With vb.net . It's done . But with autoit . Nothing happen . Any one help me :| VB code : WebElements(s_i) = .Document.GetElementsByTagName("input") For Each webelement(s_i) In WebElements(s_i) If webelement(s_i).GetAttribute("name") = "vb_login_username" Then webelement(s_i).SetAttribute("value", S_user) ElseIf webelement(s_i).GetAttribute("name") = "vb_login_password" Then webelement(s_i).SetAttribute("value", S_password) End If Next For Each webelement(s_i) In WebElements(s_i) If webelement(s_i).GetAttribute("value").ToUpper = "ÐĂNG NHẬP" Or _ webelement(s_i).GetAttribute("value").ToLower = "đăng nhập" Or _ webelement(s_i).GetAttribute("value").ToLower = "Login" Then Or _ webelement.GetAttribute("tabindex") = "104" Then webelement(s_i).InvokeMember("click") _IELoadWait(s_i, 500) Exit For End If Next Edited April 29, 2011 by nghich3 Link to comment Share on other sites More sharing options...
nghich3 Posted April 29, 2011 Author Share Posted April 29, 2011 (edited) WebElements(s_i) = .Document.GetElementsByTagName("input") For Each webelement(s_i) In WebElements(s_i) If webelement(s_i).GetAttribute("value").ToUpper = "ÐĂNG NHẬP" Or _ webelement(s_i).GetAttribute("value").ToLower = "đăng nhập" Or _ webelement(s_i).GetAttribute("value").ToLower = "Login" Then Or _ webelement.GetAttribute("tabindex") = "104" Then webelement(s_i).InvokeMember("click") _IELoadWait(s_i, 500) Exit For End If Next why do it run with vb.net , but with autoit it don't ? what else between webelement(s_i).InvokeMember("click") and IEaction("click") ? Edited April 29, 2011 by nghich3 Link to comment Share on other sites More sharing options...
Valik Posted April 29, 2011 Share Posted April 29, 2011 Strongly suggest that if that is a real account you change the password immediately because you are an idiot who gave it out. If that is not a real account then chances are you are breaking forum rules. Chances are you are breaking rules anyway so for that I'm locking the thread. Link to comment Share on other sites More sharing options...
Recommended Posts