erezlevi Posted February 6, 2008 Share Posted February 6, 2008 hi, enhancement for Arrays request: _ArrayTrimdown - will remove all Array element from the bottom up x times. _ArrayTrimup - will remove all Array element from the bottom down x times. _ArrayTrimBetween - will remove all Array element from x to y (iElement position). can it be done? Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 hi,enhancement for Arrays request:_ArrayTrimdown - will remove all Array element from the bottom up x times._ArrayTrimup - will remove all Array element from the bottom down x times._ArrayTrimBetween - will remove all Array element from x to y (iElement position).can it be done?Hi,you can do it with udfs. Will that be enough for you?Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
erezlevi Posted February 6, 2008 Author Share Posted February 6, 2008 Hi,you can do it with udfs. Will that be enough for you?MegaI am around here for 3 month and keep hearing the work UDF, can someone explain what this does and where to find it? Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 I am around here for 3 month and keep hearing the work UDF, can someone explain what this does and where to find it?UDF = user defined function. E.g. a function written by yourself Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 Here is something to start with expandcollapse popup#include<Array.au3> #cs _ArrayTrimdown - will remove all Array element from the bottom up x times. _ArrayTrimup - will remove all Array element from the bottom down x times. _ArrayTrimBetween - will remove all Array element from x to y (iElement position). #ce Global $array[10] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], $re $re = _ArrayTrimdown($array, 3) _ArrayDisplay($re, '_ArrayTrimdown') $re = _ArrayTrimup($array, 5) _ArrayDisplay($re, '_ArrayTrimup') $re = _ArrayTrimBetween($array, 2, 5) _ArrayDisplay($re, '_ArrayTrimBetween') Func _ArrayTrimdown(ByRef $array, $count) Local $new_A[UBound($array) - $count] For $i = 0 To UBound($new_A) - 1 $new_A[$i] = $array[$i] Next Return $new_A EndFunc ;==>_ArrayTrimdown Func _ArrayTrimup(ByRef $array, $count) Local $new_A[UBound($array) - $count] For $i = $count To UBound($array) - 1 $new_A[$i - $count] = $array[$i] Next Return $new_A EndFunc ;==>_ArrayTrimup Func _ArrayTrimBetween(ByRef $array, $start, $end) Local $new_A[UBound($array)] Local $y = 0 For $i = 0 To UBound($new_A) - 1 If Not ($i >= $start And $i <= $end) Then $new_A[$y] = $array[$i] $y += 1 EndIf Next ReDim $new_A[UBound($new_A) - 1 + $start - $end] Return $new_A EndFunc ;==>_ArrayTrimBetween Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
erezlevi Posted February 6, 2008 Author Share Posted February 6, 2008 yes, I did that exactly, but I was thinking more on a commnad that does it in AutoIT base code. Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 (edited) yes, I did that exactly, but I was thinking more on a commnad that does it in AutoIT base code.Then the devs should answer but I suppose IF .. IF they really answer then it is to 99,9 % NO!!! Edited February 6, 2008 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Developers Jos Posted February 6, 2008 Developers Share Posted February 6, 2008 (edited) .......but I suppose IF .. IF they really answer then it is to 99,9 % NO!!!Meaning WHAT ? (trying to leave room for a positive twist here) Edited February 6, 2008 by Jos 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. Link to comment Share on other sites More sharing options...
weaponx Posted February 6, 2008 Share Posted February 6, 2008 Then the devs should answer but I suppose IF .. IF they really answer then it is to 99,9 % NO!!!So 11,043.45 of Jos' 11,155 posts were just saying NO! 111.55 YES! Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 So 11,043.45 of Jos' 11,155 posts were just saying NO! 111.55 YES!True, isn't it Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Developers Jos Posted February 6, 2008 Developers Share Posted February 6, 2008 Don't think I was joking since it could be I kinda fed up with these snide remarks. 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. Link to comment Share on other sites More sharing options...
ame1011 Posted February 6, 2008 Share Posted February 6, 2008 Just add those functions to the end of the _Array.au3 file, then you could use them like "AutoIT base code" (even though _Array.au3 isn't "AutoIT base code" to begin with) [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 Don't think I was joking since it could be I kinda fed up with these snide remarks. what did I wrong this time? He asked for an addition to array.au3 and all I wanted to point out was, if a developer jumps into this thread and answers the questions whether this addition is possible (which you must admit is not guaranteed) then the answer would be 99,9 % No, we won't add this functions.??? Was that totally wrong? Why shooting at me? Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
GaryFrost Posted February 6, 2008 Share Posted February 6, 2008 Just add those functions to the end of the _Array.au3 file, then you could use them like "AutoIT base code" (even though _Array.au3 isn't "AutoIT base code" to begin with)Don't add them to the Array.au3 file, next time you upgrade the version you'll lose your additions.Just make your own file put them in and include that file. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ame1011 Posted February 6, 2008 Share Posted February 6, 2008 Yeah I do that personally but I figured he wanted everything in that one file. [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
Developers Jos Posted February 6, 2008 Developers Share Posted February 6, 2008 (edited) what did I wrong this time? He asked for an addition to array.au3 and all I wanted to point out was, if a developer jumps into this thread and answers the questions whether this addition is possible (which you must admit is not guaranteed) then the answer would be 99,9 % No, we won't add this functions.??? Was that totally wrong? Why shooting at me? MegaLets blame it on our way of interpeting English ..... and yes there is a FAT chance that you won't get a reply when posting in the Support forum.All proposal in Trac will get a reply and Yes it will be often No for obvious reasons ... Edited February 6, 2008 by Jos 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. Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 6, 2008 Share Posted February 6, 2008 Lets blame it on our way of interpeting English ..... and yes there is a FAT chance that you won't get a reply when posting in the Support forum.All proposal in Trac will get a reply and Yes it will be often No for obvious reasons ...Okay, fine. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
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