Skip to content

Instantly share code, notes, and snippets.

View aviaryan's full-sized avatar
:electron:
Working

Avi Aryan aviaryan

:electron:
Working
View GitHub Profile
@aviaryan
aviaryan / clipjump-publicapi-example.ahk
Last active August 29, 2015 14:26
Clipjump publicAPI example
SetWorkingDir, % A_ScriptDir
cj := new Clipjump()
cj.blockMonitoring(1)
msgbox % cj.version
Clipboard := "changes"
Clipboard := "morechanges"
msgbox % "Clipboard has " Clipboard ". But Clipjump has ? "
cj.blockMonitoring(0)
@aviaryan
aviaryan / DiamondNegative.java
Created September 15, 2015 10:39
Diamond shape generator Java
package class1;
public class DiamondNegative {
public static void main(String [] args){
int sz = 11;
int i,j,k,l,r;
for (i=0; i<sz; i++) System.out.print("* ");
System.out.println();
for (i=0; i<sz-2; i++){
k = 2*i+1;
@aviaryan
aviaryan / clipjump-disable-externally.ahk
Created November 3, 2015 09:56
External script to disable clipjump
SetWorkingDir, % A_ScriptDir
cj := new Clipjump()
cj.runLabel("disable_clipjump") ; toggles clipjump disable status
ExitApp
#include S:\Portables\AutoHotkey\My Scripts\ClipStep\publicAPI.ahk
; I should rather create an API function for this..
@aviaryan
aviaryan / Sublime Text Autocomplete Adder.ahk
Last active December 15, 2015 21:19
Sublime-Text Autocompletions Adder - Add auto-completions (auto-completes) to Sublime Text fastly. Comes with Duplicate-checker and backup facility.
; INSTRUCTIONS ##########################################
;Sublime-Text Autocomplete Adder
;By Avi Aryan
;
;Place in it in directory of Sublime-Text.exe
;Tested with Sublime-Text 2
;Absolutely No guarranty
;Make sure to create a backup before going
;Dont worry about Duplicates, they will not be added again.
;########################################################
@aviaryan
aviaryan / Mouse De-accelerator.ahk
Last active December 15, 2015 21:29
Decrease speed of Mouse Cursor via Autohotkey script
;By Avi Aryan
;Set that 4 [line 8] to lower if you want finer results.
#Persistent
CoordMode,Mouse
SetBatchLines, -1
SetMouseDelay, -1
SetTimer,mouseslow,4
mouseslow:
@aviaryan
aviaryan / Delimeter Replacement.ahk
Created April 8, 2013 06:47
Replace variables denoted by delimiters in Notepad
/*
Program Author = Avi Aryan
USAGE::
Run the Script
Open your text file with all variables in NOTEPAD..By Notepad , i mean Notepad
Hit Ctrl+Alt+F to start.
When First Match is found,Change the text to required text and then hit F6 . Spaces will be automatic.
...
@aviaryan
aviaryan / Random Number Generate.ahk
Created April 9, 2013 12:32
Generate Random numbers based on user input
;Random Number Generate
;Avi
MsgBox, 36, Choose, Yes for A`, No for B
IfMsgBox yes
{
loop,
{
StringRight,rightest,a_tickcount,1
if rightest in 1,2,3,4,5
{
@aviaryan
aviaryan / sublimetextshortcuts.txt
Created April 22, 2013 12:09
My Useful Sublime Text Shortcuts
Sublime Text 2 Shortcuts
=======================
The List is not complete.
It's just the shortcuts I know and I find useful
=================================================
WINDOWS
=================================================
Ctrl + Click - Add Multiple Cursors
@aviaryan
aviaryan / SublimeTextAutoCompleteAdderUniversalEdition.ahk
Last active December 16, 2015 13:38
Sublime Text AutoComplete Adder Universal Edition - Easily add Auto-completes in Subime - Text
; INSTRUCTIONS ##########################################
;Sublime-Text Autocomplete Adder
;By Avi Aryan
;
;Tested with Sublime-Text 2
;Absolutely No guaranty
;Make sure to create a backup before going
;Don't worry about Duplicates, they will not be added again.
;########################################################
;Write your completes in listed form, one auto-complete in a line.
@aviaryan
aviaryan / HParse-Test-Script.ahk
Last active December 16, 2015 18:19
HParse Test Script - HParse is a function to extract Autohotkey hotkeys from User's shortcuts
;The Speeling Errors are done intentionally to show how HParse() manages them.
msgbox % Hparse("Cntrol + ass + S", false) ;returns {blank} As 'ass' is out of scope and RemoveInvaild := false
msgbox % Hparse("Contrl + At + S") ;returns ^!s
msgbox % Hparse("^!s") ;returns ^!s as the function-feed is already in Autohotkey format.
msgbox % Hparse("LeftContrl + X") ;returns Lcontrol & X
msgbox % Hparse("Contrl + Pageup + S") ;returns {blank} As the hotkey is invalid
msgbox % HParse("PagUp + Ctrl", true) ;returns ^PgUp as ManageOrder is true (by default)
msgbox % HParse("PagUp + Ctrl", true, false) ;returns {blank} as ManageOrder is false and hotkey is invalid
msgbox % Hparse("Ctrl + Alt + Ctrl + K") ;returns {blank} as two Ctrls are wrong