Page 1 of 1
Change focus?
Posted: Thu May 22, 2008 10:15 am
by 3cmSailorfuku
I haven't found any useable function in the micromacro documentation, so I wonder if theres a function to change the current focus, like focusWindow("Mozilla Firefox");.
Re: Change focus?
Posted: Thu May 22, 2008 3:26 pm
by Administrator
Great idea. I've added this and uploaded it to the main page (built with LuaCoco -- since it appears stable enough).
The function is showWindow(window, command)
Where window is obtained with findWindow(), and command is one of the following:
- sw.show -- activate (show and set focus to) the window
sw.shownormal -- activate and restore to original size and position
sw.hide -- hide the window
sw.forceminimize -- forcefully minimize (also hides the window)
sw.minimize -- minimize the window
sw.maximize -- activate and maximize the window
sw.restore -- activate the window and restore to original size and position (used after minimizing)
Re: Change focus?
Posted: Wed Jan 29, 2014 7:37 am
by lolita
i was searching forum, but didnt find,
so is there comand for set window size and position?
Re: Change focus?
Posted: Wed Jan 29, 2014 9:15 am
by lisa
for MM you can use
Code: Select all
setConsoleAttributes(Width,Height)
values are in characters, so if you do 40,40 it won't look like a square because characters are taller than they are wide.
For any window you can use this for its position
setWindowPos(window, wx, wy, ww, wh, t)
info on it here
http://www.solarstrike.net/wiki/index.p ... wPos.28.29
Re: Change focus?
Posted: Thu Jan 30, 2014 4:42 am
by lolita
thanks