Code: Select all
^+!f::
{
Time := FormatTime(, "dd/MM/yy")
Send (Time "- To ₹ () {ShiftDown}{Enter}{ShiftUp} From ₹ ()")
Return
}
This is the entire script
Code: Select all
#SingleInstance
SendMode "Input"
SetWorkingDir A_ScriptDir
#Include "Cursor Schemes v2.ahk"
CoordMode "Mouse","Screen"
SetTitleMatchMode 2
GroupAdd "xyzf", "ahk_class AutoHotkeyGUI"
GroupAdd "xyzf", "BlankScr.ahk"
global m := 1
mvmouse(m)
OutputDebug cMod(m,2)
global scrbrt := GetBrightness()
global scrbrt2 := GetBrightness()
#+!s::Suspend
#^!+s::SoundBeep
#!+e::Edit
#!+r::Reload
^F10::SetNumLockState !GetKeyState("NumLock", "T")
#!+q::Run "C:\Program Files\AutoHotkey\WindowSpy.ahk"
#!+f::Run "C:\Program Files (x86)\Everything\Everything.exe"
#^!c::SystemCursor("Toggle")
#!+c::MouseMove 683, 359
^!+w::Send "web.archive.org/web/*/"
;!+6::MouseMove 840,480
>+^a::Send "awesome"
>+Up::MouseMove 0, -1, 0, "R"
>+Down::MouseMove 0, 1, 0, "R"
>+Left::MouseMove -1, 0, 0, "R"
>+Right::MouseMove 1, 0, 0, "R"
^F1::SetDefaultKeyboardLang(0x4009) ; english
^F2::SetDefaultKeyboardLang(0x0408) ; greek
^F3::SetDefaultKeyboardLang(0x0411) ; japanese
^F4::SetDefaultKeyboardLang(0x0419) ; russian
^F5::SetDefaultKeyboardLang(0x10409) ; dvorak
+F1::SetInputLang(0x4009)
+F2::SetInputLang(0x0408)
+F3::SetInputLang(0x0411)
+F4::SetInputLang(0x0419)
+F5::SetInputLang(0x10409) ; dvorak
#c::Run "Calc.exe"
#!k::Run "C:\Program Files\Katana\Katana.exe"
^!b::Run "C:\Program Files\Bingo\Bingo.exe"
#^!g::Run "C:\Users\Redacted\Desktop\Gma.ahk"
#!+m::MsgBox m, "", "T3"
#+!d::Run "C:\Users\Redacted\Desktop\Doad.ahk"
#+!b::Run "C:\Users\Redacted\Desktop\BlankScr.ahk"
#+g::Run "C:\Users\Redacted\Downloads\Music.mov"
#^!s::SendMessage 0x0112, 0xF140, 0,, "Program Manager"
^+!f::
{
Time := FormatTime(, "dd/MM/yy")
Send (Time "- To ₹ () {ShiftDown}{Enter}{ShiftUp} From ₹ ()")
Return
}
^!+i::
{
ChangeCursorScheme("Windows Inverted")
SoundBeep
Return
}
#!+w::
{
MsgBox WinGetProcessPath("A")
Return
}
^+s::
{
Loop 10
Click
Return
}
>+`::
{
title := WinGetTitle("A")
WinGetPos &x, &y, &wid, &hei, title
MsgBox "WinHeight := " hei ", WinWidth := " wid
Return
}
!^9::
{
global m += 1
mvmouse(m)
OutputDebug "m := " m
Return
}
^F12::
{
Run "C:\Users\Redacted\Desktop\BlankScr.ahk"
SystemCursor("Hide")
scrbrt := GetBrightness()
SoundBeep
mvmouse(0)
SetBrightness(0)
WinWaitActive("ahk_group xyzf")
SoundBeep
WinWaitNotActive("ahk_group xyzf")
SoundBeep
mvmouse(m)
SystemCursor("Show")
SetBrightness(scrbrt)
}
!,::
{
AdjustScreenBrightness(-10)
Sleep 100
scrbrt2 := GetBrightness()
OutputDebug "Current Screen Brightness in `% is " scrbrt2
Return
}
!.::
{
AdjustScreenBrightness(10)
Sleep 100
scrbrt2 := GetBrightness()
OutputDebug "Current Screen Brightness in `% is " scrbrt2
Return
}
^+x::
{
OutputDebug A_AhkVersion
}
GetBrightness()
{
Return ComObjGet("winmgmts:\root\WMI").InstancesOf("WmiMonitorBrightness WHERE Active=TRUE").ItemIndex(0).CurrentBrightness
}
SetBrightness(val)
{
service := "winmgmts:{impersonationLevel=impersonate}!\\.\root\WMI"
monitors := ComObjGet(service).ExecQuery("SELECT * FROM WmiMonitorBrightness WHERE Active=TRUE")
monMethods := ComObjGet(service).ExecQuery("SELECT * FROM wmiMonitorBrightNessMethods WHERE Active=TRUE")
minBrightness := 0 ; level below this is identical to this
if (val < minBrightness) ; parenthesis is necessary here
val := minBrightness
toSet := val
if (toSet > 100)
Return
if (toSet < minBrightness)
toSet := minBrightness
for i in monMethods {
i.WmiSetBrightness(1, toSet)
break
}
}
AdjustScreenBrightness(step)
{
service := "winmgmts:{impersonationLevel=impersonate}!\\.\root\WMI"
monitors := ComObjGet(service).ExecQuery("SELECT * FROM WmiMonitorBrightness WHERE Active=TRUE")
monMethods := ComObjGet(service).ExecQuery("SELECT * FROM wmiMonitorBrightNessMethods WHERE Active=TRUE")
minBrightness := 5 ; level below this is identical to this
for i in monitors {
curt := i.CurrentBrightness
break
}
if (curt < minBrightness) ; parenthesis is necessary here
curt := minBrightness
toSet := curt + step
if (toSet > 100)
Return
if (toSet < minBrightness)
toSet := minBrightness
for i in monMethods {
i.WmiSetBrightness(1, toSet)
break
}
}
SystemCursor(cmd) ; cmd = "Show|Hide|Toggle|Reload"
{
static visible := true, c := []
static sys_cursors := [32512, 32513, 32514, 32515, 32516, 32642
, 32643, 32644, 32645, 32646, 32648, 32649, 32650]
if (cmd = "Reload" or !c.Count) ; Reload when requested or at first call.
{
for i, id in sys_cursors
{
h_cursor := DllCall("LoadCursor", "Ptr", 0, "Ptr", id)
h_default := DllCall("CopyImage", "Ptr", h_cursor, "UInt", 2
, "Int", 0, "Int", 0, "UInt", 0)
h_blank := DllCall("CreateCursor", "Ptr", 0, "Int", 0, "Int", 0
, "Int", 32, "Int", 32
, "Ptr", Buffer(32*4, 0xFF)
, "Ptr", Buffer(32*4, 0))
c[id] := {default: h_default, blank: h_blank}
}
}
switch cmd
{
case "Show": visible := true
case "Hide": visible := false
case "Toggle": visible := !visible
default: return
}
for id, handles in c
{
h_cursor := DllCall("CopyImage"
, "Ptr", visible ? handles.default : handles.blank
, "UInt", 2, "Int", 0, "Int", 0, "UInt", 0)
DllCall("SetSystemCursor", "Ptr", h_cursor, "UInt", id)
}
}
mvmouse(val)
{
valm := mod(val, 2)
if(valm = 0)
{
SetTimer MoveMouse, 250
OutputDebug "Switched on"
}
Else
{
SetTimer MoveMouse, 0
OutputDebug "Switched off"
}
Return
}
SetDefaultKeyboardLang(LocaleID)
{
Static SPI_SETDEFAULTINPUTLANG := 0x005A, SPIF_SENDWININICHANGE := 2
Lan := DllCall("LoadKeyboardLayout", "Str", Format("{:08x}", LocaleID), "Int", 0)
binaryLocaleID := "Buffer(4, 0)"
NumPut("UPtr",LocaleID, binaryLocaleID)
DllCall("SystemParametersInfo", "UInt", SPI_SETDEFAULTINPUTLANG, "UInt", 0, "UPtr", binaryLocaleID, "UInt", SPIF_SENDWININICHANGE)
owindows := WinGetList(,,,)
Loop owindows.Length
PostMessage 0x50, 0, % Lan, , % "ahk_id " windows%A_Index%
}
SetInputLang(Lang)
{
WinExist("A")
CtrlInFocus := ControlGetFocus()
PostMessage(0x50, 0, Lang, CtrlInFocus)
}
cMod(dividend, divisor)
{
if(divisor > 0)
{
if(dividend > 0)
{
while(dividend >= divisor)
dividend -= divisor
Return dividend
}
else if(dividend < 0)
{
while (dividend < 0)
dividend += divisor
Return dividend
}
else
{
Return
}
}
else if(divisor < 0)
{
if(dividend > 0)
{
Return -cMod(-dividend, -divisor)
}
else if(dividend < 0)
{
Return cMod(-dividend, -divisor)
}
else
{
Return
}
}
else
Return
}
MoveMouse()
{
If ( A_TimeIdle > 1000 && A_TimeIdle < 60001)
{
MouseMove(1, 0,, "R")
MouseMove(-1, 0,, "R")
time := FormatTime(,"HH:mm:ss")
OutputDebug "Moved at time " time
}
return
}