Arclite86 Posted January 26, 2014 Posted January 26, 2014 (edited) #include <Buttonconstants.au3> #include <Editconstants.au3> #include <Guiconstantsex.au3> #include <staticConstants.au3> #include <windowsConstants.au3> #include <IE.au3> #include <String.au3> #Region ### START Koda GUI section ### Form= $GUIT1 = GUICreate("hoihallo", 286, 323, 338, 185) $Button3 = GUICtrlCreateButton("info", 64, 220, 145, 49, $WS_GROUP) $tekst3 = GUICtrlCreateEdit("", 64, 260, 145, 49, $WS_GROUP) #EndRegion ### END Koda GUI section ### $oIE = _IECreate("https://twitter.com/followbacklist3",1,0) $oInputs = _IETagNameGetCollection($oIE, "a") For $oInput In $oInputs If $oInput.className() = "js-nav" Then If StringInStr($oInput.innerHTML(), 'Volgers') Then ConsoleWrite(_StringBetween($oInput.innerHTML(),'>','<')[0] & @CRLF);number of them ExitLoop EndIf EndIf Next $getal1 = GUICtrlRead($tekst3) $ogetal = _IEGetObjById($oIE,_StringBetween($oInput.innerHTML(),'>','<')[0] & @CRLF) : <-------PROBLEM _IEFormElementSetValue($tekst3, $ogetal) ;MsgBox(0, "number followers", _StringBetween($oInput.innerHTML(),'>','<')[0]) ; works here EndSwitch WEnd i have the function: if you push button $button ("info'') it will go to a website a website and shows a word or a number and displays it intro my form it works when i use the message box";MsgBox(0, "number followers", _StringBetween($oInput.innerHTML(),'>','<')[0])" but instead of a message box i want it to be displayed on the $tekst3 ("GUICtrlCreateEdit") but i get an error. i have market the error line with "<-------PROBLEM" Edited January 26, 2014 by Arclite86
l3ill Posted January 26, 2014 Posted January 26, 2014 Hi Arclite86, Please have another look at your code, there are plenty of other problems besides the one you mention. GUI wont start for one... Give is a reproducer that we can test and help you find the answer to your issue. cya, Bill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Arclite86 Posted January 26, 2014 Author Posted January 26, 2014 (edited) Hi Arclite86, Please have another look at your code, there are plenty of other problems besides the one you mention. GUI wont start for one... Give is a reproducer that we can test and help you find the answer to your issue. cya, Bill the script does work but i have narrowed the script so it is easier to read so i probably removed some importend code's but that was not the problem, this is the problem I got "GUICtrlCreateEdit" named $Edit1 and i got this number locater: _StringBetween($oInput.innerHTML(),'>','<')[0] that is been used here: $oInputs = _IETagNameGetCollection($oIE, "a") For $oInput In $oInputs If $oInput.className() = "js-nav" Then If StringInStr($oInput.innerHTML(), 'Volgers') Then;or Followers depends withc language your using ConsoleWrite(_StringBetween($oInput.innerHTML(),'>','<')[0] & @CRLF);number of them ExitLoop EndIf EndIf Next I want the $edit to show the code above (that are 3 numbers: 826) 826 = my followers on twitter can somebody that has more experience with Autoit than me help me Edited January 26, 2014 by Arclite86
l3ill Posted January 26, 2014 Posted January 26, 2014 None of us has access to your twitter... so we can not test your code this way. Is the problem getting the numbers into the edit? or the numbers themselves like - _stringbetween issue? My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Arclite86 Posted January 26, 2014 Author Posted January 26, 2014 (edited) None of us has access to your twitter... so we can not test your code this way. Is the problem getting the numbers into the edit? or the numbers themselves like - _stringbetween issue? no no, the _stringbetween code works fine i have used this for a message box (can be seen bellow) MsgBox(0, "number followers", _StringBetween($oInput.innerHTML(),'>','<')[0]) the message box gives a nummer that is for example 826 or 970 or 1050 but instead of showing it on the msgbox i want it to be shown on my own program/form window in the "$Edit = GUICtrlCreateEdit" How do i do this Edited January 26, 2014 by Arclite86
Solution l3ill Posted January 26, 2014 Solution Posted January 26, 2014 Have a look at: GuiCtrlSetData(editboxvar, numbervar) My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
bogQ Posted January 27, 2014 Posted January 27, 2014 (edited) expandcollapse popup;~ #include <Buttonconstants.au3> #include <Editconstants.au3> ;~ #include <Guiconstantsex.au3> ;~ #include <staticConstants.au3> ;~ #include <windowsConstants.au3> #include <IE.au3> #include <String.au3> #include <GUIConstantsEx.au3> ;~ #Region ### START Koda GUI section ### Form= $GUIT1 = GUICreate("hoihallo followbacklist3", 286, 323, 338, 185) $Button3 = GUICtrlCreateButton("Check Followers", 64, 220, 145, 49) $tekst3 = GUICtrlCreateInput("", 64, 270, Default, 20, $ES_READONLY);create input that cant be adited to display data in it GUISetState(); display your gui ;~ #EndRegion ### END Koda GUI section ### While 1;main loop in gui to keep gui alive Switch GUIGetMsg();get gui msgs Case $GUI_EVENT_CLOSE;check if exit is initiated ExitLoop Case $Button3;check if button is initiated GetIdData("followbacklist3");func to input specific id for check EndSwitch WEnd Func GetIdData($sID);func to check specific id Local $oIE = _IECreate("https://twitter.com/" & $sID) Local $oInputs = _IETagNameGetCollection($oIE, "a") For $oInput In $oInputs If $oInput.className() = "js-nav" Then If StringInStr($oInput.innerHTML(), 'Volgers') Then;Followers GUICtrlSetData($tekst3, _StringBetween($oInput.innerHTML(), '>', '<')[0]) _IEQuit($oIE) ExitLoop EndIf EndIf Next EndFunc ;==>GetSiteDataedit: and pls dont pm members for support on easy questions, there are others who can help in problem solving and they probably need some workout 2, gave them a chance Edited January 27, 2014 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
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