GithubHelp home page GithubHelp logo

mykeal-kenny / my-startup-script Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pukkandan/my-startup-script

0.0 1.0 0.0 357 KB

A collection of features I use, combined into one master script

License: GNU General Public License v3.0

AutoHotkey 100.00%

my-startup-script's Introduction

My Startup Script

  • ini
    Provides an easier and object-oriented way to use iniRead, iniWrite, and iniDelete.

  • Toast
    Provides a class for creating multiple customizable Toasts (not related to Toast Notifications), used to show various notifications. [Inspired by: Engunneer]

  • DelayedTimer
    Allows to create timers without activating them and then activate them all at once. Used to make sure timers don't interrupt the auto-execute section of the script. Also, due to the way it is implemented, it allows for complex expressions to be used as timers unlike setTimer.

    Usage
    delayedTimer.set("function1", 10000)
    ; code block 1
    delayedTimer.set("function2", 10000, True)
    ; code block 2
    delayedTimer.start()
    ; code block 3
    delayedTimer.firstRun()

    The first two lines define the timers function1() and function2() with 10s each, but don't start the timer yet. delayedTimer.start() tells it to start all the defined timers, and delayedTimer.firstRun() tells it to run all the functions whose third parameter is True (function2()) once, and then reset the list of timers. So, it is essentially the same as:

    ; code block 1
    ; code block 2
    setTimer, function1, 10000
    setTimer, function2, 10000
    ;code block 3
    function2()

    By default, setTimer allows you to use function objects, like this:

    object_name:=ObjBindMethod(class_name, function_name, arg_1, arg_2)
    ;or object_name:=Func("funcion_name").bind(arg_1, arg_2)
    setTimer, % object_name, 100

    However, it does not allow to use the object directly without defining it in a previous line, like setTimer, % ObjBindMethod(class_name, function_name, arg_1, arg_2), 100. However, delayedTimer() does allow you to use such objects directly. So, you can write delayedTimer(ObjBindMethod(class_name, function_name, arg_1, arg_2), 100).

  • GetSelectedText
    Gets the selected text without messing up the clipboard (much). This isn't a fool-proof method, but is the best way I could think of.

  • IsFullScreen
    Checks if a window is running in Full screen. Can also optionally detect "Windowed Borderless Mode"

  • IsOver

    • isOver_mouse: Checks if mouse is over a particular window.
    • isOver_coord: Checks if a window is over a specified global co-ordinates.
  • ReloadAsAdmin

    • reloadAsAdmin: Reloads the script with administrator permissions
    • reloadAsAdmin_Task: Reloads the script with administrator permissions using scheduled tasks. The advantage over the original method is that UAC prompt occurs only the first time the script is elevated. [Code by: SKAN]
  • ReloadScriptOnEdit
    Asks to reload the script when one of the specified file is edited (uses the Archive flag). [Inspired by: Avi Aryan]

  • ResourceIDOfIcon
    Gets the ResourceID of an icon from its Index No. [Code by: Lexikos]

  • Tooltip
    Provides customizable Tooltips.

    • Life: Tooltip is removed automatically after a certain period of time
    • Format: Allows changing of background/text font, color etc of the tooltips. This has been disabled temporarily till I can sort out some bugs. [Code by: Lexikos]
  • URI
    URI_Encode and URI_Decode functions. [Code by: GeekDude]

  • Download
    Creates asynchronous download request and saves the reply text in a variable. Unlike UrlDownladToFile, the script doesnot become unresponsive while the URL is downloading.[Code from: AHK Documentation]

  • PasteText
    Work in Progress

  • Master
    Calls all the other files. None of the other files are supposed to be run by themselves, and many times are interdependent with each other.

  • Directives
    Sets up various global settings for the script, as well as define the super-global variables SCR_Name and SCR_hwnd.

  • Tray
    Creates and updates the Tray Icon, Menu and Tip.

  • SuspendOnFS
    Suspends hotkeys in FullScreen.

  • WinProbe
    Similar functionality to Window Spy

  • TaskView
    Provides various functionality related to Windows 10 Virtual Desktops [Inspired by: Windows 10 Virtual Desktop Enhancer]

  • HotCorners
    Provides Hot Corner functionality.

  • WinSizer
    Resize/Move Windows. [Inspired by: NiftyWindows]

    Usage
    #if !getkeyState("Ctrl", "P")
    MButton::WinSizer.start()
    #if
    MButton Up::
    if WinSizer.end()
        return
    else
        send, {MButton}

    would enable you to use Middle Mouse Drag to resize/move windows, but only when Ctrl is not pressed. It will also send normal MButton when you don't drag. The window is divided into a 3x3 grid. If your mouse is in the middle cell, the window is moved. Otherwise, it is resized according to which cell the mouse is in.

  • UnwantedPopupBlocker

    • Blocks SublimeText's This is an unregistered copy popup
    • Blocks Chrome's Disable developer mode extensions popup
  • Transparent

    • Transparent_TaskbarGlass: Gives Glass effect to Taskbar [Code by: TaskBar SetAttr]
    • Transparent_Windows: Makes all windows defined in TransGroup (and not in noTransGroup) translucent.
    • Transparent_MaxBG: Makes Background Transparent when window is maximized.
  • PIP

  • ToggleKeys
    [Inspired by: CapShift]

    • CapsLockOffTimer: Automatically turns CapsLock off after a period of keyboard inactivity.
    • CaseMenu: Change the case of selected text.
  • MicroWindows
    Creates a live re-sizable PIP copy of a window [Inspired by: LiveWindows2]

  • WinAction

  • RunText

  • Internet
    Checks Internet Connectivity, IP Addresses (Public and Local IPs) and VPN access (You need to provide an IP group that identifies the VPN), and notifies when there is a change.

  • AutoUpdate
    Auto-updates AutoHotKey

  • KeyRemap
    Defines all the Hotkeys

my-startup-script's People

Contributors

pukkandan avatar

Watchers

James Cloos avatar

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.