Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/18/2013 in all areas

  1. Jon

    AutoIt v3.3.9.25 Beta

    File Name: AutoIt v3.3.9.25 Beta File Submitter: Jon File Submitted: 17 Dec 2013 File Category: Beta 3.3.9.25 (17th December, 2013) (Beta) AutoIt: UDFs: - Changed: _SQLite 3.8.1.0 -> 3.8.2.0. - Changed: _ArrayDisplay() - new function with new functionalities - Changed: GUIListView() - new _Delete* functions - Fixed #2550: _GUICombo_GetEditText() struct sizing Click here to download this file
    1 point
  2. I think I've ended up answering my own question in the end, but will post here for anyone who may have the same problem... Do Local $FrameCount = $framecount + 1 Local $oFrame = _IEFrameGetCollection($oIE, $FrameCount) Sleep(200) Local $oForm = _IEFormGetObjByName($oFrame, "DlgAddWorkspace") Sleep(200) Until isObj ($oForm) I am still open to suggestions for a better way to go about this..
    1 point
  3. It is not explicitly written in the help file, but function definitions may not be inside of Do ... until IF ... endif for ... next switch ... Endswitch Select ... Endselect while .. wend with ... Endwith constructs.
    1 point
  4. jchd

    Prime Numbers

    I find the hunt for titanic primes quite boring. In fact, it only serves as a pretext for research in new number theoritic algorithms.
    1 point
  5. Melba23

    IF <> Multiple values??

    tes5884, Use Switch: $x = 6 Switch $x Case 1, 2, 3 ConsoleWrite("Fail" & @CRLF) Case Else ConsoleWrite("Success" & @CRLF) EndSwitch All clear? M23
    1 point
  6. BrewManNH

    Improved _ArrayAdd

    Here's a modification I made to the standard _ArrayAdd function from Array.au3. When used correctly, this function can drastically reduce the time needed to add multiple strings to an array without sacrificing any functionality. It has the same parameters as the standard _ArrayAdd function, but I've added a new one, which defaults to using the original if not used. The code below is a minor modification to the example script from the help file, I just modified it to time how long the operation takes, as well as adding 10, 000 entries to an already existing array. The first loop uses the current method of adding strings to an array, one at a time. The second loop creates a single string delimited by the pipe ("|") character containing 10,000 substrings, and then adding all 10,000 entries to the array in one _ArrayAdd call instead of 10,000 of them. If you run this from SciTE you will see just how much faster this method is than the original. The timing takes into account building the 10,000 substrings so the test is at least closer to being fair. The modified _ArrayAdd is in this demo script at the end of it, it is a drop in replacement for the original if you wanted to use it to replace it. #include <Array.au3> Global $avArray[10] $avArray[0] = "JPM" $avArray[1] = "Holger" $avArray[2] = "Jon" $avArray[3] = "Larry" $avArray[4] = "Jeremy" $avArray[5] = "Valik" $avArray[6] = "Cyberslug" $avArray[7] = "Nutster" $avArray[8] = "JdeB" $avArray[9] = "Tylo" Global $avArray2[10] $avArray2[0] = "JPM" $avArray2[1] = "Holger" $avArray2[2] = "Jon" $avArray2[3] = "Larry" $avArray2[4] = "Jeremy" $avArray2[5] = "Valik" $avArray2[6] = "Cyberslug" $avArray2[7] = "Nutster" $avArray2[8] = "JdeB" $avArray2[9] = "Tylo" _ArrayDisplay($avArray, "$avArray BEFORE _ArrayAdd()") $Timer = TimerInit() For $I = 1 To 10000 __ArrayAdd($avArray, "Test " & $I) Next ConsoleWrite("!Old method of _ArrayAdd = " & TimerDiff($Timer) / 1000 & @CRLF) _ArrayDisplay($avArray, "$avArray AFTER _ArrayAdd()") _ArrayDisplay($avArray2, "$avArray2 BEFORE _ArrayAdd()") $Timer = TimerInit() Global $sText = "" For $I = 1 To 10000 $sText &= "Test " & $I & "|" Next $sText = StringTrimRight($sText, 1) __ArrayAdd($avArray2, $sText, "|") ConsoleWrite("+New method of _ArrayAdd = " & TimerDiff($Timer) / 1000 & @CRLF) _ArrayDisplay($avArray2, "$avArray2 AFTER _ArrayAdd()") Func __ArrayAdd(ByRef $avArray, $vValue, $sDelim = "") If Not IsArray($avArray) Then Return SetError(1, 0, -1) If UBound($avArray, 0) <> 1 Then Return SetError(2, 0, -1) Local $iUBound = UBound($avArray), $aValue If $sDelim <> "" Then $aValue = StringSplit($vValue, $sDelim, 1) ; $STR_ENTIRESPLIT If Not @error Then ReDim $avArray[$iUBound + $aValue[0]] For $Loop = 0 To $aValue[0] - 1 $avArray[$iUBound + $Loop] = $aValue[$Loop + 1] Next Return $iUBound + $aValue[0] - 1 Else Return SetError(3, 0, -1) EndIf Else ReDim $avArray[$iUBound + 1] $avArray[$iUBound] = $vValue Return $iUBound EndIf EndFunc ;==>__ArrayAdd Enjoy!
    1 point
  7. You need to show us the function definition or we can't understand enough to give a sensible answer, and you haven't shown an EndIf. Also, rather than If $Subject it would be more readable to me to have If $Subject <> '' but it possibly makes no difference. In general using strings as way of setting different conditions is something I do not like to do, I prefer numbers like this Const $SENDFORWARD = 1, $MAKEREPLY = 2 SomeFunc("an eample",$SENDFORWARD) Func SomeFunc($Subject = '', $Reply = 0) switch $Reply case 0 some code case $SENDFORWARD some more code case $MAKEREPLY blahblah endswitch endfunc
    1 point
  8. Check out >this thread and look at the examples in it, there is one called _GUIToolTip_GetText that might work for you.
    1 point
  9. As stated, alt+ i opens the include file specified on an #include line! When you want to jump to the Func of a udf then use ctrl+j. Jos
    1 point
  10. DatMCEyeBall

    Bubblesort

    _ArrayAdd($Array, Number(GUICtrlRead($insert))) WIll allow for negative numbers.
    1 point
×
×
  • Create New...