Git Product home page Git Product logo

autohotkeydocs's People

Contributors

a-raccoon avatar animan8000 avatar awunes avatar fincs avatar g33kdude avatar hammadsheikh avatar helgeffegleh avatar hoppfrosch avatar icc2icc avatar iphilip avatar jerrylususu avatar joedf avatar julesverneongithub avatar kaovilai avatar kyklish avatar laoujin avatar lexikos avatar mmikeww avatar nnnik avatar ragnar-f avatar salzkartoffeeel avatar sebastianhelm avatar stevoisiak avatar tac109 avatar thebestpessimist avatar theharmonicrealm avatar uberi avatar westoncampbell avatar ystaggl avatar zachpoblete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autohotkeydocs's Issues

Directly contacting Lexikos

Hi Lexikos,

don't know whether you read this: How can I contact you directly?

I want to discuss with you a little about current documentation. I'm willing to do a few "basic" enhancements on documentation and just want to be sure that my desired changes might be in your sense before doing all the work with risk to be rejected ...

Changes might include:

  • Using consistent inline code formatting (All inline code should be formatted using homogenous formatting (for example tag for HTML)
  • Own page for "WinTitle" (Own page for "WinTitle" or better restructured "Last Found Window" page. As "WinTitle" is a parameter which is used by quite a few functions it deserves an own page, including examples.Doing this all functions having WinTitle as Parameter should refer to this new page. Redundant information on those function documentation pages should be removed or at least homogenized (each of those pages has a quite lengthy, redundant documentation on WinTitle)
  • ...

Further changes might arise ...

I've set up a Trello-Board on Documentation-Rewrite Project (https://trello.com/board/documentation-rewrite/4ff142712c442e040466599d), already containing some basic questions and some ideas on what could be enhanced ,,,, (already invited Lexikos for discussion ...)

Code indentation

Some of the example code in the v2 branch (e.g. Gui.htm) is indented with only two spaces. I have no problem with someone using this as their personal style, but in the documentation four spaces should be used.

@Ragnar-F, some of this was introduced by commit 3c1f901, but not all.

The Gui examples also contain some & which should be &.

v2: BlockInput - undefined variables ON and OFF

AHK-V2 Documentation

Command: BlockInput (page: commands\BlockInput.html)

Current documentation:

Mode
1: One of the following words:
On or 1 (true): The user is prevented from interacting with the computer (mouse and keyboard input has no effect).
Off or 0 (false): Input is re-enabled.

Issue

Neither On nor Off are defined within AHK V2 (or at least they are not accessible within BlockInput)

Solution:

Just use:

Mode
1: One of the following words:
True (1): The user is prevented from interacting with the computer (mouse and keyboard input has no effect).
False (0): Input is re-enabled.

Search > WinSet v2 Broken Links

If you search for "WinSet" or "WinGet" in the v2 docs, many of the links that appear in the search pane are broken and take you to an error page. This is because they are still pointing to WinSet.htm and WinGet.htm which no longer exist.

Erroneous link on docs/AHKL_DBGPClients.htm

Download link to notepad++-dbgp plugin within page docs/AHKL_DBGPClients.htm - chapter "Notepad++ DBGp Plugin" points to page which no longer exists

--> Provide a corrected link!

View Menu

View -> Content, Index, Search, (and Favorites?) all cannot be manually selected.

[docs] parentheses around command parameters

The definition (yellow box) for the following commands, doesn't show parentheses around the parameters, but the examples at the bottom of the page uses parentheses.

https://lexikos.github.io/v2/docs/commands/ClipWait.htm
https://lexikos.github.io/v2/docs/commands/ComObjConnect.htm
https://lexikos.github.io/v2/docs/commands/ControlSetStyle.htm
https://lexikos.github.io/v2/docs/commands/ControlSetText.htm
https://lexikos.github.io/v2/docs/commands/DriveEject.htm
https://lexikos.github.io/v2/docs/commands/DriveLock.htm
https://lexikos.github.io/v2/docs/commands/DriveSetLabel.htm
https://lexikos.github.io/v2/docs/commands/DriveUnlock.htm
https://lexikos.github.io/v2/docs/commands/ImageSearch.htm
https://lexikos.github.io/v2/docs/commands/OnClipboardChange.htm
https://lexikos.github.io/v2/docs/commands/OnExit.htm
https://lexikos.github.io/v2/docs/commands/PixelSearch.htm
https://lexikos.github.io/v2/docs/commands/ProcessSetPriority.htm
https://lexikos.github.io/v2/docs/commands/WinSetTitle.htm
https://lexikos.github.io/v2/docs/commands/WinWait.htm
https://lexikos.github.io/v2/docs/commands/WinWaitActive.htm
https://lexikos.github.io/v2/docs/commands/WinWaitClose.htm

And the command: https://lexikos.github.io/v2/docs/commands/NumGet.htm
has parentheses in the definition, but NumPut doesn't:
https://lexikos.github.io/v2/docs/commands/NumPut.htm

https://lexikos.github.io/v2/docs/objects/Object.htm#RawSet
doesn't show parentheses but the other obj commands on the same page do.

The definitions for some commands are shown both with and without parentheses:
https://lexikos.github.io/v2/docs/commands/Gosub.htm
https://lexikos.github.io/v2/docs/commands/Goto.htm

so maybe parentheses are optional for some commands.

double reference vs double-deref

Language.htm says:

The most common form of dynamic variable reference is called a double reference or double-deref.

Shouldn't that be called a double dereference?

OnMessage

Can we add another comment to the Sender.ahk Example? Specifically the line:

SendMessage, 0x4a, 0, &CopyDataStruct,, %TargetScriptTitle% ; 0x4a is WM_COPYDATA. Must use Send not Post.

Recently I needed to extend the timeout past the default (which I think is 5 seconds) for the child script to complete an operation before returning errorlevel to the master. Took a long time and someone else's example to find out that you could indeed set a timeout instead of the default. So I thought it might be helpful for other users.
Obviously word it however you like but I thought perhaps something like this:

SendMessage, 0x4a, 0, &CopyDataStruct,, %TargetScriptTitle%,,,,%Timeouttime% ; 0x4a is WM_COPYDATA. Must use Send not Post.

and maybe on a line before that something like:

Timeouttime = 5 ; Time to wait in seconds for Receiving script to return errorlevel

New Docs sidebar style needs adjustments for High DPI

I have attached a screenshot. The 'Select code" and "download code" buttons are also tiny.
AEI System info:

AutoHotkey : 			v1.1.27.07 Unicode 64-bit (Installed)
SystemModel : 			Precision 5510
SystemCPU : 			Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
SystemGPU : 			Intel(R) HD Graphics 530 v22.20.16.4836 @ 1024.00 MB RAM
SystemType : 			x64-based PC
SystemRAM : 			16204 MB
SystemOS : 				10.0.16299 64-bit  v10.0.16299 (WIN32_NT)
SystemUptime : 			3 days 9 hours 3 mins 33 seconds
SystemLocale : 			en-CA (0x0409)
SystemScreen : 			4800x2700 (240 DPI)
A_AhkPath : 			C:\Program Files\AutoHotkey\AutoHotkey.exe
Ahk_CompilerPath : 		C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe
Ahk_WindowSpyPath : 	C:\Program Files\AutoHotkey\AU3_Spy.exe
MPRESS_IsPresent : 		0 (false)

Screenshot:
2018-01-30_10-03-25

Endless refresh loop on Windows

I'm posting this for my dad who doesn't have a GitHub account:

Dear Autohotkey,

The documentation page of autohotkey.com can not be loaded on a Windows machine. It gives trouble on IE, FF and Chrome. On any other platform Android, Linux, MacOS, the site loads normal[ly].

He showed me the problem: when he goes to autohotkey.com on a Windows laptop and clicks the Documentation link on top, the resulting page just keeps refreshing endlessly. He said the problem also occurred on the Windows computer he has at work. I hope you'll be able to reproduce the problem; let me know if you can't.

Ambiguous phrasing in Library list on Functions page

Reference: https://autohotkey.com/docs/Functions.htm#lib

The list of libraries has:

%A_ScriptDir%\Lib\  ; Local library - requires [v1.0.90+].
%A_MyDocuments%\AutoHotkey\Lib\  ; User library.
path-to-the-currently-running-AutoHotkey.exe\Lib\  ; Standard library.

but shouldn't that third line be something like:

directory-of-the-currently-running-AutoHotkey.exe\Lib\`  ; Standard library.

or even:

% StrReplace(A_AhkPath, "AutoHotkey.exe", "Lib\") ; Standard library

EDIT: Apologies, I just now noticed the Docs suggestions on the forum. I'd delete this if I could but otherwise I'll be posting these sorta things there because filing an issue on Github doesn't seem like the better way to go about it.

Propose New Logo

Hello, Im graphic designer. I want to submit new logo for your project: AutoHotkey_L, I've see your master repo and didn't see Issues tab, so I come here.

May I? Dont think about anything, this is free. :)

KeyWait page

I'm not professional AHK programmer, but from my point of view, at least one example in KeyWait page is misleading, because:

Yeah, I've heard of this mistake being made before... perhaps the docs need to have a note in there about how it waits for the key to be in the up state, rather than an up action. - camerb (moderator)

https://autohotkey.com/board/topic/66488-keywait-not-waiting/

Here is current example from docs:

~CapsLock::
  KeyWait, CapsLock ; Wait for user to physically release it.
  MsgBox You pressed and released the CapsLock key.
return

In the example above, we could use any key in the KeyWait line, and it will not change anything. Here it is:

; Press CapsLock and you will see message box, despite you have "keywait, z"
~CapsLock::
  KeyWait, z ; Wait for user to physically release it.
  MsgBox You pressed and released the CapsLock key.
return

And here is my own example. From my point of view, it's correct and not misleading:

keyWait, lButton, d
keyWait, lButton
soundBeep, 300, 300
return

I don't sure, though.

Add "Improve this page on GitHub" button

One of my favorite features of Travis CI's online documentation is a small button on every page that allows readers to easily suggest improvements to the current page on GitHub.

Improve this page on GitHub

I would like to suggest a similar button be added to the documentation for AutoHotkey.

untitled

I believe that adding a "edit on GitHub" button would make the process of contributing to AHK much simpler for new potential contributors.

Error in Docs/Code

Hi,

At the end of documentation page:
https://autohotkey.com/docs/commands/SetNumScrollCapsLockState.htm
It is written:
"Remarks
A key can also be toggled to its opposite state via the Send command; for example: Send {CapsLock}."

This does not work with AHK v 1.30.0.0.

The following file swaps LCtrl with CapsLock and tries to circumvent Windows' dirty hardcoded mapping of AltGr to LControl+RAlt.

As the code does not behave similarly with Send {CapsLock} or with manual toggling of CapsLock status, there's a bug either in the code or the documentation...

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

CalledFromRWin := 0

; Disable AltGr
LControl & RAlt::

; Simulate AltGr on RWin
RWin::
  CalledFromRWin := 1
  Send, {LControl down}{RAlt down}
  Sleep 500
  Send, {RAlt up}{LControl up}
  CalledFromRWin := 0
  Return
  
; Swap LCtrl & CapsLock
CapsLock::LCtrl
LControl::
  ;MsgBox, "%CalledFromRWin%"
  If (CalledFromRWin == 0) {
	Send {CapsLock}  ;;;; <--- using this DOES NOT work, but following lines DO!
	;if GetKeyState("CapsLock", "T") = 1 {
	;	SetCapsLockState, off
	;} else if GetKeyState("CapsLock", "T") = 0 {
	;	SetCapsLockState, on
	;}
  }
  Return

Edit isense link

The edit command page has a link to isense which is outdated (code works only for Basic)
https://github.com/Lexikos/AutoHotkey_L-Docs/blob/9572b8ace07551af86fe1af1b6ee79beaaad17d9/docs/commands/Edit.htm#L20

It could either be replaced by a global link to the Editors section saying something like

Various scripts to assist with writing code in any editor are available in the Editor section of the forum.

or you could list two specific scripts:

Insert AHK Command/Function Parameters (with Search/Auto-Complete)
https://autohotkey.com/boards/viewtopic.php?f=60&t=31484

[Hotstrings] Expand parameters for AHK's functions, commands and directives.
https://autohotkey.com/boards/viewtopic.php?f=60&t=27882

while %x% different from while % x or while x

if %x% msgbox %x% while %x% are easily confused with poor consistency

Not mentioned in the document (except for Changes & New Features).

example 1

qq=4

q::
while %qq%
{
qq -=1
msgbox %qq%
}
return

example 2

qq=4

q::
if %qq%
{
qq -=1
msgbox %qq%
}
return

example 3

qq=4

q::
while % qq
{
qq -=1
msgbox %qq%
}
return

example 4

qq=w
w=5
q::
while %qq%
{
qq -=1
msgbox %qq%
}
return

example 5

qq=w
w=5
q::
while % qq
{
qq -=1
msgbox %qq%
}
return

~= shorthand mention on regexmatch page

Shouldn't the shorthand be also mentioned on the Regexmatch page. Or maybe take the shorthand description to this page. Maybe just a simple link and a sentence where it's currently mentioned.

Docs are broken in Firefox with some addons

Hi,

your docs page looks very broken to me in firefox:
image

I traced the issue down to this code line:

https://github.com/Lexikos/AutoHotkey_L-Docs/blob/788afdd15ba0161270c01b7f09e8640efbf0b0a9/docs/static/content.js#L42

If I execute document.scripts in the firefox debugger, i get this result listing:

document.scripts
[…]
0: <script id="custom-useragent-string" type="text/javascript">
1: <script src="static/content.js" type="text/javascript">
2: <script type="text/javascript" src="/source/data_translate.js">
3: <script type="text/javascript" src="/source/data_toc.js">
4: <script type="text/javascript" src="/source/data_index.js">
5: <script type="text/javascript" src="/source/data_search.js">
"custom-useragent-string": <script id="custom-useragent-string" type="text/javascript">

The extension in question is custom-useragent-string but I guess there might be other extensions which would break your script code:

var scriptDir = document.scripts[0].src.substr(0, document.scripts[0].src.lastIndexOf('/'));

I think a fix might be easily possible but I do not have the picture, why you are using this approach and why you need scriptDir at all.

Is there a way to disable highlighting the searched word?

Good evening

We usually do not search for a specific string which should be highlighted,
but for an AutoHotkey command man page.
Therefore, we just search for e.g. clip and then to click on Clipboard.

Then, the result is very annoying: it feels like every 3rd word is partially highlighted which massively reduces the readability.

Therefore, we always manually delete the search word and reload the page, so that it looks and reads perfectly.

Therefore the question: is there a way to search for AutoHotkey commands without having everything highlighted in the result?

Thanks a lot for this great piece of software!

It's very hard to write scripts because of the non-intuitive syntax for the variable handling,
but after spending much time for try and error, the result is always great and gives amazing feedbacks :-)

v2: Menu content vs Gui content

First of all: Nice changes regarding the new menu object. Thanks.

But when it comes to documentation, I notice a discrepancy in the content separation of commands/Menu.htm compared to the content separation of commands/Gui.htm.

Currently, commands/Menu.htm has been split to objects/Menu.htm and commands/MenuCreate.htm, while commands/Gui.htm has been split to objects/Gui.htm, objects/GuiControl.htm and commands/GuiCreate.htm.

So far so good, but:

  • objects/Menu.htm contains the documentation about its object members, win32 menus, remarks, related, examples
  • commands/MenuCreate.htm contains only the documentation about itself

Compared to:

  • objects/Gui.htm and objects/GuiControl.htm contain only the documentation about their object members
  • commands/GuiCreate.htm contains the documentation about itself, keyboard navigation, window appearance, general remarks, related, examples

We should only choose one direction. I think that a better overview is given if commands/MenuCreate.htm contains the documentation about win32 menus, remarks, related and examples, while objects/Menu.htm focuses only on its object members, as it is already the case with the other objects/ pages.

If (Expression)

Suggestion: Including a remark that If (Expression) is case insensitive. To make it case sensitive see StringCaseSense

Thanks! Jules

Toolbar Icons on Smaller smartphones

Haven't looked at the docs for a while... Nice work with the settings. 👍
What is the minimum targeted width (iPhoneSE/5 is 320px)? The icons overflow onto the documentation content area.
A simple fix would be to add a conditional css style like so (without affecting the current style too much):

@media screen and (max-width: 343px) {
    #head .h-tools ul {
        width: 3.25em;
    }
}

Another minor issue on mobile phones is that the icons get shoved behind the side-menu when it is opened. Part of the gear icon is visible floating on the documentation content area. Possibly, to get around this, a display:none; could be added to .h-tools > .main and .h-tools > .online.

Screenshot

2018-05-26_091538

Menu/MenuBar Object - Delete method

The Delete method states:

Deletes a menu item or all custom menu items.
If MenuItemName is omitted, all custom menu items are deleted from the menu, leaving the menu empty unless it contains the standard items.

However, calling A_TrayMenu.Delete() does delete all standard menu items. I'm not sure on how best to reword it but wanted to bring it up.

Menu/MenuBar Object

ISO-8859-1 vs UTF-8

The docs is currently using "ISO-8859-1" instead of "UTF-8". Is there a particular reason for this?
Currently the docs' search box does not work because the key name mört within var SearchIndex (near "mywindowtitle") is being loaded as mört instead in this file . This flags an invalid character error, and so on:

SyntaxError: illegal character @ data_search.js:1:157034
ReferenceError: SearchIndex is not defined @ content.js:111:7

I have double checked that the files on the server are encoded as UTF-8 without BOM (content.js is ASCII since there are no unicode chars used).

'Up' hotkeys

Do 'Up' hotkeys use the keyboard hook?

I ask because it doesn't look like the Send command triggers them:

var := 0
a up::
   var++
   tooltip, % "var=" var
   if (var > 0)
      Send, {a up}
return

That hotkey does not recursively trigger itself. However, if you change both the Definition and the Send command to both use a instead of a up, then the hotkey does trigger itself.

If 'Up' hotkeys do use the hook, I think that note should be added to the docs in the 'Up' block:

https://autohotkey.com/docs/Hotkeys.htm

And if so, does that mean a corresponding normal/down hotkey also uses the hook if it were defined in the same script?

Error KB927917 on XP/IE8 when navigating via Go -> Home/URL

HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

This error appears when one uses Go -> URL... or Home Page on XP/IE8. I'm guessing that it is due to the IE version, not the OS version.

The error dialog shows line 0, and seems to appear after the script executes, not during. I was unable to determine which part of the code causes it.

@Ragnar-F, can you look into this?

If you do any testing, pull down commit 7a05237 first.

Incorrect GlobalFree return type.

The manual page for RegisterCallback contains the following snippet of code:

DllCall("GlobalFree", "Ptr", Address)

However, MSDN defines GlobalFree as follows:

HGLOBAL WINAPI GlobalFree(
  __in  HGLOBAL hMem
);

HGLOBAL is a HANDLE, which is of type Ptr. I suggest the RegisterCallback snippet be updated as follows:

DllCall("GlobalFree", "Ptr", Address, "Ptr")

Poor performance on load due to addEventsForListBoxItems()

When profiling the docs in devtools you can see ~450ms is spent on assigning event listeners, 99.9% of which won't be used 99.9% of the time the docs are used either online or in a local help file.

image

I guess the proper solution is to use event delegation and attach the listeners to just one parent element, however even postponing via setTimeout would greatly improve the initial responsiveness of all help pages, which is especially important in the local help file where the initial delay is really noticeable compared to all other standard CHM files even on a superfast 4GHz i7 PC.

data_search.js not up-to-date

This applies to both online and offline help. For example, when searching for "concepts", the new page "Concepts and Conventions" will not be found. Maybe you should adjust your release preparing script to run build_search.ahk beforehand (or something like that).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.