InGame v2.0

Post gaming related scripts
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0

24 Feb 2014, 11:00

The Beginning from old forum https://autohotkey.com/board/topic/93246-ingame-scripts-howto/
This days I read careful changes in v1.1.14.03 and in v2.0 and my opinion moving to C like syntax is right way.
Now all next examples will be in v2.0 ONLY

Welcome - I will continue to evolve InGame post here - v2.0 coming from AHK v2.0 (still alpha but the future).

The first 2 things will be:
1.DD_ (my own small functions v2.0).
2.PS2 (PS2 functions that emulate keyboard and mouse sending v2.0).
(EDIT) Sorry, I made io.dll with
io_inp - inport
io_outp - outport
ps2_comm - ps2 command - keyboard
ps2_mouse - ps2 mouse - mouse
SO no PS2 functions :(
Last edited by _3D_ on 28 Jan 2016, 12:23, edited 3 times in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 (Small functions)

24 Feb 2014, 12:28

Code: [Select all] [Download] GeSHi © Codebox Plus

__(v, p:= 2, c:= "0") ;Adding srting (c) (p) times at the front of (v)
{ Loop p - StrLen(v)
v:= c v
return v
} ;===============================================

As you see - no so difference with 1.1.14 and L

Code: [Select all] [Download] GeSHi © Codebox Plus

;Usage:
__(2, 5, ".") ;....2
__(2, 5, "_") ;____2
__(2, 5) ;00002
Last edited by _3D_ on 09 May 2015, 00:14, edited 1 time in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 (Small functions)

24 Feb 2014, 12:36

Code: [Select all] [Download] GeSHi © Codebox Plus

;DD_ToolTip("Hide in 3000 ms", 3000)
;DD_ToolTip("Stay")
;DD_ToolTip() ;Hide
DD_ToolTip(text:= "", time:= 0) ;timedFunction
{ ToolTip % text
SetTimer, LABEL_DD_ToolTip,% time? -time:"Off" ;(-) run only once
return
LABEL_DD_ToolTip:
ToolTip
RETURN
} ;===============================================

LOL only : added
Usage at comments.
Last edited by _3D_ on 09 May 2015, 00:14, edited 2 times in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 (Small functions)

24 Feb 2014, 12:57

EDITED
Due to any command may be function Using user defined Sleep(arg) not usable.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


At last - used technic allows conditional execution of given code depend from user.
As I explain more algorithms used InGame running next style:
action
sleep
action
sleep
action
and in 99% of time script in sleep
Your code MUST be in try { ... } block and catch return after.
The code terminate current execution and return to caller.

If terminateRUN not exist and/or try/catch not used SleepThrow(tm) run as Sleep(tm) (except SleepThrow(0) that will run as nothing "NOP" and different from Sleep(0)).
Last edited by _3D_ on 09 May 2015, 00:15, edited 3 times in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 Concatenate Long Strings [SOLUTION]

24 Feb 2014, 18:10

I start converting Gdip v1.45 by tic (Tariq Porter) to AHKv2.0
Sorry if I don`t find HowTo concatenate strings but [SOLUTION].

In v2.0 not possible to use unquoted strings.

Code: [Select all] [Download] GeSHi © Codebox Plus

;v1.0/v1.1/L style
Var:=
(Ltim Join
First Line.
Second Line.
Third Line.
) ;Var is "First Line.Second Line.Third Line."
How this will be in v2.0 if no unquoted strings?

Code: [Select all] [Download] GeSHi © Codebox Plus

;v2.0 style
Var:= "" ;fake init
. "First Line." ;dot space string
. "Second Line."
. "Third Line." ;Var is "First Line.Second Line.Third Line."
It is useful when mcode
I try to post example from Gdip code converted to v2.0 but view good only in preview
NEXT CODE IS JUST EXAMPLE AND MCODE IS NOT REAL

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


NOW IMPORTANT:
1.If you start concatenate at next line use fake empty string ""
2.Next line start with dot space
3.Then string
4.Repeat 2-3 :P
Last edited by _3D_ on 09 May 2015, 00:17, edited 1 time in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 GDIP v1.45 AHK v2.0

26 Feb 2014, 19:27

The original Gdip v1.45 by tic http://www.autohotkey.net/~tic/Gdip.ahk
Gdip_All by Rseding91 http://www.autohotkey.net/~Rseding91/Gdip%20All/Gdip_All.ahk
and post http://www.autohotkey.com/board/topic/29449-gdi-standard-library-145-by-tic/

Due to I use 32bit and 64bit OSes I got Gdip_All.
There 3 cases:
1. 32 bit AHK over 32 bit OS (A_PtrSize = 4)
2. 32 bit AHK over 64 bit OS (A_PtrSize = 4)
3. 64 bit AHK over 64 bit OS (A_PtrSize = 8)

I correct usage of A_PtrSize to (A_PtrSize = 8)? "UPtr": "UInt" instead of A_PtrSize? "UPtr": "UInt"
Gdip_All_Corrected by _3D_ http://ahkscript.org/boards/download/file.php?mode=view&id=177
now the same script work perfect at any bit AHK type over any bit OS

In my first post I said that will post examples ONLY in AHKv2.0 me need and Gdip for AHK v2.0
Gdip_All_Corrected_AHKv2.0 by _3D_ http://ahkscript.org/boards/download/file.php?mode=view&id=178
Changes:
1. syntax for arguments
2. syntax for IF
3. syntax after StrSplit
4. rewrite after RegExMatch (it is new convention)

EDIT: I still testing Gdip_AHKv2.0 with "Ptr" instead of (A_PtrSize = 8)? "UPtr": "UInt"
Attachments
Gdip_v1.45[tic]_All[Rseding91][_3D_]_AHKv2.0.zip
(19.41 KiB) Downloaded 318 times
Gdip_v1.45[tic]_All[Rseding91][_3D_].zip
(19.12 KiB) Downloaded 313 times
Last edited by _3D_ on 14 Mar 2014, 15:01, edited 1 time in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 Gdip_AHKv2.0 DD_GetPixel

26 Feb 2014, 19:54

Next example used AHKv2.0
It is the same logic like http://www.autohotkey.com/board/topic/93246-ingame-scripts-howto/#entry589602

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Script void funny small semi transparent window with x:y global mouse position and RGB color at the position. Script not use PixelGetColor and "see" all colors that are visible ignoring A color attribute.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Less code same result.
Optimized drawing and CPU usage. There some color glitches due to trigonometrical rounding of angles.
Last edited by _3D_ on 09 May 2015, 00:19, edited 2 times in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 SOME REMARKS

03 Mar 2014, 17:48

1.SendMode
AHK_L Event: This is the starting default used by all scripts.
AHKv2.0 Input: This is the starting default used by all scripts.

Converting scripts from AHK_L to AHKv2.0 need SendMode Event else SetKeyDelay not worked.
It is important in game.

2.USE only 1 convention for commands and arguments
I think I will use only function convention - this way arguments always known what type is.
command(arg, arg, arg)
function(arg, arg, arg)
"string"

3.DllCall(..., "Cdecl [TYPE]")
IF DllCall not work or AHK v2.0 void strange messages that mention Cdecl
[Solution]
1. if function return value DllCall(... , "Cdecl [Type]") - add "Cdecl VALUEtype" like last extra argument
2. if function not return value DllCall(... , "Cdecl") - add just "Cdecl" like last extra argument
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 my little OCR

11 Mar 2014, 18:08

Games are fun and of course auctions in games are funniest :P
Now my little experience in fast buying.
What is OCR?
Optical Character Recognition or how to teach the computer to read.
Let first said that "computer" will read only digits 0..9 decimal notation. The digits (in my case) are equal sized and with equal spacing (gap between symbols).
Patterns
Digit : width= 5 x height= 7
gap : width= 1 x height= 7
coma: width= 1 x height= 7
Due to all digits equal I made small bitmaps with all 10 digits 0..9.
AHKv2.0

Code: [Select all] [Download] (ocrBWconverter.ahk)GeSHi © Codebox Plus

ocrBWConvert(ByRef bmp, color, varia:=0) ;convert bmp pattern to Black / White pattern 
{ Gdip_GetImageDimensions(bmp, w, h)
Loop h
{ y:=A_Index-1
Loop w
{ x:= A_Index-1
Gdip_SetPixel(bmp, x, y, PixelCompare(Gdip_GetPixel(bmp, x, y), color, varia)? 0xFFFFFFFF: 0xFF000000)
} }
return bmp
} ;===============================================
The code convert bmp pattern to black foreground with white symbol in next order:
1.Get pixel from bitmap
2.Compare pixel to given color with given variation
3.If pixel match pixel is set to white
4.Else pixel is set to black
AHKv2.0

Code: [Select all] [Download] (PixelCompare.ahk)GeSHi © Codebox Plus

PixelCompare(ARGB1, ARGB2, varia:=0) ;compare ARGB1 to ARGB2 with variation (0..255)
{ Gdip_FromARGB(ARGB1, A1, R1, G1, B1)
Gdip_FromARGB(ARGB2, A2, R2, G2, B2)
return (abs(R1-R2) <= varia) && (abs(G1-G2) <= varia) && (abs(B1-B2) <= varia)
} ;===============================================
A color attribute is ignored. 0= strong equal. 255= any match.
Now I have 0.bmp .. 9.bmp patters and ready to read and compare.

Code: [Select all] [Expand] [Download] (ocrGetDigit.ahk)GeSHi © Codebox Plus

function return 0..9 or "" if nothing is recognized.
If we search white digit: ocrGetDigit(bmpFromScreen, 0xFFFFFF, 50) ;50 is good variation
If we search red digit: ocrGetDigit(bmpFromScreen, 0xFF0000, 50)
If we search blue digit: ocrGetDigit(bmpFromScreen, 0x0000FF, 50)

And comparison - it is complicated but idea is the same like conversion If color match WHITE else BLACK.
AHKv2.0

Code: [Select all] [Download] (ocrBWCompare.ahk)GeSHi © Codebox Plus

ocrBWCompare(recog, given, color, varia:=0) ;compare bmp patterns reduce collors to Black / White
{ Gdip_GetImageDimensions(given, w, h)
Loop h
{ y:= A_Index-1
Loop w
{ x:= A_Index-1
if (Gdip_GetPixel(given, x, y) & 0xFFFFFF) != (PixelCompare(Gdip_GetPixel(recog, x, y), color, varia)? 0xFFFFFF: 0x000000)
return 0 ;fail
} }
return 1 ;success
} ;===============================================
At the end as the pattern is BLACK/WHITE and if color match/not match it is like comparing binary patterns (1=WHITE/0=BLACK) and in the same time quiet clean to be seen.

Further I will post how to concatenate recognized digits to value.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 my little OCR - from digit to volume

12 Mar 2014, 18:20

Now we have method to get single digit let make it difficult.

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

1,234,567,890 
[symbol]gap[symbol]
1 , 2 3 4 , 5 6 7 , 8 9 0
[5]1[2]1[5]1[5]1[5]1[2]1[5]1[5]1[5]1[2]1[5]1[5]1[5]
Let get this long (long int) line and convert it value.
I chose method LEFT TO RIGHT because there some trick that help me to check if recognition is complete.
The trick: Ill count how many "miss" will generate algorithm while going recognition and at the end Ill compare with the lenght of the value represent like string.

Code: [Select all] [Expand] [Download] (ocrLeftToRight.ahk)GeSHi © Codebox Plus

Here we have like result: buyItemPrice, len of buyItemPrice and mis.
As we start left to right any time if partial recognition we have great value instead right to left recognition. If right to left we don`t know is there really NO digit or partial recognition. My experience void next examples:

Code: [Select all] [Download] (Example_1.ahk)GeSHi © Codebox Plus

1,234,567,890 - left to right                   | right to left
1,234 - value== 1234 mis== 4 len== 4 | value== 1234 mis== 6 len== 4
1,234,567 - value== 1234567 mis== 7 len== 7 | value== 1234567 mis== 3 len== 7
If COMPLETE recognition there no any matter left to right or right to left will be the recognition. BUT if PARTIAL recognition (lag, some notes appeared, etc. over the patterns left to right will return great value (left most digits) but right to left will return low value (right most)). As we need low value (it is game "money") like price I chose left to right.

Code: [Select all] [Download] (Example_2.ahk)GeSHi © Codebox Plus

x xxx x67,890 - right to left =      67890 mis== 5 len== 5 - low price recognized
1,234,567,890 - real 1234567890 mis==10 len==10 - real
1 2xx xxx xxx - left to right = 1200000000 mis== 2 len==10 - high price recognized
If USER will buy at 500,000 left to right will return WAIT but right to left will return BUY.

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

If (len == mis) && (buyItemPrice <= buyUserPrice), " <<< BUY >>> "
I like this miss/length trick.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 Forced Type conversion

18 Mar 2014, 06:12

AHKv2.0
I have some troubles with data type stored in variables and made 3 simple functions that forced conversion of data type.
Type to String:

Code: [Select all] [Download] (__str.ahk)GeSHi © Codebox Plus

__str(ByRef arg) ;forced conversion to string 
{ return arg .= ""
} ;===============================================
Just adding empty string.

Type to Float:

Code: [Select all] [Download] (__flo.ahk)GeSHi © Codebox Plus

__flo(ByRef arg, defaultValue:=.0) ;forced conversion to float
{ return (Type(arg + .0) == "Float"? arg += .0: arg:= defaultValue + .0)
} ;===============================================
The same adding 0.0 float format. If default value is Integer defaultValue + .0 convert it to float.

Type to Integer:

Code: [Select all] [Download] (__int.ahk)GeSHi © Codebox Plus

__int(ByRef arg, defaultValue:=0) ;forced conversion to integer
{ try
{ Goto % "__int_" Type(arg + 0) ;switch
__int_Integer: ;case Integer
return arg += 0
__int_Float: ;case Float
return (arg:= round(arg))
}
catch ;default
return arg:= defaultValue ;if defaultValue Float or String you will get the same type.
} ;===============================================
Again adding 0 integer type.

Both functions __int() and __flo() have defaultValue if input data cant be converted to value.

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

Expresion: Type(arg + 0) return Integer/Float only if argument may be converted to value.
Type("10" + 0) => Integer and function return (integer)10
Type("h0" + 0) => String and function return (integer)defaultValue

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

Expresion: Type(arg + .0) return Float only if argument may be converted to value.
Type("10" + .0) => Float and function return (float)10
Type("10.1" + .0) => Float and function return (float)10
Type("h0" + .0) => String and function return (float)defaultValue
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 Switch() - conceptual model

19 Mar 2014, 14:32

Inspired from __int() function attempt to realize Switch.
AHKv2.0

Code: [Select all] [Expand] [Download] (Switch.ahk)GeSHi © Codebox Plus

Known Limitations:
1. Due to any Switch must be function (to encapsulate labels and to avoid label duplications) using 2 or more Switches in common scope void problems with common used variables (any Switch work with self variable scope).
Using global not so good if your code function oriented.
2. Due to labels are case insensitive switch is case insensitive too.

Known Extras:
1. Break - break loop block not whole switch
2. Throw - any case statement can continue to default
3. Return - break function
4. Continue - when loop, Parse \ loop, Read

This way we have 3 default statements:
1. after loop - for any "recognized" cases
2. catch - default for "UNrecognized" cases
3. after try (you may use finally the result is the same).

Conclusion:
Switch function have 4 logically separated sections
1. try inside loop
2. try after loop
3. catch {...}
4. after try \ finally {...}
If need to represent Switch\Case statement use any section ONCE and in rising order.
First time I like GOTO :P

Funny Switch example with continue <extra>.
AHKv2.0

Code: [Select all] [Expand] [Download] (Lights.ahk)GeSHi © Codebox Plus

Lights run 3 times and "unfortunately throw an exception" :roll: :roll: :roll:
Last edited by _3D_ on 20 Mar 2014, 01:24, edited 1 time in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 - Advanced Beep()

24 Mar 2014, 05:05

Inspired jNizM https://github.com/jNizM/AHK_DllCall_WinAPI/blob/master/src/Error%20Handling%20Functions/Beep.ahk
Advanced Beep no wait after last beep
AHKv2.0

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

beep(5, 500, 100, 100) ;usage
beep(loop:= 1, freq:= 770, dura:= 200, wait:= 200)
{ while loop-- ;if loop == 1 dont wait
{ DllCall("Kernel32.dll\Beep", "UInt", freq, "UInt", dura)
if loop, Sleep(wait) ;dont wait after last beep
} } ;=============================================
And another Advanced Beep version
AHKv2.0

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

loop 5
{ beep(5, 500, 100, 20) ;usage
beep(2, 600, 100, 20) ;usage
}
beep(loop:= 1, freq:= 770, dura:= 200, wait:= 200)
{ loop loop ;loop loop times :P
{ DllCall("Kernel32.dll\Beep", "UInt", freq, "UInt", dura)
if wait, Sleep(wait) ;if wait == 0 dont wait
} } ;=============================================
Funny small function thanks jNizM.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 Ticker

30 Mar 2014, 18:36

Actually this is the reason to use and learn AutoHotkey.
It is a script that control remote computer that run some actions in given interval of time.
Today I remake it to v2.0 and do "small" demo example.
AHKv2.0

Code: [Select all] [Expand] [Download] (Ticker.ahk)GeSHi © Codebox Plus

Unzip Gdip.ahk to Lib folder. (Gdip.ahk AHKv2.0_"Ptr" version tested only at x86).
Script will reload any 40 sec and do some funny things and show some messages and ToolTips.
You can edit / remake / change the time intervals till the script is in action and in next reload newly made changes will take effect (don`t forget to save script).
Attachments
Gdip.zip
(19.03 KiB) Downloaded 177 times
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

InGame v2.0 Remapping Fn Key or T41 (T$)T&$T$@...)

01 Apr 2014, 13:42

T$)T$!T$@ == T40T41T42 :lol:

I got an old IBM ThinkPad T41 and of course FIRST thing was to remap Fn and Ctrl (no in BIOS sollution).
For these that don`t know what I said: T41 NO WIN button and leftmost down button is Fn then Ctrl and Alt in right.
It is strange "solution" from IBM but they solved in newer models.

NOW Trust me I read all AHK forums and other "laity" posts including IBM and Microsoft coryphaeus and conclusions:

AHK and Windows remap Fn key but actually due to hardware dependence have some side effects:
1. Single pressing Fn run like single pressed Win (cool).
2. Fn and other key (for example R) don`t appear run and instead work like permanent WIN down :P

Some particulars:
Scan code:
0xE063 <<< hardware style
SC163:: <<< AHK / Win style

Whole day I remap / read / remap /read and the sollution:
I remap Capslock to Win , keep Fn Ctrl Alt order at last keyboard line. :P
http://www.howtogeek.com/howto/windows-vista/disable-caps-lock-key-in-windows-vista/ best explanation.
And best way to remap edit registry or KeyTweak http://www.softpedia.com/get/System/OS-Enhancements/KeyTweak.shtml sorry no home page :(

Sorry no source code but not needed :P HAK YAK AHK :P
(Edit)
Why Fn CANT be mapped to Win, Ctrl or Alt >>>
using this GREAT script by SKAN http://www.autohotkey.com/board/topic/21105-crazy-scripting-scriptlet-to-find-scancode-of-a-key/ I explore the how Fn button work.
1. Pressing Fn - nothing happen (unlike other modifier buttons (first problem))
2. After a while (time for autorepeat) keyboard return 0x0163
3. After a while (time for autorepeat) keyboard repeat return 0x4163 (0x4xxx mean repeat flag (button hold))
4. When release keyboard return 0xC163 (0xCxxx mean release flag (button up))

Except 2. Fn void like normal modifier key (Ctrl, Win, Alt, Shift).
NOW where is the problem?
When Pressed Fn button prevent other buttons to return there scan codes :( :( :( this "simple" detail is the reason to be unable to do replacement :( :( :( that mean Fn+<other key> is the same like just Fn :( :( :(
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

[FUNCTION] IsFileModified()

23 Apr 2014, 05:21

When in test mode or remote mode running script need to be Reloaded time to time when the source of the script changed.
Next small function can be used to determinate is script modified by previous check and force reload.

Code: [Select all] [Expand] [Download] (IsFileModified().ahk)GeSHi © Codebox Plus


This way If file (script) modified till running we can check and reload the new content in appropriate moment. The variable is translated byName to avoid mistakes inside other functions and needs of word global.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

PixelGetColor

04 May 2014, 07:45

As I see there are omission in DD_GetPixel that I post early and it cant "see" any colors.
The Fix + Add
AHKv2.0

Code: [Select all] [Expand] [Download] (DD_GetPixel.ahk)GeSHi © Codebox Plus

There added forced mouse pointer movement to absolute position

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

#P:: ;move mouse pointer to possition
m:= StrSplit(InputBox("Position(X Y)",,"W150 H100",mX " " mY), array(" ", ":", "|"))
MouseMove(m[1], m[2])
return
Possible syntax:
"X Y" - space separator
"X:Y" - semicolon separator
"X|Y" - | separator
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

Re: InGame v2.0

17 Jun 2014, 15:59

2014 Brazil script

The name of the game ?
Football.

Code: [Select all] [Download] (2014 Beer de Brazil.ahk)GeSHi © Codebox Plus

loop 
{ Get Beer
loop 2
{ Sing, The name of the game ?
Sing, Football.
}
loop 2
{ Sing, Oleee, Oleee, Oleee, Oleee.
Sing, We are the champs. We are the cmapions.
} }

Enjoy.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

WM_FUNCTIONS Arguments

08 Sep 2014, 14:53

SmallFuncion xyArg() for OnMessage:

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

OnMessage(0x200, "WM_MOUSEMOVE" )

WM_MOUSEMOVE(wp, y, ms, hd) ;second argument is wordY:wordX
{ xyArg(x, y)
ToolTip(x ":" y)
PostMessage, 0xA1, 2
} ;===============================================
xyArg(ByRef x, ByRef y) ;function separate Hi:Lo word of y to x:y
{ x:=mod(y, 65536), y//=65536
} ;=============================================== smallFunctions - event
This way xyArg(x, y) simply will return x and y coordinates of mouse pointer related to GUI of WM_MOUSEMOVE caller in "window mode" no mater what CoordMode, Mouse is set.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

Re: Simple WATCH DOG

04 Oct 2014, 04:31

This days I revised a script that play like a bot with a browser game (html and flash mixture).
There was a strange problem (time to time) flash player freeze and in result browser freezes too.
I have a strange feeling that Firefox not manage plugins correctly and change browser to Opera.
And freezings low down in times but still appears. Because this freezings appeared in unknown order I write a small WATCH DOG.

Code: [Select all] [Expand] [Download] (watchDOG.ahk)GeSHi © Codebox Plus

ENJOY!
AHKv2.0 use the future now.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 5 guests