Arclite86 Posted March 14, 2014 Posted March 14, 2014 (edited) this is the code I try to run: Func volgerteller() $link = GUICtrlRead($List1) $oIE = _IECreate("https://twitter.com/"&$link,1,0) ;linkkk $oInput2s = _IETagNameGetCollection($oIE, "a") For $oInput2 In $oInput2s If $oInput2.className() = "js-nav" Then If StringInStr($oInput2.innerHTML(), 'Volgend') Then ConsoleWrite(_StringBetween($oInput2.innerHTML(),'>','<')[0] & @CRLF) ExitLoop EndIf EndIf Next $numbvolgers = (_StringBetween($oInput2.innerHTML(),'>','<')[0] & @CRLF) GUICtrlSetData($List2,"volgers"& $numbvolgers ) if @error then MsgBox(0, "", "gevonden" ) if I remove this line it doesn't shuts down immediately ( but the function will not work) $numbvolgers = (_StringBetween($oInput2.innerHTML(),'>','<')[0] & @CRLF) GUICtrlSetData($List2,"volgers"& $numbvolgers ) so it has something to do with the last 2 lines, this is the error that i get: +>16:23:00 AU3Check ended.rc:0 >Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\joesoef pc\Desktop\autoit\program\test.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop "C:\Program Files (x86)\AutoIt3\Include\String.au3" (42) : ==> Subscript used on non-accessible variable.: Func _StringBetween($sString, $sStart, $sEnd, $fCase = False) Func _StringBetween($sString, $sStart, $sEnd, $fCase = False^ ERROR ->16:23:00 AutoIt3.exe ended.rc:1 +>16:23:00 AutoIt3Wrapper Finished.. >Exit code: 1 Time: 1.065 yesterday it worked fine I saved it, now I start the code and the form direclty shuts down.. Edited March 14, 2014 by Arclite86
FireFox Posted March 14, 2014 Posted March 14, 2014 Hi, The error means the _StringBetween return value is not an array. So in your $oInput2.innerHTML(), the _StringBetween function hasn't found the delimiters >, <. And because it's a remote resource (and especially a dynamic website) it can change Br, FireFox.
Arclite86 Posted March 14, 2014 Author Posted March 14, 2014 Hi, The error means the _StringBetween return value is not an array. So in your $oInput2.innerHTML(), the _StringBetween function hasn't found the delimiters >, <. And because it's a remote resource (and especially a dynamic website) it can change Br, FireFox. aa alright thank you very much firefox, but how did you know the >,< was the problem?
Arclite86 Posted March 16, 2014 Author Posted March 16, 2014 I have got a new strange problem, if use, $oIE = _IECreate("https://twitter.com/"&$link,1,0) it doesnt work it shuts down direclty and give's a error : "C:\Users\user pc\Desktop\autoit\programma\teller.au3" (43) : ==> Variable must be of type "Object".: $numbvolgers = (_StringBetween($oInput2.innerHTML(),'>','<')[0] & @CRLF) $numbvolgers = (_StringBetween($oInput2^ ERROR but if i use $oIE = _IECreate("https://twitter.com/"&$link) without the ,1,0, it does work, but i dont want 10 browser to pop up every time has somebody a sollution for this strange problem.
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