AutoHotkey Community

It is currently May 27th, 2012, 1:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject:
PostPosted: January 9th, 2012, 12:19 am 
This is probably better for #IfWinActive

from docs/commands/_IfWinActive.htm
Code:
24c24
<   <dd><p>The title or partial title of the target window (the matching behavior is determined by <a href="SetTitleMatchMode.htm">SetTitleMatchMode</a> as set in the <a href="../Scripts.htm#auto">auto-execute section</a>). To use a window class, specify ahk_class ExactClassName (shown by Window Spy). To use a <a href="GroupAdd.htm">window group</a>, specify ahk_group GroupName. The <a href="../LastFoundWindow.htm#id">ahk_pid and ahk_id</a> keywords are also supported, but it is more common for #IfWin to use them indirectly via <a href="GroupAdd.htm">GroupAdd</a> (alternatively, use <a href="Hotkey.htm">&quot;Hotkey IfWin&quot;</a>). Finally, the search can be narrowed by specifying <a href="../LastFoundWindow.htm#multi">multiple criteria</a>. For example: <em>My File.txt ahk_class Notepad</em></p></dd>
---
>   <dd><p>The title or partial title of the target window (the matching behavior is determined by <a href="SetTitleMatchMode.htm">SetTitleMatchMode</a> as set in the <a href="../Scripts.htm#auto">auto-execute section</a>). To use a window class, specify ahk_class ExactClassName (shown by Window Spy). To use a <a href="GroupAdd.htm">window group</a>, specify ahk_group GroupName. The <a href="../LastFoundWindow.htm#id">ahk_pid and ahk_id</a> keywords are also supported, but it is more common for #IfWin to use them indirectly via <a href="GroupAdd.htm">GroupAdd</a> (alternatively, use <a href="Hotkey.htm">&quot;Hotkey IfWin&quot;</a>). To to specify a window by <a href="WinGet.htm">process name or path</a>, specify ahk_exe <em>Name.exe</em> or ahk_exe <em>FullPath</em>. Finally, the search can be narrowed by specifying <a href="../LastFoundWindow.htm#multi">multiple criteria</a>. For example: <em>My File.txt ahk_class Notepad</em></p></dd>


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 9th, 2012, 1:09 am 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
Ok, I sent that commit too. You can see it on the same page linked before.

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 9th, 2012, 10:25 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
maul.esel wrote:
Do you wish version information such as "as of v...", "requires AHK_L 42+", "since v..." etc. to be removed :?:
Yes.
Quote:
The docs on ClipboardAll say comparison requires a traditional if. I assume this has changed?
Yes. It does not require that which no longer exists. However, the comparison operators are still not supported. Workarounds can be written using the address-of operator.
Quote:
It's mentioned several times in the docs that UInt64's are not supported. Assuming this is still valid, would you mind to explain why?
Integers are stored as __int64, and therefore must be in the range supported by a signed 64-bit integer.
Quote:
Will A_IsUncode be entirely removed?
No, but A_IsUnicode will be.
Quote:
a small wish not worth an own post: I'd like DllCall-types to require quotes as every string in an expression.
That is a good suggestion, but this is not the place for it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 9th, 2012, 10:36 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Guest wrote:
these patches will introduce ahk_exe into the WinTitle parameter descriptions of all commands

I think that the current documentation for WinTitle lacks the proper structure to be an efficient reference. The "Other Usages" section of LastFoundWindow.htm is better, though a table would probably improve readability. Rather than documenting every mode of WinTitle in one big paragraph (or many big paragraphs), I think that each command should simply introduce the concept - a description of a window, including title and other criteria - and link to a page which more cleanly documents all of the different usages.

Perhaps the wording and other details can be discussed here before anyone makes more wide-sweeping changes.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2012, 1:49 pm 
Can we have separate pages for Gui sub-commands and Gui controls so that examples can be added for each usage? Currently the Gui page and the Gui control page are bit long.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2012, 2:07 pm 
Lexikos wrote:
Perhaps the wording and other details can be discussed here before anyone makes more wide-sweeping changes.

I was thinking about that actually, what a pita to update ;-) Perhaps there are other parameters too that would qualify, it would avoid repetition and make the documentation easier to maintain and easier to search (so when you do search for ahk_exe you don't get dozens of not so relevant pages)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2012, 8:02 pm 
Here is my attempt, replace all current wintitle paragraphs with something along these lines?
Quote:
WinTitle

Identifying the target window(s) by using one or more of following available methods: (partial) window title, class, unique ID number, process identifier (PID), window group or process name or path. [link(s) to more]

If omitted, the Last Found Window[link] will be used.

(The search can be narrowed by specifying multiple criteria. For example: My File.txt ahk_class Notepad)
the last sentence is in (italics) as it could be dropped although useful, but it is already implied by "one or more" in the first sentence.

Also, under "Related" SetTitleMatchMode should be listed as currently DetectHiddenWindows is.


Report this post
Top
  
Reply with quote  
PostPosted: January 10th, 2012, 8:10 pm 
Lexikos wrote:
3. The script showcase hasn't been updated.

I would suggest to remove the script showcase, most are outdated and surpassed by superior (my opinion) scripts already posted in the scripts & functions section so why update and already outdated script?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2012, 8:15 pm 
Lexikos wrote:
6. There are many inconsistencies caused by the (now obsolete) distinction between commands and functions.

Currently on each command page there is only the command syntax (the yellow block at the top of each page) like so:
Quote:
WinActivate [, WinTitle, WinText, ExcludeTitle, ExcludeText]

Shouldn't the function syntax be shown as well, perhaps like so:
Quote:
Command syntax:
WinActivate [, WinTitle, WinText, ExcludeTitle, ExcludeText]

Function syntax:
WinActivate[("WinTitle", "WinText", "ExcludeTitle", "ExcludeText")]

other option would be to show the Function syntax always as example 1

or should the function syntax become the standard and the command syntax left as an example?


Report this post
Top
  
Reply with quote  
PostPosted: January 10th, 2012, 10:44 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
Anonymous wrote:
I would suggest to remove the script showcase,
+1


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 10th, 2012, 11:13 pm 
Offline
User avatar

Joined: November 2nd, 2008, 4:23 pm
Posts: 2906
Location: 127.0.0.1
I'm a programmer, so when there's something that I want to use multiple times, I stick it in a function.

To apply that same logic to the documentation, the window-matching-criteria should be put in its own file/page. Each command that has a WinTitle or similar parameter should link to it. That way we can elaborate and provide specific examples without feeling like we use too much space on a lot of pages.

_________________
aboutscriptappsscripts
Any code ⇈ above ⇈ requires AutoHotkey_L to run


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 14th, 2012, 10:18 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Quote:
I would suggest to remove the script showcase,
I was going to do that, but there are at least two scripts which are linked from elsewhere in the documentation. One of them was the joystick test script.
Quote:
Also, under "Related" SetTitleMatchMode should be listed as currently DetectHiddenWindows is.
Okay. Which page are you talking about?
Quote:
Shouldn't the function syntax be shown as well
This has been discussed (I don't recall where) and the conclusion was that both syntaxes should be shown. However, I think that the labels "Command syntax:" and "Function syntax:" are unnecessary.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 14th, 2012, 11:02 am 
Lexikos wrote:
Quote:
Also, under "Related" SetTitleMatchMode should be listed as currently DetectHiddenWindows is.
Okay. Which page are you talking about?

The current WinTitle description reads:
Quote:
The title or partial title of the target window (the matching behavior is determined by SetTitleMatchMode)....

If you look at for example WinMove you have a Related heading linking to
Quote:
ControlMove, WinGetPos, WinHide, WinMinimize, WinMaximize, WinSet

IF you remove the SetTitleMatchMode from the short description you should add it to the list of Related commands.

Sometimes SetTitleMatchMode is already included in the Related commands, sometimes not. Not mentioned on these Win* pages:

WinGet
WinGetClass
WinGetPos
WinGetText
WinGetTitle
WinMaximize
WinMinimize
WinMove
WinRestore
WinSet
WinSetTitle


Another repetition

Although I don't think it is actually a problem: There is also a very repetitive sentence below the Remarks heading for many if not most Control* and Win* command pages:

Quote:
"Window titles and text are case sensitive. Hidden windows are not detected unless DetectHiddenWindows has been turned on."


This could be moved to the same page where you will describe the WinTitle parameter in detail. It also means that for some pages the DetectHiddenWindows command could be added to the Related commands if it is missing (sometimes it is, sometimes it isn't)


Report this post
Top
  
Reply with quote  
PostPosted: January 14th, 2012, 11:25 am 
Lexikos wrote:
Quote:
I would suggest to remove the script showcase,
I was going to do that, but there are at least two scripts which are linked from elsewhere in the documentation. One of them was the joystick test script.

Afaik there are four pages linking to example scripts:

WinLIRC in
- DllCall.htm
- OnMessage.htm

Context Sensitive Help in Any Editor in
- Edit.htm
--> should be removed as it can not be made to work without support files

JoyStick in
- GetKeyState.htm

Changing MsgBox's Button Names
- MsgBox.htm

My suggestion would be to include the "Changing MsgBox's Button Names" script as an example on the MsgBox page.

I can see some value in WinLIRC and Joystick Test Script, so perhaps these should be kept in but moved to a command / misc page OR better yet simply updated to the new syntax and them posted in a forum thread(*) and at some point simply linked to from the pages above where applicable.
(* Are there any plans yet for a AHK v2 only section here on the forum? If so an AHK v2 S&F section would be the logical place of course.)

Other scripts/threads mentioned are:

- NiftyWindows
- Screen Magnifier
- LiveWindows
- Mouse Gestures
- Context Sensitive Help in Any Editor
- Easy Window Dragging
- Easy Window Dragging -- KDE style
- Easy Access to Favorite Folders
- IntelliSense
- Using a Joystick as a Mouse
- On-Screen Keyboard (requires XP/2k/NT)
- Minimize Window to Tray Menu
- Numpad 000 Key
- Using Keyboard Numpad as a Mouse
- Seek
- ToolTip Mouse Menu
- Volume On-Screen-Display (OSD)
- Window Shading
- 1 Hour Software
- Titan's Scripts
- Toralf's Scripts
- Sean's Scripts
- SKAN’s Tips N Tricks
- Scripts & Functions Forum


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 1 guest


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:
cron
Powered by phpBB® Forum Software © phpBB Group