Arclite86 Posted April 8, 2014 Posted April 8, 2014 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"
mikell Posted April 8, 2014 Posted April 8, 2014 You should probably place somewhere in the code something like this If not StringInStr(....., "Volgend") Then ...
Gianni Posted April 8, 2014 Posted April 8, 2014 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", "") Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Arclite86 Posted April 9, 2014 Author Posted April 9, 2014 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
JohnOne Posted April 9, 2014 Posted April 9, 2014 )) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Gianni Posted April 9, 2014 Posted April 9, 2014 (edited) 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 April 9, 2014 by PincoPanco Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Solution Gianni Posted April 9, 2014 Solution Posted April 9, 2014 (edited) :-(( .-~ ~-. .-~ ~-. / \ / \ i __ Y __ i | dHHb | dHHb | l !HH;' M `;HH! ! \ "H' / \ `H" / "-.___.-" "-.___.-" ) <_ _, ._ {~---._________.---~} | . | .----------. l ; ! -{ Pttthhhhh! } `-.-' `----------' edit: source Edited April 9, 2014 by PincoPanco Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Gianni Posted April 10, 2014 Posted April 10, 2014 you are welcome p.s. have you solved?? Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Arclite86 Posted April 10, 2014 Author Posted April 10, 2014 you are welcome p.s. have you solved?? yes thanks it has been solved, but the painting was very helpful too
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