Sign in to follow this  
Followers 0
Rad

Making my own #Include UDF type things

4 posts in this topic

I want to know how to make these (unless this is hard, just say its to hard lol)...

I have a few ideas, and I have a few things I use on almost all my programs I could make a function for that would be alot easier. Kind of like my picture-button. It makes selected button control a picture, when you hover over it its a different picture, when you click on it its a different picture (for x seconds). I used this for minimize/maximize/close buttons when I made my own customized window

Theres a few more, but yeah... how do these work? Are they just like normal Funcs that are added when you use #Include?

If they are, how do you make it use the stuff in the ()'s. I havent really messed with that, I just used a global variable and changed it in the function lol

Share this post


Link to post
Share on other sites



I want to know how to make these (unless this is hard, just say its to hard lol)...

I have a few ideas, and I have a few things I use on almost all my programs I could make a function for that would be alot easier. Kind of like my picture-button. It makes selected button control a picture, when you hover over it its a different picture, when you click on it its a different picture (for x seconds). I used this for minimize/maximize/close buttons when I made my own customized window

Theres a few more, but yeah... how do these work? Are they just like normal Funcs that are added when you use #Include?

If they are, how do you make it use the stuff in the ()'s. I havent really messed with that, I just used a global variable and changed it in the function lol

There's a "best practices" kind of document floating around this site somewhere for UDFs. When I have more time I'll try to track it down and post a link.

You can open all the UDF files that come with AutoIT and learn a lot just by checking them out. The big thing is not to make assumptions about what's going on outside the UDF. Keep everything in functions and keep all the variables in the functions Local. Stick with standard methods for reporting errors, etc.

It's not hard, but your third UDF will look much better than your first, so "Just Do It!" :whistle:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

There's a "best practices" kind of document floating around this site somewhere for UDFs. When I have more time I'll try to track it down and post a link.

You can open all the UDF files that come with AutoIT and learn a lot just by checking them out. The big thing is not to make assumptions about what's going on outside the UDF. Keep everything in functions and keep all the variables in the functions Local. Stick with standard methods for reporting errors, etc.

It's not hard, but your third UDF will look much better than your first, so "Just Do It!" :)

BigDod knew where it was: User Defined Functions Standards

Excellent document with lots of valuable info on UDF requirements and conventions.

Many thanks to BigDod... :whistle:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Oh ok thanks Ill have a look at this lol...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0