Jump to content

Recommended Posts

Posted

I am trying to run this code:

$oIE = _IECreate("https://twitter.com/"&$link,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)
            ExitLoop
        EndIf
    EndIf
Next

$numbvolgers = (_StringBetween($oInput.innerHTML(),'>','<')[0] & @CRLF)

the error:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\joesoef pc\Desktop\autoit\youtube.au3" /UserParams    
+>11:30:21 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ;  Keyboard:00020409  OS:WIN_81/  CPU:X64 OS:X64    Environment(Language:0413  Keyboard:00020409  OS:WIN_81/  CPU:X64 OS:X64)
>Running AU3Check (1.54.22.0)  from:C:\Program Files (x86)\AutoIt3
C:\Users\joesoef pc\Desktop\autoit\youtube.au3(136,69) : ERROR: syntax error
            ConsoleWrite(_StringBetween($oInput.innerHTML(),'>','<')[
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\youtube.au3(148,70) : ERROR: syntax error
            ConsoleWrite(_StringBetween($oInput2.innerHTML(),'>','<')[
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\youtube.au3(153,60) : ERROR: syntax error
$numbvolgers = (_StringBetween($oInput.innerHTML(),'>','<')[
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\youtube.au3(153,62) : ERROR: unbalanced paranthesis expression.
$numbvolgers = (_StringBetween($oInput.innerHTML(),'>','<')[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\youtube.au3(154,61) : ERROR: syntax error
$numbvolgend = (_StringBetween($oInput2.innerHTML(),'>','<')[
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\youtube.au3(154,63) : ERROR: unbalanced paranthesis expression.
$numbvolgend = (_StringBetween($oInput2.innerHTML(),'>','<')[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\youtube.au3(136,68) : ERROR: _StringBetween(): undefined function.
            ConsoleWrite(_StringBetween($oInput.innerHTML(),'>','<')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\youtube.au3 - 7 error(s), 0 warning(s)
!>11:30:21 AU3Check ended. Press F4 to jump to next error.rc:2
+>11:30:21 AutoIt3Wrapper Finished..
>Exit code: 2    Time: 0.692

it seems the problem has to do with the string function,

I am  using autoit Version 3.3.7

because when i run version 3.3.10.2 firefox won't work any more

can somebody please help me with this.

Posted (edited)

With 3.3.7 you can't use this syntax

$txt = _StringBetween($oInput.innerHTML(),'>','<')[0]

You must use

$a = _StringBetween($oInput.innerHTML(),'>','<')
$txt = $a[0]

and don't forget the include #include <String.au3>

Edited by mikell
Posted
  On 3/12/2014 at 10:44 AM, mikell said:

With 3.3.7 you can't use this syntax

$txt = _StringBetween($oInput.innerHTML(),'>','<')[0]

You must use

$a = _StringBetween($oInput.innerHTML(),'>','<')
$txt = $a[0]

and don't forget the include #include <String.au3>

thak you but how can i give this code

$a = _StringBetween($oInput.innerHTML(),'>','<')
$txt = $a[0]

a name just like I did with this 

$numbvolgend = (_StringBetween($oInput2.innerHTML(),'>','<')[0] & @CRLF)

$numbvolgend

Posted

Upgrade!

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted
  On 3/12/2014 at 11:02 AM, FireFox said:

Learn the basics before making a NPP.

the  3.3.10.2 version has a bug with running firefox, I already discussed that in the Example script topic

the  3.3.7 Version has a problem with _StringBetween

how am I suppose too learn the basics form that?? what kind of advise is that?

Posted (edited)

This is NOT a bug.

Arrays direct access is a new feature not available in 3.3.7, that's all.

Like mikell showed you, use a temporary variable.

If you don't want to read advices, what can we do for you?

Edited by FireFox
Posted (edited)

#include <String.au3>
$a = _StringBetween($oInput2.innerHTML(), '>', '<')
$numbvolgend = $a[0] & @CRLF

BTW I can't see the connection between an Autoit upgrade and a trouble using a browser

Edit

At least use 3.3.8.1

Edited by mikell
Posted
  On 3/12/2014 at 10:58 AM, Arclite86 said:

but than i wont be able to use firefox

Then don't use the non-existent feature in that version.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted
  On 3/12/2014 at 11:35 AM, guinness said:

Then don't use the non-existent feature in that version.

 

I have have imported this string.au file  dont know if this is the right file but it dind't work, could somebody tell me what function I have to include that has too do with the "String" function so I can make this function work in v3.3.7 and run firefox, by the way I also discussed this problem/bug in the  >Example script topic (you can see my post over there (page30))

 

 

  On 3/12/2014 at 11:22 AM, mikell said:
#include <String.au3>
$a = _StringBetween($oInput2.innerHTML(), '>', '<')
$numbvolgend = $a[0] & @CRLF

BTW I can't see the connection between an Autoit upgrade and a trouble using a browser

Edit

At least use 3.3.8.1

see my posts >Example script topic (page30)

I did remember that I downloaded v3.3.8.1 because  v3.3.7 doesn't exist on the download page...

using the string function was just a way to read the title ( title = number 964)

<strong title="964" class="js-mini-profile-stat">964</strong>

if somebody know an other way to read this title with an other function than my question would also be answered :)

Posted

  On 3/13/2014 at 11:33 AM, Arclite86 said:

I have have imported this string.au file dont know if this is the right file but it dind't work

It has nothing to deal with includes, it's the interpretor which recognizes the syntax or not.

As we said you need to update to the latest autoit stable to use this feature.

Br, FireFox.

Posted (edited)

You may also need to update the SciTE4AutoIt package in case the Au3Check is not included in the autoit setup stuff.

Edited by FireFox
Posted (edited)
  On 3/13/2014 at 12:32 PM, FireFox said:

You may also need to update the SciTE4AutoIt package in case the Au3Check is not included in the autoit setup stuff.

Before i do that can I get some help with reading a function

<strong title="964" class="js-mini-profile-stat">964</strong>

this would save time instead of installing and testing all the time,

I have tried to use "_FFObjGet" but it cant track title's

does anybody know how to read the function (than put it in a message box)

the full code:

<a class="js-nav" href="/followbacklist3/followers" data-element-term="follower_stats" data-nav="followers" data-is-compact="false">Volgers<strong title="966" class="js-mini-profile-stat">966</strong> </a>
Edited by Arclite86

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...