Jump to content

Ignore text


Go to solution Solved by Gianni,

Recommended Posts

this is probably not a hard question but i forget how to do it

I got this code and i works fine:

$oLinks2 = _IELinkGetCollection($oIe)
    For $oLink2 In $oLinks2
        If $oLink2.className = 'ProfileNav-stat ProfileNav-stat--link u-borderUserColor u-textCenter js-tooltip js-nav u-textUserColor' Then
            If $oLink2.getAttribute('data-nav') = 'following' Then
                ConsoleWrite('following = ' & $oLink2.innerText & @CRLF)
                                            $4er =  _GUICtrlListBox_GetCurSel($List8)

;_GUICtrlListBox_AddString ($list3,""& $oLink2.innerText)
;                           $4er =  _GUICtrlListBox_GetCurSel($List3)
 ;_GUICtrlListBox_ReplaceString($List3, $4er, ""& $oLink2.innerText)


$text =  _GUICtrlListBox_GetCurSel($List8)
_GUICtrlListBox_ReplaceString($List8,$text,""& $oLink2.innerText)

            EndIf
        EndIf
    Next

it reads the element and puts it in a list like how I want it but it also reads an extra text "Volgend" and i dont want that,how  can I ignore the word "Volgend"

Link to comment
Share on other sites

also,
you could remove the word "Volgend" from your target string using something like StringReplace ( $string, "Volgend", "")

maybe like this?

_GUICtrlListBox_ReplaceString($List8,$text,""&  StringReplace($oLink2.innerText, "Volgend", "")

 

 

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

also,

you could remove the word "Volgend" from your target string using something like StringReplace ( $string, "Volgend", "")

maybe like this?

_GUICtrlListBox_ReplaceString($List8,$text,""&  StringReplace($oLink2.innerText, "Volgend", "")

this is the error that i get...

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:test.au3" /UserParams    
+>09:36:01 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 (3.3.10.2)  from:C:\Program Files (x86)\AutoIt3
"C:test.au3"(626,96) : error: syntax error
 _GUICtrlListBox_ReplaceString($List7, $4er,""&  StringReplace($oLink.innerText, "Volgend", "")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\twitter programma\test.au3 - 1 error(s), 0 warning(s)
!>09:36:01 AU3Check ended. Press F4 to jump to next error.rc:2
+>09:36:02 AutoIt3Wrapper Finished..
>Exit code: 2    Time: 0.756
Link to comment
Share on other sites

 

this is the error that i get...

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:test.au3" /UserParams    
+>09:36:01 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 (3.3.10.2)  from:C:\Program Files (x86)\AutoIt3
"C:test.au3"(626,96) : error: syntax error
 _GUICtrlListBox_ReplaceString($List7, $4er,""&  StringReplace($oLink.innerText, "Volgend", "")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\joesoef pc\Desktop\autoit\twitter programma\test.au3 - 1 error(s), 0 warning(s)
!>09:36:01 AU3Check ended. Press F4 to jump to next error.rc:2
+>09:36:02 AutoIt3Wrapper Finished..
>Exit code: 2    Time: 0.756

 

... missing a closing parenthesis ...  (as pointed by JohnOne)

_GUICtrlListBox_ReplaceString($List8,$text,""&  StringReplace($oLink2.innerText, "Volgend", ""))

sorry

Edited by PincoPanco

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

  • Solution

:-((

  .-~   ~-.   .-~   ~-.
 /         \ /         \
i      __   Y   __      i
|     dHHb  |  dHHb     |
l    !HH;'  M  `;HH!    !
 \    "H'  / \  `H"    /
  "-.___.-"   "-.___.-"
            )
           <_
   _,               ._
  {~---._________.---~}
          | . |    .----------.
          l ; !  -{ Pttthhhhh! }
          `-.-'    `----------'

:)

edit:

source

Edited by PincoPanco

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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