My end goal is to capture the file name of the document that is open in Acrobat. I know that I can get it from the Window Title and parse out the line (I have been doing that) However, if the Child window is not maximized the file name does not dispaly in the window title bar. Therefore my though was to maximize the child window first.
Since it dosn't work I am missing something.
I though that if I set the focus to Acrobat, then the child window then maximize it would work.
Let>WF_TYPE=0
SetFocus>Adobe Acrobat Professional*
Let>WF_TYPE=3
SetFocus>.pdf*
GetActiveWindow>window_title,x,y
WindowAction>1,%window_title%*
Anyone know what I am missing?
Maximize Child Window
Moderators: JRL, Dorian (MJT support)
Ahh this took a little testing but I see the problem;
... -> WindowAction>1,%window_title%*
In this case, your %window_title% is the parent window (ie, it says "Adobe Acrobat Professional").
Normally this would cause your main acrobat window to maximize... but because you have WF_TYPE=3 (child windows only), this doesn't happen.
(It doesn't maximize the child window, because you're asking to maximize the window that says "Adobe Acrobat Professional", and not one that says "something.pdf".)
What you probably want, is something more like this;
IfWindowOpen>.pdf*
Let>WF_TYPE=3
WindowAction>1,.pdf*
Endif
Which will maximize the first found child window in any application that has the text ".pdf" somewhere in the window title.
... -> WindowAction>1,%window_title%*
In this case, your %window_title% is the parent window (ie, it says "Adobe Acrobat Professional").
Normally this would cause your main acrobat window to maximize... but because you have WF_TYPE=3 (child windows only), this doesn't happen.
(It doesn't maximize the child window, because you're asking to maximize the window that says "Adobe Acrobat Professional", and not one that says "something.pdf".)
What you probably want, is something more like this;
IfWindowOpen>.pdf*
Let>WF_TYPE=3
WindowAction>1,.pdf*
Endif
Which will maximize the first found child window in any application that has the text ".pdf" somewhere in the window title.
Maximize child pdf
Thank you, this appears to do the trick
Let>WF_TYPE=0
SetFocus>Adobe Acrobat Professional*
Wait>.2
Let>WF_TYPE=3
IfWindowOpen>.pdf*
SetFocus>.pdf*
WindowAction>1,.pdf*
Wait>.2
Endif
GetActiveWindow>window_title,x,y
MDL>%window_title%
Let>WF_TYPE=0
SetFocus>Adobe Acrobat Professional*
Wait>.2
Let>WF_TYPE=3
IfWindowOpen>.pdf*
SetFocus>.pdf*
WindowAction>1,.pdf*
Wait>.2
Endif
GetActiveWindow>window_title,x,y
MDL>%window_title%