Help maximizing SunAwtFrame? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Help maximizing SunAwtFrame?

24 Mar 2017, 14:40

Thanks in advance, this is driving me nuts. I've tried SO and the docs, but this appears to be Java/Swing/AWT related and I haven't found any reports of solutions to similar problems.
Some links I've checked without finding a solution:
https://www.autoitscript.com/forum/topi ... utomation/
http://stackoverflow.com/questions/1756 ... autohotkey
(Brett Banks mentioned a hack that worked, but I couldn't find it)
https://github.com/russelldavis/AutoHot ... Hotkey.ahk
http://dsss.be/w/autohotkey_recipes
WollMux is a templating and document automation app that the City of Munich uses. Although it's mostly Linux, it runs on windows.
Here I have a LibreOffice 5.2 setup with the WollMux.oxt added. Everything works on the script below except I cannot for the life of me get the
"FormularMax 4000" window to maximize with AHK. You can see what I've tried commented out.
All help deeply appreciated.
Spoiler
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Help maximizing SunAwtFrame?  Topic is solved

24 Mar 2017, 16:53

I hate to be that guy, but your script works absolutely fine here.

I tried the following and it maximises FormularMax 4000 fine:

Code: Select all

#NoEnv

#If ((active_id := WinExist("FormularMax 4000 ahk_class SunAwtFrame")))
^1::
WinActivate, ahk_id %active_id%
WinMaximize, ahk_id %active_id%
#If
return
Are you running LibreOffice elevated?
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Re: Help maximizing SunAwtFrame?

24 Mar 2017, 17:51

Thanks, qwerty12 (oder sollte ich 'Vielen Dank' sagen, wenn Du FormularMax 4000 brauchst?) ;)

I copied your code verbatim and it worked: once.
Thereafter, nothing.

Obviously I've got something else running that's creating a conflict.
I changed my hotkey from ^Numpad1, because it turned out that was changing the heading style in LO!

I'll keep trying, and thanks again!

p.s. Tried again, changed the hotkey to !f1. It worked the first time, thereafter nothing. I am totally flummoxed.
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Help maximizing SunAwtFrame?

24 Mar 2017, 18:13

burque505 wrote:(oder sollte ich 'Vielen Dank' sagen, wenn Du FormularMax 4000 brauchst?)
Sadly not...
Obviously I've got something else running that's creating a conflict.
I'm sorry, my actual hotkey knowledge is pretty poor. I installed LO 5.2.6 x86_64 (64-bit JRE installed here) and WollMux manually thinking some workaround would be needed 'cause Java, but everything works out of the box - if FormularMax 4000 (what a name) is minimised, pressing Ctrl+1 brings it out of its slumber and maximises the window. Pretty much the same happens if the window is around, normal-sized but just not activated. Hopefully, you'll figure out what's up or someone who actually knows what they're talking about chimes in, because no reason is coming to mind as to why it would only activate once...
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Re: Help maximizing SunAwtFrame?

25 Mar 2017, 16:08

:headwall: Thanks again, qwerty12. You mentioned running elevated, but it didn't occur to me that I might not be running AHK elevated! :facepalm:
LO is set to run elevated always.
Now, of course, everything works great.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: scriptor2016 and 345 guests