GithubHelp home page GithubHelp logo

stuff-windows's People

Contributors

midenok avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

stuff-windows's Issues

Lost QuickLaunch toolbar

Taskbar toolbars are stored in:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop

Local Administrative Templates (ADMX) are in %systemroot%\PolicyDefinitions, they are plain XML and are read by gpedit.msc.

AutoHotkeys: switch EN, RU, JP

; This should be replaced by whatever your native language is. See 
; http://msdn.microsoft.com/en-us/library/dd318693%28v=vs.85%29.aspx
; for the language identifiers list.
ru := DllCall("LoadKeyboardLayout", "Str", "00000419", "Int", 1)
en := DllCall("LoadKeyboardLayout", "Str", "00000409", "Int", 1)
jp := DllCall("LoadKeyboardLayout", "Str", "00000411", "Int", 1)

switch_lang(from, to)
{
    w := DllCall("GetForegroundWindow")
    pid := DllCall("GetWindowThreadProcessId", "UInt", w, "Ptr", 0)
    l := DllCall("GetKeyboardLayout", "UInt", pid)
    if (l = from) 
    {
        PostMessage 0x50, 0, %to%,, A
    }
    else
    {
    	PostMessage 0x50, 0, %from%,, A
    }
}

^Shift::
    switch_lang(en, ru)
    state := 1
    return

!Shift::
    switch_lang(jp, ru)
    return

!CapsLock::
    PostMessage 0x50, 0, %jp%,, A
    return

!`::
    PostMessage 0x50, 0, %jp%,, A
    return

AutoHotkeys: spoof past date by F1

split_time(ts)
{
  RegexMatch(ts, "O)(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)", match)
  obj := Object()
  Loop, % match.Count
    obj[A_Index] := match[A_Index]
  return obj
}

set_time(year=1601, month=1, day=1, hour=0, minute=0, second=0, millisecond=0)
{
;Requires admin privileges to run
;SYSTEMTIME struct
;http://msdn.microsoft.com/en-us/library/windows/desktop/ms724950(v=vs.85).aspx
  VarSetCapacity(newtime, 16)
  ,Numput(year, newtime, 0, "short")  ;Year (1601-30827)
  ,Numput(month, newtime, 2, "short")  ;Month (1-12)
  ,Numput(0, newtime, 4, "short")  ;Day of week - ignored
  ,Numput(day, newtime, 6, "short")  ;Day (1-31)
  ,Numput(hour, newtime, 8, "ushort")  ;Hour (0-23)
  ,Numput(minute, newtime, 10, "short")  ;Minute (0-59)
  ,Numput(second, newtime, 12, "short")  ;Second (0-59)
  ,Numput(millisecond, newtime, 14, "short")  ;Millisecond (0-999)
  DllCall("SetLocalTime", "ptr", &newtime)
}

past := 0
F1::
    if (past > 0)
    {
        cur_time := split_time(A_Now)
        if (cur_time[3] != past_time[3])
        {
            saved_time += 1, Days
        }
        restored := split_time(saved_time)
        restored[4] := cur_time[4]
        restored[5] := cur_time[5]
        restored[6] := cur_time[6]
        set_time(restored*)
        past := 0
    }
    else
    {
        saved_time := A_Now
        past_time := split_time(saved_time)
        past_time[1] := 2016
        past_time[2] := 10
        past_time[3] := 14
        set_time(past_time*)
        past := 1
    }
    return

AutoHotkeys: short help

;;   Hotkey prefixes
;;   https://www.autohotkey.com/docs/Hotkeys.htm
;;   
;;   #	Win (Windows logo key).
;;   !	Alt
;;   ^	Control
;;   +	Shift
;;   &	An ampersand may be used between any two keys or mouse buttons to combine them into a custom hotkey.
;;   <	Use the left key of the pair. e.g. <!a is the same as !a except that only the left Alt key will trigger it.
;;   >	Use the right key of the pair.
;;   *	Wildcard: Fire the hotkey even if extra modifiers are being held down.  This
;;      is often used in conjunction with remapping keys or buttons.
;;   ~	When the hotkey fires, its key's native function will not be blocked (hidden
;;      from the system). In both of the  below examples, the user's click of the  mouse
;;      button will be sent to the active window:
;;   $	This is usually only necessary if  the script uses the Send command to  send
;;      the keys  that comprise  the hotkey  itself, which  might otherwise  cause it to
;;      trigger itself. The $  prefix forces the keyboard  hook to be used  to implement
;;      this hotkey, which as a side-effect prevents the nd command from triggering  it.
;;      The $  prefix is  equivalent to  having specified  #UseHook somewhere  above the
;;      definition of this hotkey.
;;   UP	The word UP may follow the name of a hotkey to cause the hotkey to fire upon
;;      release of  the key  rather than  when the  key is  pressed down.
;;
;;  Send hotkeys
;;  https://www.autohotkey.com/docs/commands/Send.htm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.