Jump to content

Recommended Posts

  • Moderators
Posted

Any input from you super cool people (like JdeB)?

I use this function a bit myself.. mine is only 2 lines with no error handling, but it would look something like this if I threw in error handling:
Func _DateToMonth($nMonthNum)
    If StringIsInt($nMonthNum) = 0 Or _
        Int($nMonthNum) < 1 Or 
        Int($nMonthNum) > 12 Then Return SetError(1, 0, 0)
    Local $aMonth[13] = ['','January','February','March','April','May','June', _
        'July','August','September','October','November','December']
    Return $aMonth[$nMonthNum]
EndFunc

I shouldn't be posting this here... there are instructions on how to get your UDFs included that you need to follow... I just wanted to show you a simpler way :rolleyes: ... (well I say simpler, less code often is much easier to digest than long drawn out code for some :rambo: ).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

  • 2 weeks later...
Posted (edited)

heh...fair enough...I don't think I had the right to get mad or anything...

1. I can assure it has been tested

2. http://www.autoitscript.com/forum/index.php?showtopic=37247 but that was the old version of mine, similar but without $fMultiReturn

3. this space intentionally left blank.

so does this udf have a chance or not? I understand you have been busy for the last few days with some personal matters, but this last post was almost a month ago. Why am I being so ignored? Also sent you a PM June 10th with the UDF info, never got an answer. Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

  • Developers
Posted

so does this udf have a chance or not? I understand you have been busy for the last few days with some personal matters, but this last post was almost a month ago. Why am I being so ignored? Also sent you a PM June 10th with the UDF info, never got an answer.

Quick glance tells me that this version doesn't have the same parameters as the current one .. so is it fair to assume it isn't backwards compatible ?

Func _ArraySearch(Const ByRef $avArray, $vWhat2Find, $iStart = 0, $iEnd = 0, $iCaseSense = 0, $fPartialSearch = False)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

Quick glance tells me that this version doesn't have the same parameters as the current one .. so is it fair to assume it isn't backwards compatible ?

Func _ArraySearch(Const ByRef $avArray, $vWhat2Find, $iStart = 0, $iEnd = 0, $iCaseSense = 0, $fPartialSearch = False)

I merged tg000's ArraySearch with the multidimensional support I wrote a while ago. If it's modified to support the current syntax can it be included?

http://www.autoitscript.com/forum/index.php?showtopic=38049

Edited by P5ych0Gigabyte
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Posted

I merged tg000's ArraySearch with the multidimensional support I wrote a while ago. If it's modified to support the current syntax can it be included?

http://www.autoitscript.com/forum/index.php?showtopic=38049

ah, forgot about that. Thanks Solid.

@JdeB - it would break scripts that currently use $fPartialSearch, but all the params before that are the same.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

  • Developers
Posted

@JdeB - it would break scripts that currently use $fPartialSearch, but all the params before that are the same.

understand .... but the aim is not to break anything if not needed... :whistle:

When you guys are 100% sure its backwards compatible and tested i will update the current version.

Just submit to needed files to me ...

:lmao:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

understand .... but the aim is not to break anything if not needed... :whistle:

When you guys are 100% sure its backwards compatible and tested i will update the current version.

Just submit to needed files to me ...

:lmao:

well not really sure how it's even possible to make it backwards compatible...the one parameter that will be broken is the one that I am replacing, that's the whole point of my udf. $fPartialSearch is boolean, which simply would not work for me. $fMultiReturn=True is basically the same as $iFlag=3 in my UDF.

I really see no way to make my udf backward compatible with $fMultiReturn.

I do realize the inconvenience and why you try to make everything backwards compatible, but sometimes old scripts just need to be broken to add new features..

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted (edited)

well not really sure how it's even possible to make it backwards compatible...the one parameter that will be broken is the one that I am replacing, that's the whole point of my udf. $fPartialSearch is boolean, which simply would not work for me. $fMultiReturn=True is basically the same as $iFlag=3 in my UDF.

I really see no way to make my udf backward compatible with $fMultiReturn.

I do realize the inconvenience and why you try to make everything backwards compatible, but sometimes old scripts just need to be broken to add new features..

I gotta agree with TG on this one. Making it backwards compatable would be very difficult and would require making the function a kludge by adding a redundant parameter.

Edit:Maybe I can get it to check for different values depending on if a boolean is used.

Edited by P5ych0Gigabyte
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Posted

well, If I must, here you go...

;===============================================================================
;
; Description:      Finds an entry within a one-dimensional array. (Similar to _ArrayBinarySearch() except the array does not need to be sorted.)
; Syntax:           _ArraySearch($avArray, $vWhat2Find, $iStart = 0, $iEnd = 0,$fCaseSense=0)
;
; Parameter(s):      $avArray               = The array to search
;                    $vWhat2Find            = What to search $avArray for
;                    $iStart (Optional)     = Start array index for search, normally set to 0 or 1. If omitted it is set to 0
;                    $iEnd  (Optional)      = End array index for search. If omitted or set to 0 it is set to Ubound($AvArray)-
;                    $fCaseSense (Optional) = If set to True (1) then search is case sensitive
;                    $iFlag (Optional)      = How to match the search string.
;                       Possible Values:
;                         0  -  (Default) Exact match
;                         1  -  match at beginning of element
;                         2  -  match at end of element
;                         3  -  anywhere in element
;                         4  -  Regular Expression (if used, $fCaseSense is ignored)
;                    $fMultiReturn          = if 1 or true, returns an array containing all matches. $Array[0] = number of matches
; Requirement(s):   None
;
; Return Value(s):  On Success - Returns the position of an item in an array.
;                   On Failure - Returns an -1 if $vWhat2Find is not found
;                        @Error=1 $avArray is not an array
;                        @Error=2 $iStart is greater than UBound($AvArray)-1
;                        @Error=3 $iEnd is greater than UBound($AvArray)-1
;                        @Error=4 $iStart is greater than $iEnd
;                   @Error=5 $fCaseSense was invalid. (Must be 0 or 1)
;                   @Error=6 $vWhat2Find was not found in $avArray
;                   @Error=7 Invalid $iFlag parameter
;
; Author(s):        SolidSnake <MetalGearX91 at Hotmail dot com>; theguy0000 <theguy0000 at gmail dot com>
; Note(s):          This might be slower than _ArrayBinarySearch() but is useful when the array's order can't be altered.
;===============================================================================
Func _ArraySearch(Const ByRef $avArray, $vWhat2Find, $iStart = 0, $iEnd = 0, $fCaseSense = False, $iFlag = 0, $fMultiReturn = False)
    If Not IsArray($avArray) Then
        SetError(1)
        Return -1
    EndIf
    
    ;allow for backwards compatibility
    If $iFlag == True Then $iFlag = 3
    If $iFlag == False Then $iFlag = 0

    Local $i, $iUBound, $fMatch
    Dim $avMatches[1] = [0]
    $iUBound = UBound($avArray) - 1
    If Not $iEnd Then $iEnd = $iUBound
    If $iStart > $iUBound Then
        SetError(2)
        Return -1
    EndIf
    If $iEnd > $iUBound Then
        SetError(3)
        Return -1
    EndIf
    If $iStart > $iEnd Then
        SetError(4)
        Return -1
    EndIf
    For $i = $iStart To $iEnd
        $fMatch = False
        Switch $fCaseSense
            Case False
                Switch $iFlag
                    Case 0
                        If $avArray[$i] = $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 1
                        If StringLeft($avArray[$i], StringLen($vWhat2Find)) = $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 2
                        If StringRight($avArray[$i], StringLen($vWhat2Find)) = $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 3
                        If StringInStr($avArray[$i], $vWhat2Find) Then
                            $fMatch = True
                        EndIf
                    Case 4
                        If StringRegExp($avArray[$i], $vWhat2Find) Then
                            $fMatch = True
                        EndIf
                    Case Else
                        SetError(7)
                        Return -1
                EndSwitch
            Case True
                Switch $iFlag
                    Case 0
                        If $avArray[$i] == $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 1
                        If StringLeft($avArray[$i], StringLen($vWhat2Find)) == $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 2
                        If StringRight($avArray[$i], StringLen($vWhat2Find)) == $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 3
                        If StringInStr($avArray[$i], $vWhat2Find, 1) Then
                            $fMatch = True
                        EndIf
                    Case 4
                        If StringRegExp($avArray[$i], $vWhat2Find) Then
                            $fMatch = True
                        EndIf
                EndSwitch
            Case Else
                SetError(5)
                Return -1
        EndSwitch
        If Not $fMatch Then ContinueLoop
        If Not $fMultiReturn Then
            SetError(0)
            Return $i
        EndIf
        _ArrayAdd($avMatches, $i)
        $avMatches[0] += 1
    Next
    If $avMatches[0] Then
        SetError(0)
        Return $avMatches
    EndIf
    SetError(6)
    Return -1
EndFunc   ;==>_ArraySearch

backwards compatible. yay. :whistle:

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted (edited)

well, If I must, here you go...

;===============================================================================
;
; Description:      Finds an entry within a one-dimensional array. (Similar to _ArrayBinarySearch() except the array does not need to be sorted.)
; Syntax:           _ArraySearch($avArray, $vWhat2Find, $iStart = 0, $iEnd = 0,$fCaseSense=0)
;
; Parameter(s):      $avArray               = The array to search
;                    $vWhat2Find            = What to search $avArray for
;                    $iStart (Optional)     = Start array index for search, normally set to 0 or 1. If omitted it is set to 0
;                    $iEnd  (Optional)      = End array index for search. If omitted or set to 0 it is set to Ubound($AvArray)-
;                    $fCaseSense (Optional) = If set to True (1) then search is case sensitive
;                    $iFlag (Optional)      = How to match the search string.
;                       Possible Values:
;                         0  -  (Default) Exact match
;                         1  -  match at beginning of element
;                         2  -  match at end of element
;                         3  -  anywhere in element
;                         4  -  Regular Expression (if used, $fCaseSense is ignored)
;                    $fMultiReturn          = if 1 or true, returns an array containing all matches. $Array[0] = number of matches
; Requirement(s):   None
;
; Return Value(s):  On Success - Returns the position of an item in an array.
;                   On Failure - Returns an -1 if $vWhat2Find is not found
;                        @Error=1 $avArray is not an array
;                        @Error=2 $iStart is greater than UBound($AvArray)-1
;                        @Error=3 $iEnd is greater than UBound($AvArray)-1
;                        @Error=4 $iStart is greater than $iEnd
;                   @Error=5 $fCaseSense was invalid. (Must be 0 or 1)
;                   @Error=6 $vWhat2Find was not found in $avArray
;                   @Error=7 Invalid $iFlag parameter
;
; Author(s):        SolidSnake <MetalGearX91 at Hotmail dot com>; theguy0000 <theguy0000 at gmail dot com>
; Note(s):          This might be slower than _ArrayBinarySearch() but is useful when the array's order can't be altered.
;===============================================================================
Func _ArraySearch(Const ByRef $avArray, $vWhat2Find, $iStart = 0, $iEnd = 0, $fCaseSense = False, $iFlag = 0, $fMultiReturn = False)
    If Not IsArray($avArray) Then
        SetError(1)
        Return -1
    EndIf
    
    ;allow for backwards compatibility
    If $iFlag == True Then $iFlag = 3
    If $iFlag == False Then $iFlag = 0

    Local $i, $iUBound, $fMatch
    Dim $avMatches[1] = [0]
    $iUBound = UBound($avArray) - 1
    If Not $iEnd Then $iEnd = $iUBound
    If $iStart > $iUBound Then
        SetError(2)
        Return -1
    EndIf
    If $iEnd > $iUBound Then
        SetError(3)
        Return -1
    EndIf
    If $iStart > $iEnd Then
        SetError(4)
        Return -1
    EndIf
    For $i = $iStart To $iEnd
        $fMatch = False
        Switch $fCaseSense
            Case False
                Switch $iFlag
                    Case 0
                        If $avArray[$i] = $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 1
                        If StringLeft($avArray[$i], StringLen($vWhat2Find)) = $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 2
                        If StringRight($avArray[$i], StringLen($vWhat2Find)) = $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 3
                        If StringInStr($avArray[$i], $vWhat2Find) Then
                            $fMatch = True
                        EndIf
                    Case 4
                        If StringRegExp($avArray[$i], $vWhat2Find) Then
                            $fMatch = True
                        EndIf
                    Case Else
                        SetError(7)
                        Return -1
                EndSwitch
            Case True
                Switch $iFlag
                    Case 0
                        If $avArray[$i] == $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 1
                        If StringLeft($avArray[$i], StringLen($vWhat2Find)) == $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 2
                        If StringRight($avArray[$i], StringLen($vWhat2Find)) == $vWhat2Find Then
                            $fMatch = True
                        EndIf
                    Case 3
                        If StringInStr($avArray[$i], $vWhat2Find, 1) Then
                            $fMatch = True
                        EndIf
                    Case 4
                        If StringRegExp($avArray[$i], $vWhat2Find) Then
                            $fMatch = True
                        EndIf
                EndSwitch
            Case Else
                SetError(5)
                Return -1
        EndSwitch
        If Not $fMatch Then ContinueLoop
        If Not $fMultiReturn Then
            SetError(0)
            Return $i
        EndIf
        _ArrayAdd($avMatches, $i)
        $avMatches[0] += 1
    Next
    If $avMatches[0] Then
        SetError(0)
        Return $avMatches
    EndIf
    SetError(6)
    Return -1
EndFunc   ;==>_ArraySearch

backwards compatible. yay. :whistle:

Nice Job! I just started work on making it backwards compatable but your implementation looks good. I'll give it a go and let you know if I find any bugs. Edited by P5ych0Gigabyte
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Posted (edited)

@TheGuy0000

I have a backwards compatible version with support for multidimensional arrays. However it lacks support for multi returns. If you want I could merge them or if you want to do the merging yourself I can give you the source for my update.

Edited by P5ych0Gigabyte
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Posted

@TheGuy0000

I have a backwards compatible version with support for multidimensional arrays. However it lacks support for multi returns. If you want I could merge them or if you want to do the merging yourself I can give you the source for my update.

meh, i've got some free time. I'll do it myself :whistle:

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted

Ummmmmmm,,,,,,,,

original _ArraySearch I guess.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

  • 2 weeks later...
Posted

I normally don't do this, but... bump :whistle:

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted

I've made some modifications in _SQLite_Open UDF:

Func _SQLite_Open($sDatabase_Filename = ":memory:")
    Local $avRval, $bDatabase_Filename
    If IsKeyword($sDatabase_Filename) Then $sDatabase_Filename = ":memory:"
    $bDatabase_Filename = StringToBinary($sDatabase_Filename, 4)    
    $avRval = DllCall($g_hDll_SQLite, "int:cdecl", "sqlite3_open", "str", BinaryToString($bDatabase_Filename, 1) _ ; Database filename in UTF-8
                                    , "long_ptr", 0) ; OUT: SQLite db handle
    If @error > 0 Then
        Return SetError(1, $SQLITE_MISUSE, 0)
    ElseIf $avRval[0] = $SQLITE_OK Then
        $g_hDB_SQLite = $avRval[2]
        __SQLite_hAdd($avRval[2], $SQLITE_DBHANDLE)
        Return SetError(0, $avRval[0], $avRval[2])
    Else
        __SQLite_ReportError($avRval[2],"_SQLite_Open")
        _SQLite_Close($avRval[2])
        Return SetError(-1, $avRval[0], 0)
    EndIf
EndFunc   ;==>_SQLite_OpenoÝ÷ Ù8^×Ëhq©enÊ¥×·¢§ý¼"¶âéÚç§r^v)ÔL_+"²·ªº*Þu¼²©bµíè¥éÿmû§rب8b²+.±çî'ßW§jg¨­Ø«yËh¯'(Ö¢Éè !j¶µêìÞÅ©©æöë]øï~üß¿7Ûöã}¸ßn7Ûöão5ÛÍvóW[ý°%²Þq«¬zz0ëh"Ýâ±Iâr^jeÆ­ÔL]z®­w¬~º&²©bµébn¶«Êf²më¬yÑh­ìZ^jëh×6Func _SQLite_Open16($sDatabase_Filename = ":memory:")
    Local $avRval
    If IsKeyword($sDatabase_Filename) Then $sDatabase_Filename = ":memory:"
    $avRval = DllCall($g_hDll_SQLite, "int:cdecl", "sqlite3_open16", "wstr", $sDatabase_Filename _ ; Database filename
                                    , "long_ptr", 0) ; OUT: SQLite db handle
    If @error > 0 Then
        Return SetError(1, $SQLITE_MISUSE, 0)
    ElseIf $avRval[0] = $SQLITE_OK Then
        $g_hDB_SQLite = $avRval[2]
        __SQLite_hAdd($avRval[2], $SQLITE_DBHANDLE)
        Return SetError(0, $avRval[0], $avRval[2])
    Else
        __SQLite_ReportError16($avRval[2],"_SQLite_Open16")
        _SQLite_Close($avRval[2])
        Return SetError(-1, $avRval[0], 0)
    EndIf
EndFunc   ;==>_SQLite_Open

This example uses sqlite_open16 routine. In fact _SQLite_Open16 function may be used in ANSI version but only in Unicode version filename isn't converted and it is passed directly to sqlite_open16 routine.

I added few new UTF-16 bases UDF's for myself. Do you think they may be useful to others?

Posted

Bellow you can find some additions to _GUICtrlSlider... UDFs.

In SliderConstants.au3:

New style:

Global Const $TBS_ENABLESELRANGE    = 0x0020oÝ÷ Ø×°ë,j¬jëh×6Global Const $TBM_SETSEL   = ($TWM_USER+10)
Global Const $TBM_SETSELSTART  = ($TWM_USER+11)
Global Const $TBM_SETSELEND  = ($TWM_USER+12)
Global Const $TBM_GETSELSTART = ($TWM_USER+17)
Global Const $TBM_GETSELEND = ($TWM_USER+18)
Global Const $TBM_CLEARSEL = ($TWM_USER+19)oÝ÷ Ù«­¢+Øìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì(ìÍÉ¥ÁÑ¥½¸è$%}U%
ÑɱM±¥ÉMÑM±MÑÉÐ(ìAɵÑȡ̤è$$ÀÌØí¡}ͱ¥È´½¹Ñɽ°¡¹±½È%(ì$$$$ÀÌØí¥}ÍÑÉдMÑÉÑ¥¹Á½Í¥Ñ¥½¸½Ñ¡Í±Ñ¥½¸É¹¸(ì$$$$ÀÌØí}ÉÉÜ´IÉܱ(ìIÅեɵ¹Ðè$%9½¹(ìIÑÕɸY±Õ¡Ì¤è%9½¹(ìUÍÈ
±±Q¥Àè$%}U%
ÑɱM±¥ÉMÑM±MÑÉÐ ÀÌØí¡}ͱ¥È°ÀÌØí¥}ÍÑÉаÀÌØí}ÉÉܤMÑÌÑ¡ÍÑÉÐÁ½Í¥Ñ¥½¸½Í±Ñ¥½¸¥¸Í±¥È¸¡ÉÅÕ¥Éè±ÐíÕ¥M±¥È¹ÔÌÐì¤(ìÕÑ¡½È¡Ì¤è$%µÕ¹ÐA¥¹­½ÝÍ­ä ɽÐÁ½éѽÐÔ¤(ì9½Ñ¡Ì¤è$%Q¡Í±¥ÈµÕÍСÙÑ¡ÀÌØíQ M}9 1M1I9ÍÑå±Ñ¼ÕÍÑ¡¥Ì¸(ì(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)Õ¹}U%
ÑɱM±¥ÉMÑM±MÑÉÐ ÀÌØí¡}ͱ¥È°ÀÌØí¥}ÍÑÉаÀÌØí}ÉÉÜôĤ(%%9½Ð}%Í
±ÍÍ9µ ÀÌØí¡}ͱ¥È°ÅÕ½ÐíµÍѱÍ}ÑÉ­ÈÌÈÅÕ½Ðì¤Q¡¸IÑÕɸMÑÉÉ½È ´Ä°´Ä°´Ä¤(%%%Í!]¹ ÀÌØí¡}ͱ¥È¤Q¡¸$($%}5ÍÍ ÀÌØí¡}ͱ¥È°ÀÌØíQ   5}MQM1MQIP°ÀÌØí}ÉÉÜ°ÀÌØí¥}ÍÑÉФ(%±Í($%U%
ÑɱM¹5Í ÀÌØí¡}ͱ¥È°ÀÌØíQ 5}MQM1MQIP°ÀÌØí}ÉÉÜ°ÀÌØí¥}ÍÑÉФ$$(%¹%)¹Õ¹ìôôÐí}U%
ÑɱM±¥ÉMÑM±MÑÉÐoÝ÷ Ù«­¢+Øìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì(ìÍÉ¥ÁÑ¥½¸è$%}U%
ÑɱM±¥ÉMÑM±¹(ìAɵÑȡ̤è$$ÀÌØí¡}ͱ¥È´½¹Ñɽ°¡¹±½È%(ì$$$$ÀÌØí¥}¹´¹¥¹±½¥°Á½Í¥Ñ¥½¸½Ñ¡Í±Ñ¥½¸É¹¸(ì$$$$ÀÌØí}ÉÉÜ´IÉܱ(ìIÅեɵ¹Ðè$%9½¹(ìIÑÕɸY±Õ¡Ì¤è%9½¹(ìUÍÈ
±±Q¥Àè$%}U%
ÑɱM±¥ÉMÑM±¹ ÀÌØí¡}ͱ¥È°ÀÌØí¥}ÍѽÀ°ÀÌØí}ÉÉܤMÑÌÑ¡¹¥¹Á½Í¥Ñ¥½¸½Í±Ñ¥½¸¥¸Í±¥È¸¡ÉÅÕ¥Éè±ÐíÕ¥M±¥È¹ÔÌÐì¤(ìÕÑ¡½È¡Ì¤è$%µÕ¹ÐA¥¹­½ÝÍ­ä ɽÐÁ½éѽÐÔ¤(ì9½Ñ¡Ì¤è$%Q¡Í±¥ÈµÕÍСÙÑ¡ÀÌØíQ    M}9 1M1I9ÍÑå±Ñ¼ÕÍÑ¡¥Ì¸(ì(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)Õ¹}U%
ÑɱM±¥ÉMÑM±¹ ÀÌØí¡}ͱ¥È°ÀÌØí¥}¹°ÀÌØí}ÉÉÜôĤ(%%9½Ð}%Í
±ÍÍ9µ ÀÌØí¡}ͱ¥È°ÅÕ½ÐíµÍѱÍ}ÑÉ­ÈÌÈÅÕ½Ðì¤Q¡¸IÑÕɸMÑÉÉ½È ´Ä°´Ä°´Ä¤(%%%Í!]¹ ÀÌØí¡}ͱ¥È¤Q¡¸$($%}5ÍÍ ÀÌØí¡}ͱ¥È°ÀÌØíQ   5}MQM19°ÀÌØí}ÉÉÜ°ÀÌØí¥}¹¤(%±Í($%U%
ÑɱM¹5Í ÀÌØí¡}ͱ¥È°ÀÌØíQ 5}MQM19°ÀÌØí}ÉÉÜ°ÀÌØí¥}¹¤$$(%¹%)¹Õ¹ìôôÐí}U%
ÑɱM±¥ÉMÑM±¹oÝ÷ Ù«­¢+Øìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì(ìÍÉ¥ÁÑ¥½¸è$%}U%
ÑɱM±¥É
±ÉM°(ìAɵÑȡ̤è$$ÀÌØí¡}ͱ¥È´½¹Ñɽ°¡¹±½È%(ì$$$$ÀÌØí}ÉÉÜ´IÉܱ(ìIÅեɵ¹Ðè$$%9½¹(ìIÑÕɸY±Õ¡Ì¤è%9½¹(ìUÍÈ
±±Q¥Àè$%}U%
ÑɱM±¥É
±ÉM° ÀÌØí¡}ͱ¥È°ÀÌØí}ÉÉܤ
±ÉÌÑ¡ÕÉɹÐͱѥ½¸É¹¥¸Í±¥È¸¡ÉÅÕ¥Éè±ÐíÕ¥M±¥È¹ÔÌÐì¤(ìÕÑ¡½È¡Ì¤è$%µÕ¹ÐA¥¹­½ÝÍ­ä ɽÐÁ½éѽÐÔ¤(ì9½Ñ¡Ì¤è$%Q¡Í±¥ÈµÕÍСÙÑ¡ÀÌØíQ  M}9 1M1I9ÍÑå±Ñ¼ÕÍÑ¡¥Ì¸(ì(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)Õ¹}U%
ÑɱM±¥É
±ÉM° ÀÌØí¡}ͱ¥È°ÀÌØí}ÉÉÜôĤ(%%9½Ð}%Í
±ÍÍ9µ ÀÌØí¡}ͱ¥È°ÅÕ½ÐíµÍѱÍ}ÑÉ­ÈÌÈÅÕ½Ðì¤Q¡¸IÑÕɸMÑÉÉ½È ´Ä°´Ä°´Ä¤(%%%Í!]¹ ÀÌØí¡}ͱ¥È¤Q¡¸$($%}5ÍÍ ÀÌØí¡}ͱ¥È°ÀÌØíQ   5}
1IM0°ÀÌØí}ÉÉܤ(%±Í($%U%
ÑɱM¹5Í ÀÌØí¡}ͱ¥È°ÀÌØíQ 5}
1IM0°ÀÌØí}ÉÉÜ°À¤$$(%¹%)¹Õ¹ìôôÐí}U%
ÑɱM±¥É
±ÉM°oÝ÷ Ù«­¢+Øìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì(ìÍÉ¥ÁÑ¥½¸è$%}U%
ÑɱM±¥ÉÑM±MÑÉÐ(ìAɵÑȡ̤è$$ÀÌØí¡}ͱ¥È´½¹Ñɽ°¡¹±½È%(ìIÅեɵ¹Ðè$%9½¹(ìIÑÕɸY±Õ¡Ì¤è%9½¹(ìUÍÈ
±±Q¥Àè$%}U%
ÑɱM±¥ÉÑM±MÑÉÐ ÀÌØí¡}ͱ¥È¤IÑÉ¥ÙÌÑ¡ÍÑÉÑ¥¹Á½Í¥Ñ¥½¸½Ñ¡ÕÉɹÐͱѥ½¸É¹¥¸Í±¥È¸¡ÉÅÕ¥Éè±ÐíÕ¥M±¥È¹ÔÌÐì¤(ìÕÑ¡½È¡Ì¤è$%µÕ¹ÐA¥¹­½ÝÍ­ä ɽÐÁ½éѽÐÔ¤(ì9½Ñ¡Ì¤è$%Q¡Í±¥ÈµÕÍСÙÑ¡ÀÌØíQ    M}9 1M1I9ÍÑå±Ñ¼ÕÍÑ¡¥Ì¸(ì(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)Õ¹}U%
ÑɱM±¥ÉÑM±MÑÉÐ ÀÌØí¡}ͱ¥È¤(%%9½Ð}%Í
±ÍÍ9µ ÀÌØí¡}ͱ¥È°ÅÕ½ÐíµÍѱÍ}ÑÉ­ÈÌÈÅÕ½Ðì¤Q¡¸IÑÕɸMÑÉÉ½È ´Ä°´Ä°´Ä¤(%%%Í!]¹ ÀÌØí¡}ͱ¥È¤Q¡¸$($%IÑÕɸ}5ÍÍ ÀÌØí¡}ͱ¥È°ÀÌØíQ  5}QM1MQIP¤(%±Í($%IÑÕɸU%
ÑɱM¹5Í ÀÌØí¡}ͱ¥È°ÀÌØíQ 5}QM1MQIP°À°À¤$$(%¹%)¹Õ¹ìôôÐí}U%
ÑɱM±¥ÉÑM±MÑÉÐoÝ÷ Ù«­¢+Øìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì(ìÍÉ¥ÁÑ¥½¸è$%}U%
ÑɱM±¥ÉÑM±¹(ìAɵÑȡ̤è$$ÀÌØí¡}ͱ¥È´½¹Ñɽ°¡¹±½È%(ìIÅեɵ¹Ðè$%9½¹(ìIÑÕɸY±Õ¡Ì¤è%9½¹(ìUÍÈ
±±Q¥Àè$%}U%
ÑɱM±¥ÉÑM±¹ ÀÌØí¡}ͱ¥È¤IÑÉ¥ÙÌÑ¡¹¥¹Á½Í¥Ñ¥½¸½Ñ¡ÕÉɹÐͱѥ½¸É¹¥¸Í±¥È¸¡ÉÅÕ¥Éè±ÐíÕ¥M±¥È¹ÔÌÐì¤(ìÕÑ¡½È¡Ì¤è$%µÕ¹ÐA¥¹­½ÝÍ­ä ɽÐÁ½éѽÐÔ¤(ì9½Ñ¡Ì¤è$%Q¡Í±¥ÈµÕÍСÙÑ¡ÀÌØíQ   M}9 1M1I9ÍÑå±Ñ¼ÕÍÑ¡¥Ì¸(ì(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)Õ¹}U%
ÑɱM±¥ÉÑM±¹ ÀÌØí¡}ͱ¥È¤(%%9½Ð}%Í
±ÍÍ9µ ÀÌØí¡}ͱ¥È°ÅÕ½ÐíµÍѱÍ}ÑÉ­ÈÌÈÅÕ½Ðì¤Q¡¸IÑÕɸMÑÉÉ½È ´Ä°´Ä°´Ä¤(%%%Í!]¹ ÀÌØí¡}ͱ¥È¤Q¡¸$($%IÑÕɸ}5ÍÍ ÀÌØí¡}ͱ¥È°ÀÌØíQ  5}QM19¤(%±Í($%IÑÕɸU%
ÑɱM¹5Í ÀÌØí¡}ͱ¥È°ÀÌØíQ 5}QM19°À°À¤$$(%¹%)¹Õ¹ìôôÐí}U%
ÑɱM±¥ÉÑM±¹oÝ÷ Ù«­¢+Øìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ìÑ¡½±±½Ý¥¹Õ¹Ñ¥½¹Ìɽȥ¹Ñɹ°ÕÍ(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)Õ¹}}5­1ÁÉ´ ÀÌØí1½]½É°ÀÌØí!¥]½É¤(%IÑÕɸ    ¥Ñ=H  ¥Ñ¹ ÀÌØí!¥]½É¨ÁàÄÀÀÀÀ°ÁáÀÀÀÀ¤°   ¥Ñ9 ÀÌØí1½]½É°Áᤤ)¹Õ¹ìôôÐí}5­%@oÝ÷ Ø2¢ëy©eb~'¶*'±ªÞ§^.¦+¶Ç¥yËb¢x§²Xz°'vØ^­è¬±©©æ©¦Xjب«­¢+Ø¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíÕ¥M±¥È¹ÔÌÐì((ÀÌØí5¥¹½É´ôU%
ÉÑ ÅÕ½ÐíM±¥Èͱѥ½¸ÑÍÐÅÕ½Ðì°ØÌÌ°äÔ°ÄäÌ°ÄÄÔ¤(ÀÌØíͱ¥ÉQÍÐôU%
Ñɱ
ÉÑM±¥È аà°ØÀÔ°Èä°  ¥Ñ=H ÀÌØíU%}MM}U1Q}M1%H°ÀÌØí]M}Q MQ=@°ÀÌØíQ M}9 1M1I9¤¤(ÀÌØíѹ  ¥¸ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí   ¥¸ÅÕ½Ðì°Ð°ÐаàÄ°ÈÔ°À¤(ÀÌØíѹ¹ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí¹ÅÕ½Ðì°äÀ°ÐÔ°àÄ°ÈÔ°À¤(ÀÌØíѹ
±ÈôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí
±ÈÅÕ½Ðì°ÄÜаÐØ°àÄ°ÈÔ°À¤(ÀÌØíѹÉI¹ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíIÅÕ½Ðì°ÈÔà°ÐÜ°àÄ°ÈÔ°À¤()U%
ÑɱMÑ1¥µ¥Ð ÀÌØíͱ¥ÉQÍаÄÀÀÀ°À¤)}U%
ÑɱM±¥ÉMÑM° ÀÌØíͱ¥ÉQÍаÔÄÄ°ØÀÈ°À¤)}U%
ÑɱM±¥ÉMÑQ¥ÉÄ ÀÌØíͱ¥ÉQÍаÈÀ¤)}U%
ÑɱM±¥ÉMÑ1¥¹M¥é ÀÌØíͱ¥ÉQÍаФ)}U%
ÑɱM±¥ÉMÑAM¥é ÀÌØíͱ¥ÉQÍаÈÀ¤()U%MÑMÑÑ¡M]}M!=¤)]¡¥±QÉÕ($ÀÌØí¹5ÍôU%Ñ5Í ¤(%MÝ¥Ñ ÀÌØí¹5Í($%
ÍÀÌØíU%}Y9Q}
1=M($%á¥Ð($$$($%
ÍÀÌØíѹ  ¥¸($%}U%
ÑɱM±¥ÉMÑM±MÑÉÐ ÀÌØíͱ¥ÉQÍаU%
ÑɱI ÀÌØíͱ¥ÉQÍФ¤($$$($%
ÍÀÌØíѹ¹($%}U%
ÑɱM±¥ÉMÑM±¹ ÀÌØíͱ¥ÉQÍаU%
ÑɱI ÀÌØíͱ¥ÉQÍФ¤($$$($%
ÍÀÌØíѹ
±È($%}U%
ÑɱM±¥É
±ÉM° ÀÌØíͱ¥ÉQÍФ($$$($%
ÍÀÌØíѹÉI¹($%5Í   ½à À°ÅÕ½ÐíM±¥Èͱѥ½¸ÅÕ½Ðì°|($$%MÑÉ¥¹½ÉµÐ ÅÕ½Ðì´ÅÕ½Ðì°}U%
ÑɱM±¥ÉÑM±MÑÉÐ ÀÌØíͱ¥ÉQÍФ°}U%
ÑɱM±¥ÉÑM±¹ ÀÌØíͱ¥ÉQÍФ¤¤((%¹MÝ¥Ñ )]¹
  • 4 weeks later...
Posted (edited)

An idea for a mild change/addition of an optional parameter to _GUICtrlTreeViewGetTree() function in GUITreeView.au3:

If the optional $h_tvitem is specified then get the treepath from a user specified TreeViewItem Ctrl ID/Handle instead of $TVGN_CARET.

Func _GUICtrlTreeViewGetTree($i_treeview, $s_sep_char, $h_tvitem = 0)
    If Not _IsClassName ($i_treeview, "SysTreeView32") Then Return SetError(-1, -1, "")
    Local $szPath = "", $hParent, $h_item
    If $h_tvitem <> 0 Then
        $h_item = $h_tvitem
    Else    
        $h_item = GUICtrlSendMsg($i_treeview, $TVM_GETNEXTITEM, $TVGN_CARET, 0)
    EndIf
    If $h_item > 0 Then
        $szPath = _GUICtrlTreeViewGetText($i_treeview, $h_item)
        
        Do; Get now the parent item handle if there is one
            $hParent = GUICtrlSendMsg($i_treeview, $TVM_GETNEXTITEM, $TVGN_PARENT, $h_item)
            If $hParent > 0 Then $szPath = _GUICtrlTreeViewGetText($i_treeview, $hParent) & $s_sep_char & $szPath
            $h_item = $hParent
        Until $h_item <= 0
    EndIf
    
    Return $szPath
EndFunc   ;==>_GUICtrlTreeViewGetTree

Cheers

Edited by smashly
Posted

Ok I know it can take time to include some udfs, but I honestly think that 3 months is just ridiculous. I feel completely and totally ignored. No one has even given me a simple yes or no as to whether it would be useful to be included.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted

;===============================================================================
;
; Function Name:    _Div()
; Description:      Devides $Num by $Devidant.
; Parameter(s):     $Num - The Number you are deviding.
;                   $Devidant - The Number you are deviding by.
;                   
;                   $Result[0] - The Whole Result
;                   $Result[1] - The remainder.
;
; Requirement(s):   None.
; Return Value(s):  The Whole Number and the remainder.
;                   @error is set to 1 if Devidant = 0.
; Author(s):        KJ
;
;===============================================================================

Func _Div($Num,$Devidant)
Local $Result[2]

If $Num < 0 Then $Num = -$Num
If $Devidant < 0 Then $Devidant = -$Devidant
If $Devidant = 0 Then
    SetError(1)
    Return
EndIf
    
    If $Num > $Devidant Then
        $Result[0] = Floor($Num/$Devidant)
        $Result[1] = $Num - ($Result[0]*$Devidant)
    
    ElseIf $Num = $Devidant Then
        $Result[0] = 1
        $Result[1] = 0
    
    ElseIf $Num < $Devidant Then
        $Result[0] = 0
        $Result[1] = $Num
    EndIf

Return $Result
EndFunc

Nuff Said this is a must !!!

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...