LibFunc> questions

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

LibFunc> questions

Post by JRL » Tue Sep 11, 2007 6:42 pm

Hi all, (or Marcus... probably Marcus)
I have questions regarding Libfunc> and Windows APIs. I'm posting this in the General Discussion area because I'm looking for generalized answers.

In this example that causes a window to stay on top, there are a number of variables created in the script that are assigned numeric values and the sum of four of these is used by the libfunc> call. Specifically:
Let>SWP_NOSIZE=1
Let>SWP_NOMOVE=2
Let>SWP_NOACTIVATE=16
Let>SWP_SHOWWINDOW=64
How were these numeric values determined?

If you go to the Microsoft website and look up the SetWindowPos function, there are 15 other parameter values that could be set, do they all have numeric values also?

What do the numbers represent?

Thanks for any answers,
Dick

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Sep 11, 2007 7:10 pm

You need a copy of windows.h which is included in the platform SDK:
http://msdn2.microsoft.com/en-us/library/aa383750.aspx

Basically these flags are just integers and Microsoft gave them names so we didn't forget their values. The names are just global variables defined in the windows.h header file.

The API documentation refers to them by name.

Of course to use them in Macro Scheduler we need to know their value, so we have to look inside windows.h.

If you have a copy of Visual Studio or some other development environment installed you probably already have a copy.

If not download the SDK.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Sep 11, 2007 7:24 pm

Thank you Marcus.
Downloading the SDK, will let you know how it goes. :)


Edit:
For a great explanation of using the libfunc> function, see Marcus' blog entry:
Working with Windows API Functions







.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts