As I can read from the helpfile, the instruction CoordMode, ToolTip|Pixel|Mouse|Caret|Menu [, Screen|Window|Client]
can affect how ahk-program will handle windows.
If CoordMode is defined, at the beginning of the AHK scripts.
Will the setting even apply in all functions?
If CoordMode used in a function.
Will the settings apply to all other functions and also the main program?
(If I understand correctly, it is possible to change CoordMode, how many times anywhere in a program)
//Jan
CoordMode - How does it work?
Re: CoordMode - How does it work?
Yes, it will be in effect unless local overwritten in the function.Albireo wrote:If CoordMode is defined, at the beginning of the AHK scripts.
Will the setting even apply in all functions?
No only in the scope of the function.Albireo wrote:If CoordMode used in a function.
Will the settings apply to all other functions and also the main program?
Please excuse my spelling I am dyslexic.
Re: CoordMode - How does it work?
Thank you!
Re: CoordMode - How does it work?
Are you sure?Capn Odin wrote:No only in the scope of the function.
Code: Select all
#NoEnv
CoordMode, Mouse, Screen
MsgBox, 0, Current CoordMode Mouse, %A_CoordModeMouse%
Function()
MsgBox, 0, Current CoordMode Mouse, %A_CoordModeMouse%
ExitApp
Function() {
CoordMode, Mouse, Client
}
Re: CoordMode - How does it work?
I was sure at the time and it seems to be the case
Code: Select all
#Persistent
CoordMode, ToolTip, Screen
SetTimer, Test, 100
Test:
ToolTip, Something, 0, 0
return
x::Testfn("Screen")
z::Testfn("Client")
Testfn(str){
CoordMode, ToolTip, % str
}
Please excuse my spelling I am dyslexic.
Re: CoordMode - How does it work?
And yes it will, if the scope is the auto-execute section of the script (as shown by just me)Capn Odin wrote:No only in the scope of the function.Albireo wrote:If CoordMode used in a function.
Will the settings apply to all other functions and also the main program?
Re: CoordMode - How does it work?
Oh ok, didn't really read the example, sorry.
I always declare them in the auto-execute section, so I didn't think about this possibility.
I always declare them in the auto-execute section, so I didn't think about this possibility.
Please excuse my spelling I am dyslexic.
Re: CoordMode - How does it work?
When I test the program examples above, I got no result!
In which ahk version (Win OS 10?) is a_CoordModeMouse an variable? (not in mine version)
eample ToolTip doesn't work either
I think I understand the opportunities and the same reasoning and results should also apply to all other instructions as "SetKeyDelay" or "SetNumLockState" and so on.
In which ahk version (Win OS 10?) is a_CoordModeMouse an variable? (not in mine version)
eample ToolTip doesn't work either
I think I understand the opportunities and the same reasoning and results should also apply to all other instructions as "SetKeyDelay" or "SetNumLockState" and so on.
Re: CoordMode - How does it work?
Open the online help, navigate to CoordMode, look for Remarks, and find:
[v1.1.23+]: The built-in A_CoordMode variables contain the current settings.
Re: CoordMode - How does it work?
Thanks!
(I have an older version and nothing about that in the help file - and in your example A_CoordModeMouse....)
(I have an older version and nothing about that in the help file - and in your example A_CoordModeMouse....)
Who is online
Users browsing this forum: Dewi Morgan and 391 guests