Author Topic: AutoHotkey  (Read 5912 times)

Randi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 13191
    • View Profile
AutoHotkey
« on: March 26, 2015, 12:42:56 pm »
Please post AutoHotkey comments, tips and questions in this topic.



Link to the site: AutoHotKey
« Last Edit: March 26, 2015, 01:35:01 pm by Randi »

Randi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 13191
    • View Profile
Re: AutoHotkey
« Reply #1 on: March 26, 2015, 12:44:27 pm »
Hi Hanibal94.  I tried to download Auto Hot Key and received the following message
You can?t open the application ?AutoHotkey112003_Install.exe? because Microsoft Windows applications are not supported on OS X.

Any suggestions?

Sounds like you're using a Mac, for which AutoHotkey isn't available.

Randi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 13191
    • View Profile
Re: AutoHotkey
« Reply #2 on: March 26, 2015, 01:20:34 pm »
For the ditto

Here's the simple script I wrote that changes the * on the number pad into a ":

NumpadMult::"


`::"

I just have to hit the key to the left of my backspace button (I have a German keyboard, so the punctuation is completely different).


Quote
!Numpad0::
Sendinput {Tab}{Tab}"{Tab}"{Tab}
return
For this I press Alt and the numpad 0 when I have finished entering the wet bulb temp and there are quotes in the weather and cloud type fields.


Quote from: Randi
I cannot use either of the above methods when I have two dittos in sequence. I use:
Quote
\::
    Send, "{Space}{Tab}
Return
to enter a single ditto and move to the next box.

Quote
NumpadMult::
    Send, "{Space}{Tab}"{Space}{Tab}
Return
will give me two dittos in a row.

« Last Edit: March 26, 2015, 01:23:42 pm by Randi »

Randi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 13191
    • View Profile
Re: AutoHotkey
« Reply #3 on: March 26, 2015, 01:31:19 pm »
To complete the date and exit the box I use:
Quote
NumpadDiv::
   Send, /08/1848{Enter}
Return


Hotstrings
Quote
::pu::Punished
I thought about adding the names of certain crew members - but I use Firefox, so they are in the dropdowns ;)

Quote
::icq::inspected the crew at quarters
« Last Edit: March 26, 2015, 02:48:08 pm by Randi »

Randi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 13191
    • View Profile
Re: AutoHotkey
« Reply #4 on: March 26, 2015, 01:48:20 pm »
I just started using AutoHotKey and I thought I'd note a couple of things that might be helpful to other newbies:

On the desktop I created a shortcut to the script file and then I dragged that script to my Start Menu to make it easier to start. (There may be better ways to do this ;))

My script is very ship-specific, so I suspend it (from the AutoHotKey icon on the Taskbar) when I'm not transcribing. That makes it is easy to resume the script.

jil

  • Editor
  • Hero Member
  • *****
  • Posts: 2637
    • View Profile
Re: AutoHotkey
« Reply #5 on: March 26, 2015, 01:52:45 pm »
To stop over enthusiastic use of the Backspace key (on those very rare  ;) occassions when I need to correct input) causing the previous web page to be displayed thus losing everything you've input  >:(. I use

Backspace::
send {left}{del}
return

Pommy Stuart

  • Shipherd
  • Hero Member
  • *****
  • Posts: 3652
  • A closed mouth gathers no foot.
    • View Profile
Re: AutoHotkey
« Reply #6 on: July 03, 2015, 02:32:16 am »
Using a combination of your keys I am now using



NumpadDiv::
   Send, /07/1903{Enter}
Return

NumpadMult::
Sendinput "{tab}
Return

Numpadadd::                 (changed to add)
Sendinput {Tab}"{Tab}"{Tab}
Return

Numpadsub::
Sendinput -{tab}0{enter}
Return



Thanks for your suggestions.
« Last Edit: November 28, 2015, 09:45:56 pm by Pommy Stuart »

Danny252

  • Editor and Shipherd
  • Hero Member
  • *****
  • Posts: 778
    • View Profile
Re: AutoHotkey
« Reply #7 on: July 03, 2015, 09:39:15 am »
Mine, plus explanations, is currently:

`::
SendInput "
return


Converts the backwards apostrophe thing above the tab key into a speech mark, for quick ditto-ing.

_::
Send {NumpadSub}
return


Typo correction! I often hold down shift for too long, converting a dash "-" into an underscore "_", which is a rarely used symbol.

>::
SendInput .
return


Typos again from holding down shift - converts ">" in to "."

<::
SendInput {,}
return


Typos again from holding down shift - converts "<" in to ","

?::BS

Turns the dogleg key (shift-keyabovetab) into a backspace. I often don't have a hand anywhere near the backspace key, so this is another convenient shortcut.

!1::
SendInput Var{Tab}0-1
return


Alt-1 prints "Var - 0-1" in the wind direction and speed columns, a very common entry.

!2::
SendInput Calm{Tab}0
return


Alt-2 prints "Calm - 0" for the wind , again also used often.

!3::
SendInput Var
return


Alt-3 inputs "Var" in the wind direction column, for cases where the speed isn't 0-1 as per Alt-1

!4::
SendInput None{Tab}0
return


Inputs "None - 0" into the cloud type and coverage column.

!5::
SendInput Sausalito{,} California
return[/quote]


A temporary one! Due to spending several months in the same port, I used this additional shortcut to enter the same port name each day.

On the desktop I created a shortcut to the script file and then I dragged that script to my Start Menu to make it easier to start. (There may be better ways to do this ;))

If you place an "AutoHotkey.ahk" in your "My Documents" folder, it will be automatically run when the program starts - I think a dummy file is created by default.

Craig

  • Shipherd
  • Hero Member
  • *****
  • Posts: 3357
    • View Profile
Re: AutoHotkey
« Reply #8 on: July 26, 2015, 07:17:29 pm »
Here is an AHK script to facilitate navigating between log pages without having to edit the URLs. Once you have loaded a  log page in your browser you can navigate forwards and backwards by using the right and left arrow keys. You can also switch between the right-hand and left-hand log pages using the up and down arrow keys.

The program examines the URL for the presence of ".jpg" when you press Alt and t and then finds the log sequence number.

;    Alt and left-arrow displays the next page
;   Alt and right-arrow displays the previous page
;   Alt and up-arrow displays left-hand side of the same page (usually weather reports)
;   Alt and down-arrow displays right-hand side of the same page (usually remarks)

Notes: You must release the Alt key between each action; if you hold it down and press an arrow it will only work once.
       You only need to press Alt t when you begin or if you load a new log page; not when you are navigating with this script   

Click on the attachment and then select "open with Notepad". Save file to disk and then double click on OW_navigate.ahk in your file manager. You can Edit the script by choosing that option after right-clicking on the file name.

Randi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 13191
    • View Profile
Re: AutoHotkey
« Reply #9 on: July 26, 2015, 07:30:14 pm »
Works for me!

AvastMH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7427
    • View Profile
Re: AutoHotkey
« Reply #10 on: December 04, 2015, 08:14:34 pm »
I just loaded AutoHotKey and it's not something  I can understand at all  :'( :'( :'(  I've pinned it to my task bar. It would be so helpful to be able to use it because typing in the column descripts is painful  :(

Randi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 13191
    • View Profile
Re: AutoHotkey
« Reply #11 on: December 04, 2015, 08:37:07 pm »
Blind leading the blind, but do you have a file with the extension ahk somewhere on your hard disk?

Hanibal94

  • Shipherd
  • Hero Member
  • *****
  • Posts: 4445
  • Better to do it, than live with the fear of it.
    • View Profile
Re: AutoHotkey
« Reply #12 on: December 04, 2015, 08:37:28 pm »
AutoHotKey is a bit tricky because once you've installed it, you don't run it - instead, you create a new script (right click on Desktop, choose New -> AutoHotkey Script) and configure it.
My script includes:

#::'

which means "Press the key for # and you will get ' ".
and:

^::
Sendinput {Tab}{Tab}{Tab}
return

which means "Press ^ and the interface will act as if you pressed the Tab button three times". I use that one to quickly skip blank boxes on the Patterson.
In other words, the general syntax is [Key you press]::[What really appears on the screen]
Does this help?

Randi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 13191
    • View Profile
Re: AutoHotkey
« Reply #13 on: December 04, 2015, 08:49:14 pm »
Mine includes:

f2::
    Send, Hour{enter}Wind Direction{enter}Wind Force{enter}Barometer Height{enter}Temp Air Dry{enter}Temp Air Wet{enter}Temp Water{enter}Weather{enter}Forms of Clouds{enter}Prop of clear Sky
Return


::bw::begins with
If you type "bw " (you don't need the quotes, but you do need the space), you get begins with.
If you type "Bw " you get Begins with.


AvastMH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7427
    • View Profile
Re: AutoHotkey
« Reply #14 on: December 04, 2015, 10:55:54 pm »
Hey Hanibal and Randi - I think you may have cleared a deep fog from my brain (and that's saying something!)  :D
I'll give it a go tomorrow morning - too late tonight...longing to sleep.  :)