Labels

January 27, 2016

Managing Tabs in Autohotkey

Tabs represent different sub-categories of a main category or topic like a table having results of all the students has many sub domains of a major domain, Subject:
    1.)Subject
          i) Mathematics ii)English iii) Science  iv)Social Science

You can handle each type doing different things, like each subject displays marks of each student, hence you need to read a different file for each tab. You can do many things in each tab without applying a common setting that appears in every tab:

Loop, parse, mainTabNames, |
{
    Gui, Tab, %A_Index% ;Lets you handle each tab separately  
 
      Gui, Add, ListView, r15 w450 Grid, Name of File/Folder                   |Shortcut(HotKey)
      
    Loop, Read,%A_Index%.ini                       ;Load the marks of each subject from                                 {                                                                   ;files names as per the subject i.e.- <Subjectname>.ini
      LV_Add("",A_LoopReadLine,A_LoopReadLine)
    }

} 
  

January 17, 2016

Reading a File and placing each line in One Tab in reverse order

Like, you wanna make some customised 'Tab' window where you can add or delete one or more tabs as per the requirement, You need to save a list of all the tabs in a file and then read it each time you launch your script:

Loop, Read, settings.ini                                      
{
    mainTabNames= %A_LoopReadLine%  | %mainTabNames% 
} 

Gui,font,S12 cGreen,Calibri
Gui, Add, Tab,x%mainTabX% y%mainTabY% w%mainTabWidth% h%mainTabHeight%, %mainTabNames%
Gui,Show

Note: the tabs will be added in reverse order of the index of lines in the file.

January 7, 2016

Reading a File Name and Display its Name

Just copy the file and read the clipboard:

Send,{ctrl down}c{ctrl up} ;to copy the file/folder path
ClipWait
FileFullPath=%Clipboard%  ;stores the clipboard in FileFullPath
SplitPath,FileFullPath, name, dir, ext, name_no_ext, drive
MsgBox, ,Selected file,The selected file is %name%

December 14, 2015

My Shortcuts

 A mini-shortcut manager for the most frequently visited places in your systems, like :
   My Documents, CMD, Windows Media Player, Control Panel etc.
You can make them launch whnever you want, with the hotkey designated to a partcular place.
Not only this, You can also go directly to you home page, Github page or LinkedIN Page with a single hotkey. Choose whatever Hotkey you want and change them as per your need.

                                                       Github Repository



November 27, 2015

Direct your [Left Arrow Key] to [Shift]+[Right Arrow Key]

Just a few days ago, one of my friend faced a problem. [Left Arrow Key] of his Laptop Key Board stopped working. I helped him to solve this problem by redirecting that key to [Shift]+[Right Arrow Key].

This is the script to do so:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance,force
Menu, Tray, NoStandard
Menu, Tray, Add, Run at Startup, startup
Menu,Tray,Add,About,about
Menu,Tray,Add,exit,closescript
+Right::
Send {Left}
return

closescript:
ExitApp
return

about:
MsgBox,This script directs the Shift+Right Arrow Key to LeftArrow key`n{Shift}+{Right Arrow Key}={Left Arrow Key}
return

startup:
FileCreateShortcut,%A_ScriptFullPath%,%A_Startup%/mapping.lnk
IfExist,%A_Startup%/mapping.lnk
{
FileDelete,%A_Startup%/mapping.lnk
FileCreateShortcut,%A_ScriptFullPath%,%A_Startup%/mapping.lnk
}
 return

For Non-AhkScript users, just ask for the .exe file at my Google+ wall and I will send you the .exe file to run the script.