 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Da Rossa
Joined: 06 Dec 2007 Posts: 174
|
Posted: Tue Jul 22, 2008 1:26 am Post subject: Frame automatically moving |
|
|
Hi
is there a way to have my xplorer˛ (file manager used to replace Windows Explorer), that uses dual-panel layout, to move the position of the frame by hotkey but not using the the recorder to get the click, hold and drag to position X,Y? this is too inacurate.
Thanks! _________________ AHK is perfect. |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Tue Jul 22, 2008 6:30 am Post subject: |
|
|
ControlMove? _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
Da Rossa
Joined: 06 Dec 2007 Posts: 174
|
Posted: Tue Jul 22, 2008 10:51 pm Post subject: |
|
|
| engunneer wrote: | | ControlMove? |
Believe me, I'm sooo n00b that I don't even know what "control" means in the AHK world. I don't know:
- the precise definition of 'control' (the term)
- what's in common with all commands that have "control" as prefix, such as controlclick, controlget, controlfocus...
- what am I losing when it comes to efficiency in my script.
About the controlMove specifically, the documentation only says: | Code: | | Moves or resizes a control. |
So?  _________________ AHK is perfect. |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 311 Location: Calgary, AB, Canada
|
Posted: Wed Jul 23, 2008 12:15 am Post subject: |
|
|
Not sure if there is a post out there about how to read the documentation, so I'll try to give a quick explanation.
As an example, I'll use ControlMove.
Each page of the documentation starts with a quick explanation, then the syntax (proper way to use it) of the command.
| Code: | ControlMove Syntax:
ControlMove, Control, X, Y, Width, Height [, WinTitle, WinText, ExcludeTitle, ExcludeText]
Underneath the syntax is an explanation of each word in the syntax, but for this case, I'll just explain it so you can guess at it in the future.
1) ControlMove:
This is the name of the command. This is how the program knows what it's doing. In this case, the command is "ControlMove".
2) Control:
This is the command asking which control it's after. Window Spy (Comes with AHK) will tell you the name of the control, but in your case, I assume the frame probably has a name on it. Type that name in the control parameter.
3) and 4) X, Y:
The X and Y Axis Position where you would like the top left of the frame to move to. Use recorder and click where you want the top left of the frame, then copy/paste the click coords (Easiest way).
5) and 6) Width, Height:
If you want to change the size of the frame, tell it how large in pixels.
7) WinTitle:
Look at the name in the titlebar. I'm guessing it'll say something about "xplorer". This lets the script know which window it's working in.
8) WinText:
Some titles will have the same name, making it difficult to distinguish. Tell it some random text that is visible somewhere in the proper window, that the other windows aren't likely to have. (This isn't necessary most of the time.)
9) and 10) ExludeTitle, ExcludeText:
Name of the window or text in the window of a window you want the script to avoid. |
Easy enough, eh?
And by the way, a control is normally anything the user interacts with. TextBoxes, Buttons, RadioButtons, CheckBoxes, e.t.c... In your case, frames would be a control of the larger program "xplorer". |
|
| Back to top |
|
 |
Da Rossa
Joined: 06 Dec 2007 Posts: 174
|
Posted: Wed Jul 23, 2008 12:59 am Post subject: |
|
|
Thanks for your patience. I'm almost there.
The following is a copy of the contents inside the windowspy:
| Quote: | >>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
AutoHotkey @ C:\ # [Figuras @ D:\] - xplorer˛
ahk_class ATL:ExplorerFrame
>>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<<
On Screen: 664, 271 (less often used)
In Active Window: 668, 275
>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN: WTL_SplitterWindow22
Text:
Color: 0xEDE9EB (Blue=ED Green=E9 Red=EB)
>>>>>>>>>>( Active Window Position )<<<<<<<<<<
left: -4 top: -4 width: 1032 height: 716
>>>>>>>>>>>( Status Bar Text )<<<<<<<<<<
>>>>>>>>>>>( Visible Window Text )<<<<<<<<<<<
Barra de Unidade
Barra de Ferramenta
Pronto
Left pane settings
Right pane settings
>>>>>>>>>>>( Hidden Window Text )<<<<<<<<<<<
Left pane settings
Mini scrap settings
QuickViewer
thumbQV
>>>>( TitleMatchMode=slow Visible Text )<<<<
C:\Arquivos de programas\AutoHotkey
C:\Arquivos de programas\AutoHotkey
>>>>( TitleMatchMode=slow Hidden Text )<<<<
richQV
|
I was with the mouse on the frame (called splitter, as shown above in bold.) But it appears that there's a complication, look at the result, using the following test syntax:
| Code: | SetTitleMatchMode, 2
ControlMove, WTL_SplitterWindow22, 904, 295, 1, 1 , xplorer, , , |
as you can see, there is that bizarre new window apart, unclosable. I have to close the entire xplorer for it to go. _________________ AHK is perfect. |
|
| 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
|