AutoHotkey Community

It is currently May 26th, 2012, 8:52 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: June 18th, 2009, 1:08 pm 
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]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 18th, 2009, 2:02 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Did you try
Code:
ListHotkeys

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 18th, 2009, 2:03 pm 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 18th, 2009, 2:03 pm 
Offline

Joined: June 28th, 2007, 1:08 am
Posts: 662
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"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2009, 3:55 am 
Offline

Joined: June 14th, 2009, 7:48 pm
Posts: 331
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 June 19th, 2009, 4:43 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2009, 3:58 am 
Offline

Joined: June 14th, 2009, 7:48 pm
Posts: 331
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 June 22nd, 2009, 8:22 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2009, 4:46 am 
Offline

Joined: June 14th, 2009, 7:48 pm
Posts: 331
HotKeyIt wrote:
Did you try
Code:
ListHotkeys

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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2009, 8:19 am 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2009, 8:22 am 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
Hy awannaknow,
you could use something like this instead:
http://www.autohotkey.com/forum/viewtop ... otkey+list

or I think this is what you want:
http://www.autohotkey.com/forum/viewtop ... otkey+list

or you use ActiveGoto, thats for PSPad, which editor I prefer:
http://www.autohotkey.com/forum/viewtop ... otkey+list
Greets, aaffe


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2009, 8:45 am 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
Here´s another one:
http://www.autohotkey.com/forum/viewtop ... otkey+list


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2009, 12:48 pm 
Offline

Joined: June 14th, 2009, 7:48 pm
Posts: 331
Hy aaffe,

I already spent some times reading and searching and you came with posts I never saw in my search results !!! :o

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... :lol: )

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 :

:) :lol: :wink:
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, ...".
:) :lol: :wink:
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 :oops: ).
And also helps to widespread scripts more.
On the scripter side it should handle list creation and modifications automatically, not by hand.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2009, 7:55 pm 
Offline

Joined: September 16th, 2008, 7:53 pm
Posts: 77
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 23rd, 2009, 9:00 am 
Offline

Joined: June 14th, 2009, 7:48 pm
Posts: 331
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, coinman, oldbrother and 60 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group