Jump to content
Sign in to follow this  
Arclite86

Ignore text

Recommended Posts

Arclite86

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"

Share this post


Link to post
Share on other sites
Chimp

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", "")

 

 

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

Share this post


Link to post
Share on other sites
Arclite86

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

Share this post


Link to post
Share on other sites
Chimp

 

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

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

Share this post


Link to post
Share on other sites
Chimp

:-((

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

:)

edit:

source

Edited by PincoPanco

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

Share this post


Link to post
Share on other sites
Chimp

you are welcome :P

p.s.

have you solved??


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

Share this post


Link to post
Share on other sites
Arclite86

you are welcome :P

p.s.

have you solved??

yes  thanks it has been solved, but the painting was very helpful too :P

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.