Well here are some functions that I quickly made that allow people to use various tricks easier in AHK. I know some of these are incredibly simple but you'd be surprised by what people can't figure out on there own. Includes function and example:
Gmail Plus Trick:
Changes [example_email] into [example_email+randomnumber@gmail.com]
Function:
Example:Code:GPT(Email, Max, S){ global SequentialVar Random, N, 1, %Max% If(S=1){ SequentialVar++ N:= SequentialVar } Return Email "+" N "@gmail.com" }
Gmail Dot Trick:Code:EmailAddress:= "Iansemail" TrickedEmail:= GPT(EmailAddress) Send, %TrickedEmail%
Changes [example_email] into [e.xa.m.ple_e.ma.i.l@gmail.com]
Function:
Example:Code:GmailDotTrick(email) { IfNotInString, email, @gmail.com return "error" StringTrimRight, email, email, 10 Random, r, 0, % 2**(StrLen(Email)-1) VarSetCapacity(S,65,0) DllCall("msvcrt\_i64toa", Int64,r, Str,s, Int,2) Loop, Parse, Email { StringMid, l, s, %A_Index%, 1 if(l = 1) t.= a_loopfield "." else t.= a_loopfield } return t "@gmail.com" }
Order Number Trick:Code:Msgbox, % GmailDotTrick("testingemail@gmail.com")
Generates a random order number
Function:
Example:Code:ONT(Max, S){ global SequentialVar Random, N, 1, %Max% If(S=1){ SequentialVar++ N:= SequentialVar } Return "Order #" N } }
Letter Address Trick:Code:OrderNum:= ONT("1000") Send, %OrderNum%
Appends a random number to the end of an address
Changes 123 Bubblebee Rd. to 123C Bubblebee Rd.
Function:
Example:Code:LAT(Number, Street, Amount){ Loop, %Amount%{ Random, L, 97, 112 Number.= Chr(L) } Return Number Street }
Apartment Trick:Code:Num:= "123" St:= "BubbleBee Rd" TrickedAddress:= LAT(Num, St, 2)
Generates a random apartment number
Function:
Example:Code:AT(Max){ Random, N, 1, %Max% Return "Apt. #" N }
If your unsure of how to use functions: http://www.autohotkey.com/docs/Functions.htmCode:AptTrick:= AT("1000") Send, %AptTrick%
If you know a trick that I didn't cover then please PM me and I'll try and make a function for it
If you use these in your bot I would greatly appreciate it if you just thanked me in your thread


LinkBack URL
About LinkBacks
Reply With Quote


