Friday, November 28, 2014
   
Text Size
Login

AHK Countdown Tooltip

Applies to:
  • Microsoft Windows 7 Enterprise
  • AutoHotkey (see code for AHK version)

What?
Someone suggested an app that counts the days I have left serving my notice. I thought I'd go one better and have it calculate to the nearest second. I call this latest app "byeBU" and this is version 0.4 Beta (unofficial app).

Why?
Something to do...

How?

Autohotkey Count Number of Files/Folders in a Directory

What?
So this is an article to list methods of retrieving the number of files in a folder/directory.

Why?
Why can't we just use a loop and file pattern native to the Autohotkey programming language:

  1.  UserFolder:="C:" 
  2.  -- UserFolder := RegExReplace( MyInputField, "\\$")  ; gets rid of trailing slash if required 
  3.   
  4.  -- Method #1 
  5.  count := 0 
  6.  Loop, %UserFolder%\*.*, 0, 1  
  7.    count++ 
  8.   
  9.  -- note for future use: 
  10.  ; if A_LoopFileAttrib contains H,R,S 
  11.  ;     continue 
This works fine at home on your local host on a local drive. Try using this over a networked drive and more time will be spent counting the files then the actual processing (or whatever your script is trying to do).

Parse a HTML Table into a ListView

What?
A quick article on if you were given a webpage coded in HTML, what methods in AutoHotkey could you use to separate out the HTML Tables into a ListView.

Why?
I want a snippet of code that replicates any HTML table.

How?
I've been trying various ways so I'm posting them here. My opinions on them change with the weather so until I do some benchmarking I won't know which ones best:

Alternative method of displaying Unicode in Autohotkey GUI

Well yes you could just use the Unicode version of Autohotkey. If you're looking for some up and down arrows which is all I wanted, then you don't have to use Unicode and you can use the Chr() function:


  1.  msgbox % Chr(24) ; upwards arrow 
  2.  msgbox % Chr(25) ; downwards arrow, unstable 

Fun with DllCall in AutoHotkey

Ok so there are more fun things to do out there. If you're the type of AutoHotkey programmer that doesn't like having to use the command prompt to write to an extra text file which your program has to read, then this is for you. DllCall will usually run contained in the program and can be hidden from the end-user.

The one to rule them all:
This is a function I pulled from the Autohotkey forums submitted by SKAN which lists all the functions for a specified Dynamic Link Library (DLL) along with an inputbox for convenience:

Latest Posts