Autohotkey is a free and powerful tool that allows you to automate almost anything on your Windows computer in any program. Computer Hope uses this tool daily to help answer common questions asked in e-mail quickly and perform other common repetitive tasks. If you do anything daily that requires you to repeat the same actions, we highly recommend using this tool. This page demonstrates some of this programs capabilities.
Caution: This tool can be used to automate tasks in gaming, some online games may consider this cheating and if caught it may result in a ban.
If you want to follow along with this documents examples, please download and install Autohotkeybefore following any of the below steps. Otherwise, skim this document for a better understanding of the program before downloading and installing it on your computer.
After Autohotkey is installed to create and edit a script right-click anywhere on the Desktop or folder, click New, and chooseAutoHotkey script. Name the script whatever you want and then right-click the script file and choose Edit the script.
Tip: If you plan on always using the same scripts you can also load AutoHotkey at startup, right-click the AutoHotkey icon () in the Windows notification area, and click Edit this script. The default script (AutoHotkey.ahk) will open in your default text editor and allow you to add or change your own scripts. Each time Autohotkey loads when your computer starts this default script will load this script.
Script basics
Each script in Autohotkey can also be assigned a keyword (hotstring) or a personalized keyboard shortcut key. When using a keyboard shortcut any shortcut can be used as long as Windows has not already assigned those keys to another task. Each shortcut key can be comprised of the Windows key represented as a "#", an Alt key represented as a "!", a Ctrl represented as a "^", and any other letters, numbers, or other keys on the keyboard followed by two colons (::).
Autohotkey includes two example scripts, the first one (shown below) will open the Autohotkey web page when you press the Windows Key and Z at the same time. Which can be done now if you have Autohotkey installed and the default autohotkey.ahk loaded. Otherwise, this line can be added to a new script, saved, and ran to allow this shortcut to work.
#z::Run www.autohotkey.com
Most scripts will be more than one line. However, in the above example it is only one line and needs no additional commands. In the below script example, the script has multiple lines, and as can be seen must be finalized with the "return" command to prevent anything below this script from being executed.
^!n:: IfWinExist Untitled - Notepad WinActivate else Run Notepad return
The above script starts with the shortcut key Ctrl + Alt + n, the next four lines are an if elsecommand, which in English translate to "if an untitled Notepad window exists then make that window active, else run a new Notepad."
Creating your first script
With your basic understanding of how this program works lets create your first script to print "Hello World!" anywhere you want. Move the cursor to the end of your new script file or the default Autohotkey.ahk script file and add the below line.
::Hello::Hello World{!} This is my first script. ;Example comment
In this first example, we are not using a shortcut, only the keyword "hello" to execute the script. Also, because "!" is a modifier key command for the Alt key it has been surrounded by curly brackets, which indicates the key, not a command. Finally, this script also contains a comment at the end, which is anything followed by a semicolon. All comments are ignored and used to help explain the code in the script.
Any time you make any changes to a script it must be reloaded or run in order for those changes to work.
To load the script double-click the script file or right-click the script file and choose Run Script. If youre editing the default autohotkey.ahk and Autohotkey is running reload the script by right-click on the Autohotkey icon () in the Windows notification area and choose the Reload This Script option.
Once the script has been loaded you should be able to type "hello" in the below text box and after pressing space or any punctuation the script type out "Hello World! This is my first script."
Tip: If you dont want to have to press the space or punctuation you can add an asterisk between the two first colons.
Next, in the below example we are creating a script that is executed with a shortcut key. Edit the script and add the below three lines to your script.
#F2:: send Hello World{!} return
After these three lines have been created save the file as the same file name and then reload the script. If done successfully you should be able to click in the below text box and press the Windows Key + the F2 function key at the top of the keyboard to print Hello World!
In addition to sending text any shortcut keys can also be added, data can be copied to and from the clipboard, and the script can sleep for any amount of time. Edit the script again and make the below changes to the script created earlier.
In the above example, lines three and four have introduced how keys can be pressed in the script to perform other keyboard shortcuts. The third line this is pressing Ctrl+Shift+Home to highlight all text before the cursor, and the next line is pressing Ctrl+C to copy the highlighted text. Anytime a key is pressed down (e.g. {CTRLDOWN}) make sure it is let go with up (e.g. {CTRLUP}), otherwise it will remain down and cause problems.
The fourth line introduces a variable and the %clipboard% command which contains anything in yourclipboard. With this line, all contents in the clipboard are assigned to the "example" variable.
The next command is making the example variable all uppercase by using the StringUpper command and assigning the uppercase text back to the example variable. The StringLower command could also be used to make everything lowercase.
Next, the sleep command is a great command for making the script sleep for any length of time. 1000 is equal to 1 second. This command is useful and often necessary if the script has to wait for the computer to open a program or window.
Finally, the last send command will add " - new hello =" with the hello world now all in uppercase. This revised version of the script can be tested again in the below text box.
Scripting the mouse
Although almost anything can be done using keyboard shortcuts, there are still times you may want to click somewhere on the screen. Using the click command you can click on any location of the screen as shown in the below example. To determine what the location of where you want to click use the Window Spy utility that can be opened by right-clicking the Autohotkey icon () and clicking Window Spy. As you move your mouse, the "In Active Window" will display the location of your mouse cursors current position. Once youve determined where you want to click add the Click command with the location of where you want the mouse to click.
#F2:: Click 980,381 return
With this command once the Windows key + F2 is pressed the mouse will click once at 980,381.
Run a program
If there is a program you run often, opening a program in a script can be as simple as typing run and the name of the file you want to run. Earlier in this document we gave an example of how to run Notepad by typing "run notepad" in the script. If youre familiar with the Windows Run, many of the same commands and ways you run a program or open a file will work in AutoHotkey. Below are some additional examples of what the run command can do in AutoHotkey.
Run, wordpad.exe, C:My Documents, max
In the first example, this would open WordPad with the default directory C:My Document, and open the window maximized.
Run, www.tipsandtricksforfree.tk
Any Internet URL can be added after the run command to open that web page in your default browser.
Run, mailto:example@domain.com?subject=My Subject&body=Hello this is a body example.
Finally, this is yet one other example of the run command, which is sending an e-mail using your default e-mail client and sending the e-mail to example@domain.com with the subject "My Subject" and the body of the message having "Hello this is a body example."
Using variables
Like other programming and scripting languages, AutoHotkey supports the use of variables in the script. As seen earlier, we demonstrated copying the clipboard contents to a variable. A variable in AutoHotkey can be either a string or an integer and does not need to be declared like other programming languages.
In our first example, we will be using an integer variable to add two numbers together and display the results in a message box.
#F2:: example := 5+5 msgbox, Example is equal to %example% return
In the above example, "example" is our variable name, := is assigning the integer expression as the value of 5+5 (10). Once the variable has been assigned we are using the msgbox command to open a message box and print its value. Whenever you are sending, printing, or assigning a variable it must begin and end with a percent symbol. After saving and reloading the above script when pressing Windows key + F2 you should see a message box similar to the example shown on this page.
In the next example we are assigning the variable a string value and again having the results displayed in a message box.
#F2:: example := "Nathan" msgbox, Hello World! My name is %example% return
In the above example we are assigning the example variable to "Nathan" and because it is a string itmust be surrounded in quotes. When pressing the Windows key + F2 this time the script will open a message box saying "Hello World! My name is Nathan"
If you wanted to have a variable with a string and an integer you can have an expression outside the quotes, as seen in the below example.
#F2:: example := "Example: " 5+5 msgbox, Mixed variable is %example% return
When executed, the message box will display "Mixed variable is Example: 10"
Conditional statements
Conditional statements are also supported with AutoHotkey and support the operators and (&&), or (||), and not (!). Below are a few examples of how conditional statements can be used.
#F2:: example := 5 if example = 5 msgbox, true else msgbox, false return
In the above example, the variable is assigned a value of 5 and the conditional statement checks to see if the example is equal to 5 because this is true the msgbox will print true. If the example value was not equal to 5, the msgbox would have returned false.
You would think after seeing the first conditional statement example that you could put quotes around a string in the variable and conditional statement; however, this will not work. If you want to match a string, surround your expression with parentheses as shown in the below example.
#F2:: example := "computer" if (example = "hope") msgbox, true else msgbox, false return
In the above example, if the example variable is equal to hope, print true, otherwise print false. Because the example variable has been assigned as "computer" this script will return false.
Creating a loop
If there is a script that you want repeat, place the script into a loop, as seen in the below example script.
Once the above script has been added and the script has been re-loaded or ran you should be able to click in the below text box and press the Windows key + F2 to print Hello World! five times. The loop can be extended to repeat as many times as you want.
Regular expressions
Like many other scripting languages AutoHotkey also supports the use of regular expressions(Regex), which allows you to replace any text within a string with other text. This is useful for times you may want to change the formatting of text or remove unnecessary data within a string.
#F2:: example := "support@tipsandtricksforfree" example:= RegExReplace(example, "@.*", "") msgbox, Username is %example% return
In this above example, the third line with RegExReplace will replace the @ and everything after it with nothing making the example variable only show the username account of the e-mail address. When Windows key + F2 is pressed the message box will display "Username is support".
Additional information
Although this page contains dozens of examples there are hundreds of other commands that are not covered. Visit the Autohotkey dictionary for a full listing of available Autohotkey commands.
As a part of this alliance between Higher Education Commission and Microsoft, free latest licensed Microsoft software were provided to all the Public Sector Universities for their official use. Now HEC in collaboration with Microsoft has announced that every student, faculty and staff member of all public sector universities have full access to the e-academy Licensing Management System (eLMS) Portal to download the complete suite of Microsoft products for their home use absolutely free. All public sector universities recognized by HEC have been provided a customizable portal for licensed software distribution. The portal consisting of around 150 software applications will enable over one million students and about 40,000 faculty members to download genuine Microsoft software.
Now students can demand their own account from the IT Services department of their respective university. You have to acquire your account as early as possible to get the maximum benefit from this facility.
Samsung announced a new addition to the popular GALAXY family with the Samsung GALAXY ACE 3 With LTE – a smartphone that synthesises a multitude of smart features to produce an enriched user experience suitable for everyday life.
Features
Powered by a dual core processor and Android™ 4.2.2 (Jelly Bean), users will enjoy the larger 4.0-inch display and a 5-megapixel camera equipped with multiple features on the new Samsung GALAXY ACE 3 With LTE.
To provide a more intuitive user experience, the GALAXY ACE 3 With LTE comes equipped with several smart features, providing innovative tools that continue to make the GALAXY series successful in the market.
• ‘S Translator¹’: Gives instantaneous translations at any time
• ‘Trip Advisor’: Provides guides and travel information for your next trip
• ‘Smart Stay’: Recognizes when a user is looking at the phone, and saves battery life when a user looks away by dimming the screen and powering down using advanced facial recognition
• ‘S Voice’: Offers voice command functionality
• ‘Easy Mode’: Brings a simple and intuitive homescreen mode for streamlined access to your top functions
Availability
The Samsung GALAXY ACE 3 With LTE will be available in Metallic Black and Pure White from September 28, 2013 at $398 without contract. Flip covers for the device will be available in black and white at $38. Available at telecommunication operators, major consumer electronics and IT stores, and Samsung Experience Stores.
Specifications
Network
3G: HSDPA 14.4Mbps / HSUPA 5.76Mbps 900/2100 MHz
4G: [LTE Band 3 (1800MHz)/ Band 7 (2600MHz)/ Band 8 (900MHz)/ Band 20 (800MHz)]/ 3.5G (HSPA+ 42Mbps)/ 3G (850/ 900/ 2100MHz)/ EDGE/ GPRS Class 33 GSM Quad-band (850/ 900/ 1800/ 1900MHz)
Processor
1.2GHz Dual Core
Display
4-inch 16M colours WVGA (480 x 800) full touch (C-type) TFT LCD Screen
OS
Android™ 4.2.2(Jelly Bean)
Camera
Main(Rear): 5-megapixel camera with LED Flash
Sub (Front): 0.3MPcamera
4X Digital Zoom, Auto Focus, LED Flash, Best Photo, Continuous Shot, Sound & Shot, Panorama Shot, Sports Shot, Night Shot, Buddy Photo Share, Share Shot
Video
Video Player (3GP, H.263, H.264, MPEG4, AVI, WMV, FLV, ASF) 1080p @30fps & Recorder (3GP, H.263, H.264, MPEG4) 720p @30fps
S Translator¹, Trip Advisor, Dropbox, S Planner, S Voice, Voice Search, Voice Recorder, Pop Up Play, Smart Stay Motion UX
Google Mobile
Services
Chrome™ Browser/Android™ Browser, Google™ Search, Google Voice Search™, Google+™, Google+ Messenger™, Hangouts™, Google Maps™, Google Local™, YouTube™, Google Play™ Music
Connectivity
Wi-Fi® 802.11 b/g/n 2.4GHz
Wi-Fi Direct™
Bluetooth™ 4.0, USB 2.0
Sensor
Accelerometer, Proximity, Magnetic
Memory
8GB² Internal memory+ microSD slot (up to 64GB), 1GB RAM
GPS
A-GPS / GLONASS
Dimension
121.2 x 62.7 x 9.99 mm, 119.8 g
Battery
Standard battery, Li-ion 1,800mAh
Talk Time³
Up to 10hrs (3G)
Standby Time³
Up to 430 hrs (3G)/ Up to 330hrs (4G)
1 S Translator may require internet access and be subject to data charges depending on usage. Available languages are limited, and actual performance may vary, depending on language spoken, accents, and surrounding environment.
2 Actual user-accessible internal storage may differ depending on operating system and other built-in applications.
3 Dependent on network, SIM card, usage and battery condition.
Note: Certain features, services and applications (including 4G LTE) are dependent on network connectivity and may not be available in all coverage areas. Additional data charges may apply.
Specifications are accurate as at time of release and are subject to change without prior notice.
Google, Google Play, Android and other marks are trademarks of Google Inc. Microsoft and ActiveSync are either registered trademarks or trademarks of Microsoft Group of companies. Bluetooth® is a registered trademark of Bluetooth® SIG, Inc., and any use of such marks herein is under license. Wi-Fi® and Wi-Fi Direct™ are either registered trademarks or trademarks of Wi-Fi Alliance.
My mobile phone is my source of entertainment; specifically for its wide array of social apps and mobile games. Personally, I feel that a fully charged battery is like a shield to withstand any mobile phone mishaps. For a battery sucker like me, the difference between victory and defeat when playing Minion Rush on my phone is calculated in mere seconds and a smashed phone!
Image credits from omgbuntu.co.uk & memegenerator.com
The PowerSkin Pop’n battery charger is godsend to all mankind – to the mobile phone devotees who gets paranoid upon seeing the red battery signal, at least. It adds a few more lives to your phone – allowing you to live like any normal human being. I am pleased to be given the chance to review this.
Image credits from Power-Skin.com
The PowerSkin battery charger, which supports most mainstream Android devices such as Samsung, LG, HTC, Asus or Google Nexus, is one of the world’s first and widely anticipated external battery charger for Android devices.
Taking an interesting approach, the PowerSkin battery charger’s tough plastic exterior, is cladded with rubber suction cups on the interior as well as a flexible connector tip at the bottom that could flex up to 90 degrees. The suction cups on the inside of the charger is a brilliant idea as it gives users the flexibility of externally attaching the charger to their phones or over existing phone cases and one can be assured that it will not fall off easily.
Image credits from Power-Skin.com
Packing along a 2000 mAh charger, it is able to charge a dead Samsung Galaxy S II back to its 100% battery capacity in just over an hour. If you are into preserving battery power, the charger has LED indicator lights which will display the amount of charge left. These battery indicators as well as the on/off button are brilliant as it allows users to do a quick battery check and can stop the charger at any time.
Image credits from Power-Skin.com
The PowerSkin Hybrid is all about convenience. It is constructed to a size so convenient and perfect for users to carry it around. Retailing at $69.90, it might be a bit too costly for some, but its slim, lightweight feature which allows you to fit discreetly in any bag and even the fun POP sound from the suction as you pull off your phone, serves as fair redemption for its price.
Just like the lyrics of Battery by Metallica prophesised, “Hypnotising power, crushing all that cower, battery is here to stay”. The power of battery is undeniably potent, and for PowerSkin’s case, it is definitely here to stay.
Head on down to COMEX IT exhibition this weekend for PowerSkin line-up showcased at Singapore Expo, Hall 6, Booth No: 6411.For more information on the PowerSkin Hybrid Battery Charger, please visit PowerSkin website here.
Key Features
Extra Power:Provides on-the-go charging for your mobile lifestyle. Slim, 2000 mAh in only a 10mm - thick case.
Stick-N-Go:Quickly and securely attach the charger to your smartphone, even over most existing cases.
Rechargeable:External battery charger extends power up to 70%, depending on the battery capacity in the device being charged.
Light-weight:Featherweight of only 86 grams. Offers comfortable grip for gaming and extended social use.
On/Off Button:Puts power-on-demand in your hand. Simply hold down for 2 seconds to turn on or off
Hybrid Charger:A wide range of interchangeable connectors transform the battery pack into a hybrid charger. Individual connectors available soon!
Battery Level:Indicator lights display charging status and battery level.
Technical Specs
Power Capacity
2000 mAh
Input Spec
5V, 1A
Output Spec
5V, 1A
Talk Time
Up to 70% More
Standby
Up to 70% More
Compatibility Micro USB/A (MBA)
Nexus 4G Samsung Infuse Motorola Atrix 2 DROID RAZR M LG Optimus LG Xpression Samsung Galaxy S III Samsung Galaxy Note Samsung Galaxy Note II Samsung Galaxy S II (Family of Products) Samsung ATIV Odyssey Samsung SCH-1930 Blackberry Torch (Family of Products) Nokia Lumia 710 DROID RAZR MAXX Sony Xperia Advance Sony Xperia tipo/miro/U/P/SL Nokia Lumia 810/820/920/822