 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Jun 18, 2009 12:08 pm Post subject: How to display HotKey, HotList |
|
|
If I forgot them, how to display them ?
Maybe like in a menu or something similar, even a simple message listing them should be ok.
Calling them from a keyboard key (like any "F" keys : on Fx keyboard press, the list shows up, and on the same Fx keyboard press again it disapears), it could also be displayed (loaded) on script load.
I searched and found some threads but I wondered if it was not built in, as it is a basic function that is very needed, but I may be wrong...
Also, as new member, I failed to use some of the solutions proposed due to my lack of understanding.
[Moved from Scripts & Functions forum. ~jaco0646] |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
Posted: Thu Jun 18, 2009 1:03 pm Post subject: |
|
|
I just found this in another post from another user:
| Code: |
!q::
HSList =
(
+ = Shift
# = Win
! = Alt
^ = Strg
~ = native Funktion des Hotkeys bleibt erhalten
$ = Send-Kommando führt den eigenen Hotkey nicht aus
)
MouseGetPos, Px, Py
ToolTip, %HSList%, % Px - 125, % Py - 125
SetTimer, RemoveTlTip, 5000
return
RemoveTlTip:
SetTimer, RemoveTlTip, Off
ToolTip
return
|
Just hold Alt+q to show the list.
Greets, aaffe |
|
| Back to top |
|
 |
Elesar
Joined: 28 Jun 2007 Posts: 622 Location: Somewhere around 35 12N 101 49W
|
Posted: Thu Jun 18, 2009 1:03 pm Post subject: |
|
|
Please use the Ask for Help section in the future.
For a basic listing of hotkeys that a script contains, simply double click the tray icon of a script, then go to "view" -> "Hotkeys and their methods" |
|
| Back to top |
|
 |
awannaknow
Joined: 14 Jun 2009 Posts: 324
|
Posted: Fri Jun 19, 2009 2:55 am Post subject: |
|
|
Sorry Elesar, I didn't post in the right thread, I'll pay attention from this point in time.
| Elesar wrote: | | For a basic listing of hotkeys that a script contains, simply double click the tray icon of a script, then go to "view" -> "Hotkeys and their methods" |
It doesn't answer the needs : hotkey and hotstrings.
And what if one wants to compile a script ?
The | Elesar wrote: | | double click the tray icon of a script, then go to "view" -> "Hotkeys and their methods" | is much as if in a developpement stage : you can do it to check features. When it is ready to use, something more functional is needed.
Last edited by awannaknow on Fri Jun 19, 2009 3:43 am; edited 1 time in total |
|
| Back to top |
|
 |
awannaknow
Joined: 14 Jun 2009 Posts: 324
|
Posted: Fri Jun 19, 2009 2:58 am Post subject: |
|
|
Thank you aaffe,
I used google trans, here it is :
| Code: | ~ = native function of the Hotkeys remains
~ = native Funktion des Hotkeys bleibt erhalten
$ = Send-command does not implement the own Hotkey
$ = Send-Kommando führt den eigenen Hotkey nicht aus |
With it I can list hotkeys and hotlist, but the list has to be done by hand and modified each time a change occur.
Is there any simple way to display them when needed, automatically updated when changes occurs ?
It links to an other question I have, how does members organize it :
1- many running all together
or
2- one indexing and referring to all others
or
3- one container of all the existing individual scripts specialy made, to run on the system.
or
4- other options like rschoolf explained http://www.autohotkey.com/forum/viewtopic.php?p=276056#276056: rely on an other software, Alias, to do it
I'm sure ahk can do it by itself
But how... ?
How to define AutoHotKey : is it programming, automating, etc.. ?
May be the created outputs ( call it scripts, programs, whatever..) could greatly benefits from a way to display all the hotstrings hotkeys.
Last edited by awannaknow on Mon Jun 22, 2009 7:22 am; edited 1 time in total |
|
| Back to top |
|
 |
awannaknow
Joined: 14 Jun 2009 Posts: 324
|
Posted: Fri Jun 19, 2009 3:46 am Post subject: |
|
|
| HotKeyIt wrote: | Did you try
|
Thank you HotKeyIt,
It is faster than The | Elesar wrote: | | double click the tray icon of a script, then go to "view" -> "Hotkeys and their methods" | solution.
Work for Hotkeys only. |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
Posted: Fri Jun 19, 2009 7:19 am Post subject: |
|
|
Hy awannaknow,
some time ago I saw a good script just to show the Hotkeys and Hotstrings. Don´t know the address.
But just search in Scripts&Functions, there you will find a solution for you.
Greets, aaffe |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 1002 Location: Germany - Deutschland
|
|
| Back to top |
|
 |
awannaknow
Joined: 14 Jun 2009 Posts: 324
|
Posted: Mon Jun 22, 2009 11:48 am Post subject: |
|
|
Hy aaffe,
I already spent some times reading and searching and you came with posts I never saw in my search results !!!
Thanks for all the good infos, I read them, well almost all whole threads which takes time, and understood some parts, those which was not too technical (e.g : "ROFL", "How are you", etc... )
I fail to configure many goto scripts for the editor I use, Scite4autohotkey, but finally find TillaGoto which worked first time.
Althought I had not used it yet as I hadn't tried to script much...
It's usefull, but is not what I searched for :
Imagine you made a script that you cannot call script, for neophytes you'll give it won't understand anything other than "this is a software".
Otherwise you'll must plan a 5 days intensive course about "Day one : bit, bites, bytes, lexical differentiation and the resultings headaches graduations in trying to approach catching their true meanings. Day Two : Programs, softwares, scripts, ...".
I think you catch the problem.
Then, as you better absolutly avoid to confuse them at any price,
you also created your script in such a way that,
to avoid a new 5 days course about "what is a hotkey",
when they use the script, you implemented a way,
a simple way for a user, not a scripter,
of showing a list of Hotkeys AND Hotstrings with their respectives actions at least for hotkeys
It is infact just the commands users have to use to make the script works,
so they won't have to know them in order to be able to use the script.
Maybe I missed it, but I didn't find it yet.
AutoHotkey is so full of possibilities that having this could really help in making scripts from it more usable for simple softwares users (like me ).
And also helps to widespread scripts more.
On the scripter side it should handle list creation and modifications automatically, not by hand. |
|
| Back to top |
|
 |
hutch@edge.net
Joined: 16 Sep 2008 Posts: 77
|
Posted: Mon Jun 22, 2009 6:55 pm Post subject: |
|
|
This script will show a list of hotkeys and hotstrings by pressing Ctrl+Z, or by right-clicking the "H" in your tray and selecting "Hotkeys List".
To use it, copy the following script to the top of your existing script, and add comments to show what each hotkey or hotstring does. I've left the comments in the script to make it easy to understand and edit. Let me know if you have any problems.
| Code: |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
;*******************************************************************************
; Extract a list of Hotstrings and Hotkeys from this script and display them
;*******************************************************************************
KeyList:
AutoTrim,off
Loop,Read,%A_ScriptFullPath%
{
Line=%A_LoopReadLine%
; Only show lines that contain double semicolons
IfInString,Line,`;`;
{
StringLeft,C2,Line,2
; Insert blank or comment lines (start with double semicolon)
IfEqual,C2,`;`;
{
StringTrimLeft,Desc,Line,2
KeyList=%KeyList%%Desc%`n
Continue
}
; Insert Hotkeys and Hotstrings (must contain double colon)
IfInString,Line,`:`:
{
; Extract description (after last semicolon)
StringSplit,Desc,Line,`;`:
StringTrimLeft,Desc,Desc%Desc0%,0
; If description is blank, use command or hotstring text instead
If Desc=
{
EnvSub,Desc0,2
StringTrimLeft,Desc,Desc%Desc0%,0
}
; Extract keys
StringSplit,Keys,Line,`:
; Hotstrings (start with double colon)
IfEqual,C2,`:`:
{
Keys=%Keys3%
IfEqual,Desc,,SetEnv,Desc,%Keys5%
}
; Hotkeys (start with anything else)
Else
{
StringReplace,Keys,Keys1,#,Win-
StringReplace,Keys,Keys,!,Alt-
StringReplace,Keys,Keys,^,Ctrl-
StringReplace,Keys,Keys,+,Shift-
StringReplace,Keys,Keys,`;,
}
; Add to the list
; Make keys 15 long with trailing spaces to keep the list neatly formatted
Keys=%Keys% !
StringLeft,Keys,Keys,15
Desc=%Keys% %Desc%
KeyList=%KeyList%%Desc%`n
; Keep track of longest line to set window width later
StringLen,Len,Desc
If Len > %MaxLen%
MaxLen = %Len%
}
}
}
; Now show the list
EnvMult,MaxLen,8.0 ; pixel width of 1 character
EnvAdd,MaxLen,20 ; + 2 x 10 pixel margins
StringTrimRight,KeyList,KeyList,1
; Sort, KeyList, P16 ; sort the comments
Progress, M2 C00 ZH0 FS10 W%MaxLen%,%KeyList%,,Hotkeys and Hotstrings list,courier new
KeyList=
MaxLen=
;****************************************************
;Add the List to the AHK Menu
;****************************************************
Menu,Tray,Add,Hot&keys list,KeyList
Menu,Tray,Default,Hot&keys list
Return
;****************************************************
;Add Hotkeys and Hotstrings Below
;****************************************************
;; HotKeys
^Z:: ;;Show This List
GoSub KeyList
KeyWait, z
Progress, off
return
;;
;; Global HotStrings (Will work in any program)
::me2::anyone@anywhere.com ;;Quickly enter your email address. |
|
|
| Back to top |
|
 |
awannaknow
Joined: 14 Jun 2009 Posts: 324
|
Posted: Tue Jun 23, 2009 8:00 am Post subject: |
|
|
| hutch@edge.net wrote: | This script will show a list of hotkeys and hotstrings by pressing Ctrl+Z, or by right-clicking the "H" in your tray and selecting "Hotkeys List".
To use it, copy the following script to the top of your existing script, and add comments to show what each hotkey or hotstring does. I've left the comments in the script to make it easy to understand and edit. Let me know if you have any problems.
|
Thank you hutch@edge.net,
Works perfectly, like an other one that I found displaying tooltip instead of msgbox, this one is great too.
I received a lot of help thru my asking, thanks to all of the members.
As I hadn't found an automatic way of doing it I conclude it isn't possible.
Anyway I'll use the ones that I discovered thru members help. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|