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 / HotstringTimed.ahk
Created June 10, 2013 05:19
Hotstrings with expiry time support
gosub, iniths
;######### YOUR HOTSTRING AREA ###################################
::btw::
SendLimit("btw", "by the way", 1500) ;type btw within 1.5 secs
return
::wth::
SendLimit("wth", "what the hell", 1000)
return
@aviaryan
aviaryan / Filenameactiveprogram.ahk
Created June 21, 2013 07:13
Autohotkey filename in program active function
#If Win_Act("Notepad", "test") ;Notepad doesnt show extension
#x::Msgbox, you are editing test
#if win_act("Notepad", "!test")
#x::Msgbox, you are editing something else
#if
/*
Function: Win_Act(myapp, filename) by Avi Aryan
@aviaryan
aviaryan / AHkini.ini
Created July 8, 2013 10:48
Ahkini ini struct
[section1]
;section1 comment
key1 = hithere_key1
;keycomment
;line2
;line3
key2 = hithere_key2
;keycomment2
key3 = hithere_key3
@aviaryan
aviaryan / ahkiniexample.ahk
Last active December 19, 2015 11:29
ahkiniexample
SetWorkingDir,% A_scriptdir
Ini := new AhkIni("black2.ini") ;will create new ini if nothing exists
ini.write("section1", "key1", "hithere_key1", "keycomment`nline2`nline3")
ini.write("section1", "key2", "hithere_key2", "keycomment2", "section1 comment")
ini.write("section1", "key3", "hithere_key3") ;no comment for this key
ini.write("section2", "key1", "hithere2", "keycomment2", "section2 comment")
msgbox,% ini.read("section1", "key1", key, sec) "`n`n" key "`n`n" sec
@aviaryan
aviaryan / CheckExe.ahk
Created July 13, 2013 11:59
CheckExe - Check if an Exe is Autohotkey's
;CheckExe by Avi Aryan
;CheckExe("Myexe") ;Omit .exe
CheckExe(ExeName){
HW := A_DetectHiddenWindows , TM := A_TitleMatchMode
DetectHiddenWindows, On
SetTitleMatchMode, RegEx
if WinExist("i)" ExeName "\.exe ahk_class AutoHotkey")
p := 1
SetTitleMatchMode,% TM
@aviaryan
aviaryan / Gdip_SetImagetoClipboard.ahk
Created July 16, 2013 13:31
Set image file to Clipboard
Gdip_SetImagetoClipboard( "S:\Portables\AutoHotkey\My Scripts\lo.jpg" )
return
Gdip_SetImagetoClipboard( pImage ){
;Sets some Image file to Clipboard
PToken := Gdip_Startup()
pBitmap := Gdip_CreateBitmapFromFile(pImage)
Gdip_SetBitmaptoClipboard(pBitmap)
Gdip_DisposeImage( pBitmap )
Gdip_Shutdown( PToken)
@aviaryan
aviaryan / punctuate.ahk
Last active December 19, 2015 23:59
Punctuate() - Perfect punctuations
;Punctuate() v0.1
; by Avi Aryan
;Perfect punctuations in sentences
;Suitable for Ahk_Basic
msgbox % Punctuate("hi,how are you?i am fine and i know you are fine too.thank you!")
msgbox,% Punctuate("hello.www.ahk.com.you're great,amazing...and ahk.net also is wonderful.")
msgbox,% Punctuate("http://i.imgur.com/OZ0a4Ju.jpg")
return
code:="Code to post goes here" ;Change this to create the new text for the Gist
access_token:="" ;Your Github access token goes here if you want to publish it to your Gist list
filename:="mygit.txt" ;change this to whatever you want your file name to be
description:="my description" ;This is where you would have a description for your Gist
PostAsGist(code, filename, description)
return
PostAsGist(code, filename, description, access_token="")
{
@aviaryan
aviaryan / gbadge-stackoverflow.html
Created August 8, 2013 12:50
Placing JavaScript dyna content and html in same line
<table width="100%" style="border: none" style="border-collapse: collapse">
<tr style="height: 200px" valign=top>
<td style="border: none" style="outline: none">
<a href="http://avi-aryan.github.io/Autohotkey.html" target="_blank"><font size="+1">Autohotkey Script listing</font></a><br />
<a href="http://www.github.com/avi-aryan" target="_blank">Github Account</a><br />
<a href="http://www.autohotkey.com/board/user/24563/" target="_blank">Autohotkey Forum Profile</a><br />
<a href="http://www.avi-win-tips.blogspot.com" target="_blank">Blog</a>
</td>
<td align=right width=400 style="border: none" style="outline: none">
@aviaryan
aviaryan / Clipjump - N++ Column Mode.ahk
Created August 21, 2013 06:12
Notepad++ Column Mode patch for Clipjump
;The script will configure Clipjump using ClipjumpCommunicator.ahk when Column mode is used in N++
;Column Mode in N++ is based on a native N++ record and this cannot be adminisered by Clipjump
;As a result , Clipjump will not work properly when pasting Data from N++ Column Mode copy
;For an explaination go to - http://www.autohotkey.com/board/topic/91488-/page-21#entry607902
;-----------------------------------------------------------------------------------------------------------
;USING
; Use the shortcut below (Win+Alt+C) to Copy Column Mode text in N++ , then paste using Ctrl+V