AutoHotkey scripts for developers
2011-01-03 20:06
651 查看
0
http://codeimpossible.com/2010/11/01/autohotkey-scripts-for-developers/
Posted November 1st, 2010 in Blahg and tagged autohotkey, tools by Jared
This week I’ll post some useful AutoHotKey scripts that I use to make every-day coding easier.
If you’re not familiar with AutoHotKey yet, I’ve blogged about it before and I would recommend giving that post a read. For the rest of you I thought I would post some useful AHK scripts that I have come across.
The most important AHK script ever.
Disabling Caps-lock. I constantly fat-finger the caps-lock button. With this script, I never have to worry about it again.
Generate a “safe” jQuery code block
This script will generate a self-calling anonymous function that scopes jQuery and protects your code from other possible interference from other javascript frameworks. You can read more about it here.
Include jQuery from the Google CDN
This script will turn {jqgoog#.#.#} into a <script> tag pointing to that version of jquery, specified by the #.#.#, hosted on googles cdn.
{jqgoog1.4.2} will become: Line breaks added for readability
{jqgoog1} will become: Line breaks added for readability
Automate writing simple database connection code in C#
This script will turn
Here’s the output:
http://codeimpossible.com/2010/11/01/autohotkey-scripts-for-developers/
Posted November 1st, 2010 in Blahg and tagged autohotkey, tools by Jared
This week I’ll post some useful AutoHotKey scripts that I use to make every-day coding easier.
If you’re not familiar with AutoHotKey yet, I’ve blogged about it before and I would recommend giving that post a read. For the rest of you I thought I would post some useful AHK scripts that I have come across.
The most important AHK script ever.
Disabling Caps-lock. I constantly fat-finger the caps-lock button. With this script, I never have to worry about it again.
SetCapsLockState, AlwaysOff
Generate a “safe” jQuery code block
This script will generate a self-calling anonymous function that scopes jQuery and protects your code from other possible interference from other javascript frameworks. You can read more about it here.
;insert a self-calling anonymous method to scope jQuery calls :*R0:{jqsafe}:: ( (function($) {{} $(function() {{} // ...code to run on dom ready {Left}{Left}{Left}{Left}{}});`n{}})(jQuery); ) return
Include jQuery from the Google CDN
This script will turn {jqgoog#.#.#} into a <script> tag pointing to that version of jquery, specified by the #.#.#, hosted on googles cdn.
{jqgoog1.4.2} will become: Line breaks added for readability
<script type=”text/javascript” src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js></script>
{jqgoog1} will become: Line breaks added for readability
<script type=”text/javascript” src=http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js></script>
; Include jQuery from google cdn ~{:: Input, UserInput, I V L13 C, {}}, jqgoog*, if ErrorLevel = NewInput return Test := InStr( UserInput, "jqgoog" ) Len := StrLen( UserInput ) + 2 if Test > 0: { jqVer := RegExReplace( UserInput, "jqgoog", "" ) SetKeyDelay, -1 ; Most editors can handle the fastest speed. Loop %Len% { Send, {backspace} } Send, <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/%jqVer%/jquery.min.js"></script> return } return
Automate writing simple database connection code in C#
This script will turn
{atwood}into a block of C# that can connect to a database and issue a query.
:*R0:{atwood}:: ( var connString = ConfigurationManager.ConnectionStrings["connection"].ConnectionString; var query = @""; using(var conn = new SqlConnection(connString)) {{} conn.Open(); using( var cmd = new SqlCommand( query, conn ) ) {{} {}} {Left}{}} ) return
Here’s the output:
var connString = ConfigurationManager.ConnectionStrings["connection"].ConnectionString; var query = @""; using(var conn = new SqlConnection(connString)) { conn.Open(); using( var cmd = new SqlCommand( query, conn ) ) { } }
相关文章推荐
- OneNote and Autohotkey – Useful Scripts
- Testing the AutoHotKey script for sending data to OneNote
- Auto generate change scripts in SQL Server Management Studio (SSMS) for tables
- Auto Increment Invoice Number For Vb.Net
- How to Use the BASH "for" Loop in Shell Scripts
- Ubuntu 下安装 eclipse 开发环境(Eclipse IDE for C/C++ Developers)
- 10 Commandments for Java Developers : JAVA程序员的十条戒律 - 转自 http://www.developer.com/
- Could not execute auto check for display colors using command
- Outlook 2007 Issues for Developers
- 地铁译:Spark for python developers ---Spark流式数据处理
- Enrolled 'Master Jenkins CI For DevOps and Developers'!
- VSTS for Software Developers
- 10 super useful tools for JavaScript developers
- using libtool for libraries, autotool versioning
- Cross platform debugging proxy for web developers base on NodeJS
- 今天从http://eclipse.org/下载了一个Eclipse IDE For Java EE Developers,解压后启动,发现弹出提示框“ Failed to create the Java Virtual Machine”
- 21 JavaScript Tips And Tricks For JavaScript Developers
- 40 Bootstrap Tools and Generators for Web Developers
- SQL: Practical Guide for Developers
- 翻译完《Windows Vista for Developers》的一点想法