Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/04/2017 in all areas

  1. That's because the source code of the webpage is broken with StringSplit(). So, it's fragmented and out of place for _StringBetween(), which is StringRegExp(). You cannot use StringSplit(). It will break the source every time. In addition, you might have to strip some characters from the source. $string = $strSourceCode $string = StringRegExpReplace($string, '(?s)[\r\n\t\v]', '') and then, strip the whitespace. $string = StringStripWS($string, 7) Then use _StringBetween(). --- You didn't answer my first and second question in post #9.
    1 point
  2. kylomas

    Combinations

    Renderer, See _arraypermute in the help file... kylomas
    1 point
  3. Jos

    winhttp Multilink problem

    That is an image of the 17 urls, not the actual UrlList.txt file! Just attach the file to your post. Jos
    1 point
  4. Jos

    SQLCMD Automation

    Try this: run(@ComSpec & ' /k sqlcmd -S ' & $Server & ' -E -Q "BACKUP DATABASE ' & $DBName & ' TO DISK=''' & $Destination & ''' WITH INIT" -o ' & $LogFile ) unsure whether you need a space between -o and the filename, just try it both in case this doesn't work. Jos
    1 point
  5. Okay. I cannot do it right now. I have an appointment to go to. I will be back in about 2 hours. In the meantime, if someone else is available to help, that would be okay. Otherwise, I will help when I get back.
    1 point
  6. Func MultipleConnections($address); <-- Function can only make ONE SINGLE connection at a time. $oMyError = ObjEvent("AutoIt.Error", "httperror"); <-- this line needs to be near the top under #includes. Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", $address, False) $oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0") $oHTTP.SetRequestHeader("Accept", "*/*") $oHTTP.SetRequestHeader("Accept-Language", "tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3") ; These are not needed for making a REQUEST ; ----------------------------------------- ;$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded"); <- not sending anything ;$oHTTP.SetRequestHeader("X-Requested-With", "XMLHttpRequest"); <- doubt this would help at all ;$oHTTP.SetRequestHeader("Referer", "https://www.autoitscript.com/forum/"); <- no need ;$oHTTP.SetRequestHeader("Content-Length", "34"); <- one length for all? not needed here ;$oHTTP.SetRequestHeader("Connection", "keep-alive"); <- not needed $oHTTP.Send() If @error Then ConsoleWrite("Error connection") $oHTTP = 0 Return SetError(1); <-- triggers an error. (code above function needs error checking) EndIf If $oHTTP.Status = 200 Then Local $sReceived = $oHTTP.ResponseText $oHTTP = Null; <-- use 0 instead Return $sReceived EndIf $oHTTP = Null; <-- use 0 instead Return -1 EndFunc Func httperror() ConsoleWrite("http error" & @CRLF) $oMyError.Clear; <-- clears the error Return SetError(1); <-- triggers an error EndFunc
    1 point
  7. @MrObvious welcome to the forum. In answer to your question: 1st Exercise - Look at For...To...Step,,,Next in the help file. The example shows you how to iterate through a count of x numbers. Then look at Mod to do your division. 2nd Exercise - Look at Operators in the help file. You can use a For Loop to iterate through the list of numbers and use the Greater Than or Less Than operator to compare them to 50 3rd Exercise - Look at Operators in the help file for this as well. The examples show how simple Math calculations can be with AutoIt. Good luck on your project. Try these out for yourself, and ask questions if you get stuck.
    1 point
  8. TheDcoder

    KindEbook Wishlist

    Nice hack with the ListViewItem control
    1 point
  9. TheDcoder

    KindEbook Wishlist

    You're welcome
    1 point
×
×
  • Create New...