Visualizzazione post con etichetta autohotkey. Mostra tutti i post
Visualizzazione post con etichetta autohotkey. Mostra tutti i post

mercoledì 2 gennaio 2013

Swapping Fields with Autohotkey [ENG]

Let's say you have a really messed up contact books on your phone and you decide, as a new year resolution, to tidy it up just a little bit. You unsheathe your Kies and find that many of your contact have first and second name swapped. You still have your new years dinner and alcohol in you, so you don't seem to be able to summon the strength for a super smart script trying to sort the thing up for you, so you settle for the mininum wage and whip up an Autohotkey script to just swap the field in focus with the next in the tab order:
;--------------------------------------------------------------
; Swap consecutive fields
^#tab::
{
 ; Select all, cut
 Send ^a
 clipboard=
 Send ^x
 ClipWait
 firstField = %clipboard%
 ; Move to next field
 Send {Tab}
 ; Select all, cut
 Send ^a
 clipboard=
 Send ^x
 ClipWait
 secondField = %clipboard%
 ; Insert the first field
 Send %firstField%
 ; Get back on the previous field
 send +{Tab}
 ; Insert the second field
 Send %secondField%
}
Just some clicks away and the contact book is back in shape.

venerdì 7 dicembre 2012

CTRL+ENTER in Skype [ENG]

The new version of Skype lacks the option to set CTRL+ENTER as the standard hotkey to send a message. Why on earth they thought that removing an option could be a good idea is beyond me. Anyway if you have Autohotkey all you have to do is append these lines to your script:
#IfWinActive ahk_class tSkMainForm
^enter::
{
   Send {enter}
}

martedì 10 marzo 2009

Autohotkey

Ero riluttante all'idea di inserire l'ennesimo programmino nella mia tray, ma devo ammettere che AutoHotKey è abbastanza leggero (poco più di 3.5MB di RAM), utile e divertente da usare. Permette di creare facilmente delle macro da associare a combinazioni di tasti. Ecco lo script che uso quotidianamente:
; ------------------------------------------------------------- 
; print help text for this script
^#h:: 
{
 MsgBox Ctrl+Win+S: salva in scratchpad.txt`n
 Ctrl+Win+U: converte in maiuscolo`n
 Ctrl+Win+L: converte in minuscolo`n
 Ctrl+Win+G: cerca con Google`n
 Ctrl+Win+T: circonda con tag
}

; ------------------------------------------------------------- 
; append selected text to DESKTOP/scratchpad.txt
^#s:: 
{ 
  Send ^c
  ClipWait
  FileAppend, %clipboard%`n, %A_Desktop%/scratchpad.txt 
  return 
} 
; ------------------------------------------------------------- 
; converts selected text to upper case
^#u:: 
{ 
  Send ^c
  ClipWait
  StringUpper, up, clipboard 
  Send %up% 
  return 
} 
; ------------------------------------------------------------- 
; convert selected text to lower case
^#l:: 
{ 
  Send ^c
  ClipWait
  StringLower, low, clipboard 
  Send %low% 
  return 
}

; ------------------------------------------------------------- 
; search selected text in google
^#g::
{    
  Send ^c
  ClipWait
  Run http://www.google.com/search?q=%clipboard%
  return
}

; -------------------------------------------------------------
; surround selected text with tag
^#t::
{    
  Send ^c
  ClipWait
  InputBox, tag , Tag
  Send <%tag%>%clipboard%</%tag%>
  return
}

; -------------------------------------------------------------
; zahada
^#z::
{    
  InputBox, soluzione , Soluzione
  Run http://www.mcgov.co.uk/riddles/%soluzione%.html
  return
}