Hello Everyone,
Two things.
I am trying to find a reference on Microsoft for LibFunc with no luck. Please share the link if you have or know it.
And could someone give me an example of minimizing a window using LibFunc? I know I've used it, and I seached my macros, with no luck. I know it's IsWindowIconic or something of that nature. And then some other function to actually min/max the window.
I have this macro I wrote. I use the stand-alone script editor. When the macro runs, I have it wait 10 seconds, so I can minimize the editor before it starts to do it's thing. I want to eliminate that need.
I am trying to not have to automate the command. Ya' know....mousemove here, click that and such. I tried WindowAction. I don't think it can do it to itself.
So I guess what I am saying is I really, really, really want to use LibFunc for this.
Thanks in advance for helping,
PepsiHog
LibFunc Iconic Window
Moderators: Dorian (MJT support), JRL
LibFunc Iconic Window
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
- Grovkillen
- Automation Wizard
- Posts: 1023
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: LibFunc Iconic Window
Ok, you specifically asked for LibFunc but here's my take when I'm doing the same thing.
Code: Select all
GetActiveWindow>WINDOW_NAME,,,,,
Run>%SCRIPT_DIR%\Minimize.exe /TITLE="%WINDOW_NAME%"
//compile "Minimize.exe" with the following code...
//WindowAction>2,%title%
- Grovkillen
- Automation Wizard
- Posts: 1023
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: LibFunc Iconic Window
Here's your wish fulfilled
More found here: https://docs.microsoft.com/en-us/window ... showwindow
Code: Select all
Let>WIN_USEHANDLE=1
GetActiveWindow>strTitle,nXPos,nYPos,,
LibFunc>user32,ShowWindow,res,%strTitle%,2
- Grovkillen
- Automation Wizard
- Posts: 1023
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: LibFunc Iconic Window
And here's the iconic call you remembered:
https://docs.microsoft.com/en-us/window ... r-isiconic
Code: Select all
Let>WIN_USEHANDLE=1
GetActiveWindow>strTitle,nXPos,nYPos,,
//LibFunc>user32,ShowWindow,res,%strTitle%,2
LibFunc>user32,IsIconic,isMinimized,%strTitle%
If>isMinimized=0
MDL>Window is NOT minimized
Else>
MDL>Window is minimized
Endif>
Re: LibFunc Iconic Window
@ Grovkillen,
Thanks for the help. I was thinking it might come down to that. But wasn't expecting anyone(you) to provide the script. Simply because, as you said, I was asking for LibFunc. However, I am glad you did. I do not believe LibFunc would be able to do it either without being a separate script.
But I must give you props. I would have written the script for the task at hand, end of story. You, on the other hand, made it a tool by passing the window's name to it. It has given me the idea to create a folder with different tools like minimize.exe.
I actually saw your post last night. I didn't see the new posts until just now. I just logged in to thank you for the first script. Last night my eyes wouldn't stay open, so I planned to post this morning. I clicked the "post" button without looking.
Thanks for ALL the help. Did you by chance post the link? (Haven't really looked yet.)
PepsiHog
[edit] - Yep you did. Thanks for that.
[edit,edit] - LibFunc does work. Cool. You helped me on two fronts. I'll use LibFunc and create my tool folder. Thank you. Your awesome!
Thanks for the help. I was thinking it might come down to that. But wasn't expecting anyone(you) to provide the script. Simply because, as you said, I was asking for LibFunc. However, I am glad you did. I do not believe LibFunc would be able to do it either without being a separate script.
But I must give you props. I would have written the script for the task at hand, end of story. You, on the other hand, made it a tool by passing the window's name to it. It has given me the idea to create a folder with different tools like minimize.exe.
I actually saw your post last night. I didn't see the new posts until just now. I just logged in to thank you for the first script. Last night my eyes wouldn't stay open, so I planned to post this morning. I clicked the "post" button without looking.
Thanks for ALL the help. Did you by chance post the link? (Haven't really looked yet.)
PepsiHog
[edit] - Yep you did. Thanks for that.
[edit,edit] - LibFunc does work. Cool. You helped me on two fronts. I'll use LibFunc and create my tool folder. Thank you. Your awesome!
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
- Grovkillen
- Automation Wizard
- Posts: 1023
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact: