AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Functions Compilation [Download] Updated March 9 2006
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Sun Aug 21, 2005 12:15 pm    Post subject: Functions Compilation [Download] Updated March 9 2006 Reply with quote

http://www.autohotkey.net/~Invalid%20User/Functions.zip


A large compilation of functions can be downloaded at the above link. I believe it is the largest here at the forum. Thanks to the authors of these fine functions. Enjoy.

Expect to see more array functions soon.

Here is an index of the function names:
--ARRAYS--
ArrayAdd
ArrayCreate
ArrayMin
ArrayMax
ArraySwap
ArraySwapPos
ArraySet
ArrayToString

--COMMANDS--
ControlGet
ControlGetFocus
ControlGetText
DriveGet
DriveStaceFree
FileGetAttrib
FileGetSize
FileGetVersion
FileRead
FileReadLine
FileSelectFile
FileSelectFolder
FormatTime
GetKeyState
GuiControlGet
ImageSearch_X
ImageSearch_Y
IniRead
Input
InputBox
MouseGetPosCtrl
MouseGetPosWin
MouseGetPos_X
MouseGetPos_Y
PixelGetColor
PixelSearch_X
PixelSearch_Y
Random
RegRead
Run
SoundGet
SoundGetWaveVolume
StatusBarGetText
StatusBarControlSupport
---SB_Segments
---SB_Icon
---SB_Text
StringGetPos
StringLeft
StringLen
StringLower
StringMid
StringReplace
StringRight
StringTrimLeft
StringTrimRight
StringUpper
SysGet
Transform
WinGet
WinGetActiveTitle
WinGetClass
WinGetText
WinGetTitle

--Conversions/Transform--
Abs
Asc
Asc_2
BinToTxt
Chr
FormatDate
FormatYear
Hex
HexToString
HTML
RGBtoHex
StringToHex
TxtToBin

--Encryption/Hash--
RC4

--FileManagement--
IniKeyGet
IniKeyGet2
IniSectionGet

--List Manipulation--
ListAdd
ListCut
ListItem
ListKeep
ListLen
ListMerge
ListMove
ListPart
ListPos
ListReloc
ListReplace
ListRemove
ListSort
_Sort
ListSort_B
ListSplit
ListUniq

--Math--
Ceil
CommonFactor
Cos
DegToRad
DexToHex
Div
EvenOdd
ExtractInteger
ExtractInteger_A
Floor
GCD
GetRelPos
InsertInteger
InsertInteger_A
LCD
Max
Mean
Median
Min
MixNum
Mod
Mode
Pow
PriComp
RadToDeg
RandomUniqNum
Round
Sin
Sqrt

--Misc--
AhkStructLib
ControlGetHWND
CRC32
GetBattLife
LeapYear
MemGetStats
Scruct_Update
Scruct_Enum
Scruct_Mod
Scruct_New
ScructTest
ScructTest_Draw
Web
WinInView


--Screen--
DispChangeSettings
FindMatrix
GetMatrix

--String--
ExtractNum
StringDelete
StringFlip
StringGetChar
StringInsert
StringReplaceChar
SwapValues
_________________
my lame sig Smile


Last edited by Invalid User on Thu Mar 09, 2006 4:11 pm; edited 8 times in total
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Aug 21, 2005 1:19 pm    Post subject: Reply with quote

Thanks for gathering them all into one place.
Back to top
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sat Aug 27, 2005 3:58 pm    Post subject: Reply with quote

Hi,

it's not always good to use functions. I tried to check the performance with the following script:

Code:

setbatchlines, -1

time = %A_TickCount%
Loop, 200000
{
   Random, var1, 1, 100
   var1 := var1 * 100
}
time1 := A_TickCount - time

time = %A_TickCount%
Loop, 200000
{
   var1 := Random(1,100) * 100
}
time2 := A_TickCount - time

time = %A_TickCount%
Loop, 200000
{
   Random, var1, 1, 100
   var1 *= 100
}
time3 := A_TickCount - time

time = %A_TickCount%
Loop, 200000
{
   Random, var1, 1, 100
   EnvMult, var1, 100
}
time4 := A_TickCount - time

msgbox, direct: %time1% `nfunction: %time2% `nwithout expressions: %time3% `nwith EnvMult: %time4%

Return

Random(Min="", Max="")
{
   Random, OutputVar, % Min, % Max
   Return OutputVar
}


Interesting, that EnvMult is faster than *=
_________________
Tekl
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Aug 27, 2005 4:17 pm    Post subject: Reply with quote

Interesting benchmark. EnvMult is slightly faster than *= because the optimizer fails to remove the spaces around *=.

Therefore, you can slightly speed up *= by omitting the spaces:
var1*=100

I'll improve the optimizer so that it won't matter in the next version.
Back to top
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sat Aug 27, 2005 5:00 pm    Post subject: Reply with quote

Whoops, without the spaces *= is now faster than EnvMult Wink
_________________
Tekl
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Sep 03, 2005 7:09 pm    Post subject: Reply with quote

I thought for sure the difference in benchmarks was due to the spaces, but when I checked the code it seems that the spaces are already removed. Stranger still, I can no longer produce the difference in benchmark between EnvMult and *=. They're about the same now, even with older versions of AutoHotkey.

So I'm not sure what's going on; maybe it was a fluke. Do you still see var1 *= 100 being slower than EnvMult when you run the benchmark?
Back to top
View user's profile Send private message Send e-mail
corrupt



Joined: 29 Dec 2004
Posts: 2397

PostPosted: Sun Sep 04, 2005 4:15 pm    Post subject: Reply with quote

Quote:
Function Compilation [Download]


Looks great. Thanks Smile
Back to top
View user's profile Send private message Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5068
Location: imaginationland

PostPosted: Thu Jan 19, 2006 10:26 pm    Post subject: Re: Function Compilation [Download] Reply with quote

Invalid User wrote:
http://www.autohotkey.net/file/index.php?act=list&op=get&target=Funcs.zip

This is the wrong URL, please use the URL from the 'Open URL' link in the file manager. The reason I'm telling you this is because I got a few emails from various people telling me that they couldn't access the file.
Back to top
View user's profile Send private message Visit poster's website
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Fri Jan 20, 2006 6:15 am    Post subject: Reply with quote

the open link gave me a blank page everytime I used it, so I was never able to get a different url for it. How can I correct the problem?

...in addition, could you email me the user name and pw for the acct it was posted under? or..Feel free to post it here, I dont have anything to hide, and the pw is unique to that site(which is why I forgot it)
_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
twhyman



Joined: 07 Dec 2005
Posts: 218

PostPosted: Fri Jan 20, 2006 7:35 am    Post subject: Reply with quote

Hi,

i have an account on autohotkey.net and i can't download the file,

is there a way to post somewhere else?

thanks
Back to top
View user's profile Send private message
Thalon



Joined: 12 Jul 2005
Posts: 640

PostPosted: Fri Jan 20, 2006 9:12 am    Post subject: Reply with quote

I do not know how to access anything from others. Could someone give me a little tip? I do not see any option to do this.. Embarassed

Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Fri Jan 20, 2006 9:31 am    Post subject: Reply with quote

Yes you can, I have a a picture hosted here
http://autohotkey.net/file/users/Members/toralf/AHK_scripts/Auto_Syntax_Tidy/Auto-Syntax-Tidy_v7.jpg

The owner of the file can get the link from the "Open URL" link by copying the link into clipboard. (or following that link and copying the address from your browser address bar)
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
not-logged-in-daonlyfreez
Guest





PostPosted: Fri Jan 20, 2006 11:41 am    Post subject: Reply with quote

For your convenience, I put a mirror of the Funcs.zip up here (latest modified date is 21-08-2005, so I'm not sure if this is the latest version)
Back to top
Titan



Joined: 11 Aug 2004
Posts: 5068
Location: imaginationland

PostPosted: Fri Jan 20, 2006 12:04 pm    Post subject: Reply with quote

Invalid User wrote:
the open link gave me a blank page every time I used it, so I was never able to get a different url for it. How can I correct the problem?
It's supposed to give you a blank page beacause the zip is not a HTML formatted file that the browser can display. Right click on the 'Open URL' link and select 'Copy Link Location' (for Firefox) or 'Copy Shortcut' (for IE). toralf gave an example of how a URL should look like.

Thalon wrote:
I do not know how to access anything from others. Could someone give me a little tip? I do not see any option to do this..
You were able to download my XMLReader scripts Rolling Eyes
Try to disable your download managers or firewalls to see if they cause the problem. Also, try using a better browser.

twhyman wrote:
i have an account on autohotkey.net and i can't download the file
You do not need to have an account to download the file (like toralf kindly demonstrated). Invalid User needs to post the correct URL. I don't think I can go into his file manager account to retrieve it for him (all passwords are md5'd).
Back to top
View user's profile Send private message Visit poster's website
Thalon



Joined: 12 Jul 2005
Posts: 640

PostPosted: Fri Jan 20, 2006 12:19 pm    Post subject: Reply with quote

To access foreign data I have to have always a link, which is posted by the owner (or knowing it's exact position and writing the link by hand)?

Titan wrote:
You were able to download my XMLReader scripts Rolling Eyes
Try to disable your download managers or firewalls to see if they cause the problem. Also, try using a better browser.
In your case the script was directly shown in my browser (Mozilla Firefox Wink ) and not a file to download - that's maybe also a difference..

I downloaded it from daonlyfreez.net now..

Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group