The point to using scripting to remove or reduce that crap for you, make the computer do what you want it to do. I think AutoHotKey embodies that spirit fairly well.
This is what I mean..
Let’s say you’ve a HTML page or another document that you needed to get information from and place it in to an EXCEL document. And from there let’s assume that there’s a lot of them. Selecting and copying this information is extremely time consuming, but if there’s a process, something repetitive that could be automated; it can be done with AHK.
Below is an example of what I’m talking about and it’s fairly simple. I’m basically assigning 3 keys to get 3 pieces of information. Once the information is collected, it performs a function and then resets the position in Excel.
Here I setup the 3 keys and define them as to what I want them to do.
TrayTip, Status, Copied System,,1000
This is where we switch to EXCEL and start pasting the information I copied.
;;— Enter the data in Excel
WinWait, Microsoft Excel,
IfWinNotActive, Microsoft Excel, , WinActivate, Microsoft Excel,
WinWaitActive, Microsoft Excel,
The code/script is simple and if you’ve a few minutes, or if you’ve repetitive processes that could be automated, you should try to do so, because while the initial process of setting up the script and testing, and adjusting it could take while; the end result is time saved, more productive and the results are consistent.
For instance if you needed to find a way to do something when a webpage opens/loaded, but it’s never a consistent load time, you’d need a way to find out when that page loaded. I did something like this.
The request is made to open a web page, I find something on the page to reference to [a trigger]; something consistent and something that’s on that page every time. The process is set to check for the trigger 10x. Once it finds the trigger it can move on. During the detection phrase the script, pops a tray tip to tell you what it’s doing.
This is just a section to rope off basically to say this is the area I need to check for when the page has finished loading.
WinWait, SlimBrowser ,
IfWinNotActive, SlimBrowser , , WinActivate, SlimBrowser,
Mousemove,240 , 243
MouseClick, left, , , 2
Information [text] is COPIED from the webpage. I compare the information copied to what I’m looking for. If the items match, I found it and the site is ready for me to move forward.
if check = TRIGGERPHRASE
traytip, Status, > %check% < found,5
if a_index > 5
traytip, Status, STOPPING,5
traytip, Status, > %check% < NOT found – Try %a_index%,5
Anything after this point could be anything; it’s whatever else you want it to do.
MouseClick, left, 242, 398
statusbarwait, done, 2
So, if you can find out what parts of your day can be automated, download the program, read the HELP file and simplify your life.
Hope this helps.
Adventures in Scripting: AUTOHOTKEY
Share this with Family and Friends: