InGame v2.0

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

NumpadDot-To-Dot

21 Jun 2017, 09:57

When multilingual keyboards in many cases need to remap NumpadDot to Dot.
For Example In Bulgarian keyboard layout NumpadDot is coded like , (coma) - it is STANDARD but all need . (dot) there.

There many programs that remap keys like KeyTweak and Sharp Keys but all works perfect only in US keyboard layout (and last Windows 10 ignored in other layouts).

Problems:
1. When totally remap NumpadDot (scan code) - we lose DEL functionality.
2. When remap NumpaDot to Dot - worked only in US layout.

Example that I find in internetrepresent problem 1 and 2.
In first I modify to that work perfect and with last Windows 10.

Of course there short codeIt remap button only when NUMPAD is active and work in nonUS keyboard layouts.
Tested on US, Bulgarian - BDS and Bulgarian - Phonetic.

Make NumpadDot-To-Dot.ahk

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

#SingleInstance, Force
;Copyright (c) D.Donchev

NumpadDot::.

Rename copy of AutohotkeyU64.exe (for 64Bit OS) or AutohotkeyU32.exe (for 32bit OS) to NumpadDot-To-Dot.exe
Put this 2 files together in some place and set Windows to start NumpadDot-To-Dot.exe at the begining.

So AHK the best choice ever!
Enjoy!
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

TypeOf(this)

27 Aug 2017, 07:27

AutoHotkey_2.0-a081-cad307c
Function TypeOf(this) edited ultra compact

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

typeOf(this) {
__type:= __name:= type(this)
if isObject(this) {
__type:= "Object"
try if this.__Class && __name != (__type := "Class")
throw
catch
return __type "|" __name
}
return __type
}
Examples: https://autohotkey.com/boards/viewtopic.php?p=167373#p167373
Last edited by _3D_ on 28 Aug 2017, 23:41, edited 1 time in total.
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

Gdip+ AutoHotkey_2.0-a081-cad307c

28 Aug 2017, 08:14

AutoHotkey_2.0-a081-cad307c
Correct syntax
    if expression, expression
    sysget
    sysget Monitor
    loop,
Attachments
Gdip-AHKv2.0-a081-cad307c.zip
(18.95 KiB) Downloaded 10 times
AHKv2.0 use the future now.
_3D_
Posts: 129
Joined: 29 Jan 2014, 14:40

DEREF back to AutoHotkey_2.0-a081-cad307c

01 Sep 2017, 00:19

AutoHotkey_2.0-a081-cad307c
Back deref to v2.0 - partial solution - next code replace variables with variables values.

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

__deref_Expression:= "" ; <<< expression string
__deref_LABEL: ; deref ---------------------------------- AutoHotkey_2.0-a081-cad307c
if RegExMatch(__deref_Expression, "i)[%][a-z_]\w*[%]", __deref_Variable) {
__deref_Expression:= RegExReplace(__deref_Expression
, "i)" __deref_Variable.Value
, %subStr(__deref_Variable.Value, 2, -1)% "")
goto __deref_LABEL
} ; ---------------------------------------------------------------------------------
This code work exactly as removed deref() function:
1. Code recognize only enclosed in %% names and replace with values ("%variable%")
2. Code must be stored at the place where variables must be deref. (Due to variable scope function impossible).
3. Code just replace variable names with there values - no EVALUATION.
4. Loop is implemented as LABEL \ goto LABEL to be visible A_Index and A_Loop... variables

EVALUATION by tidbit

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

dd_tidbitEval(expression) { ; 
obj:=ComObjCreate("HTMLfile") ;tidbit code -------------------------------------------
obj.write("<body><script>document.body.innerText=eval('" expression "');</script>") ;--
return obj.body.innerText
}
Functions not allowed (it is HTML evaluation). I can`t experiment with AutoHotkey.dll due to user defined functions limitation.
User can put functions values as variables in expression string and then evaluate.

Enjoy!
AHKv2.0 use the future now.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 5 guests