SugarBall Posted September 3, 2015 Posted September 3, 2015 hey guys, anyone knows how to write a string between two other strings like for example:To write AbzhdfX_d between ElseIf $sVideoLink1 = " and " then _IEAction ($oA, "click"), Simpler: to write a between b and c ,but automatically
RaiNote Posted September 3, 2015 Posted September 3, 2015 Tried _StringBetween/_StringInsert maybe they should do this. SugarBall 1 C++/AutoIt/OpenGL Easy Coder I will be Kind to you and try to help you till what you want isn't against the Forum Rules~
jguinch Posted September 3, 2015 Posted September 3, 2015 Just replace "" by "AbzhdfX_d". Look :$string = StringReplace('ElseIf $sVideoLink1 = "" then _IEAction ($oA, "click")', '""', '"AbzhdfX_d"') SugarBall 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
SugarBall Posted September 3, 2015 Author Posted September 3, 2015 Amazing way, jguinch, thank you Taking advantage of you reading this i'd like to ask about a loop problem i have:i want to write several line codes that include $sVideoLink1 and everytime i want to add one i want to make its last number raise 1.. Like this:$sVideoLink1$sVideoLink2$sVideoLink3$sVideoLink4sorry for going out of contest but i thought you might know the solution
jguinch Posted September 3, 2015 Posted September 3, 2015 What you need is an array with a loop. I know you're learning the coding with AutoIt, but loops and arrays are part of the learning.Look at the help file in Language Reference / Loop StatementsExample :Local $sVideoLink = ["link1", "link2", "link3", "link4", "link5"] For $i = 0 To UBound($sVideoLink) - 1 MsgBox(0, "", $sVideoLink[$i] ) Next SugarBall 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
SugarBall Posted September 3, 2015 Author Posted September 3, 2015 (edited) Again thanks my friend, you have a been a great help for me so far...i'll get to know with loops and arrays because i have to combine the two part of codes that you wrote....thanks for letting me count on you Edited September 3, 2015 by SugarBall
jguinch Posted September 3, 2015 Posted September 3, 2015 Don't forget to use and use again the helpfile : each essential function page contains one or more exemple that you can should open and run to understand how it works. SugarBall 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
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