Sign in to follow this  
Followers 0
PaulIA

Auto3Lib

961 posts in this topic

Added support for ToolTip controls. Take a look at the demo to see all the utterly useless things you can do to a poor ToolTip control.

:whistle: that is awesome! Between this and the toolbar functions, you cxan actually tell from code what all the items on a toolbar are without needing to search for an image!

Gotta admit, you can make some pretty distinctive tooltips...

Share this post


Link to post
Share on other sites



I had a lot of fun doing that one too. :whistle:


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

The Auto3Lib library contains a suite of over 550 AutoIt functions specifically designed for working with controls both in AutoIt programs and external programs. The library has functions that support the following controls:

[*]Header

[*]Menus (context, popup, toolbar)

[*]Listbox

[*]ListView

[*]ToolbarWindow

[*]ToolTip

[*]TreeView

A BIG BIG thank you to Paul for writing these Functions! :whistle:

2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Hello PaulIA!

At least some of the Constants you declare with your "A3LConstants.au3" are being also declared as Constants with "GUIConstants.au3". When I try to include both in my code then I get a lot of error messages because of this conflict (since they have the same name).

Did you do that on purpose with a thought behind it, which I don't see right now or was that just a mistake?

Sincerely, autocart

Share this post


Link to post
Share on other sites

At least some of the Constants you declare with your "A3LConstants.au3" are being also declared as Constants with "GUIConstants.au3". When I try to include both in my code then I get a lot of error messages because of this conflict (since they have the same name).

That's my fault. Some of the other users have caught this too and it will be fixed in the next release, which is probably today or tomorrow. Thanks for the feedback.

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Released new code with the following changes:

Removed the duplicate constant declarations so you can now compile using the GUIConstants file.

Add support for the IPAddress control. I have no idea why...

Implemented a segment of the LAN Manager calls for network file management. With these calls, you can enumerate sessions, connections, files, printers, etc. You can also add, delete and query server shares. Thanks to arcker for providing the opportunity to code this and for testing some of the functions.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

#47 ·  Posted (edited)

I just want to say that PaulIA is a genius.

I had the idea of the LAN manager for a little project, but it was only the one to succeed in

As me, if you want to learn more from dllcall, look at his so useful functions.

Thanx guy for improve AutoIt so much, i hope that some of your functions will be developed as

AutoIt standart functions, but first, that your UDFs will be congratulate. (it seems to be)

Edited by arcker

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]

Share this post


Link to post
Share on other sites

Thanks arcker. Hope the new functions work out for you. Let me know if you spot any bugs.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Hi PaulIA,

using your scipts (Taskbar.au3) in scite bring up following error:

E:\Autoit\6\Auto3Lib\Test Scripts\A3LConstants.au3 (583) : ==> Can not redeclare a constant.:

Global Const $LVFI_STRING = 0x00002

Global Const ^ ERROR

Do you have an idea?

Greets

Dizzy

Share this post


Link to post
Share on other sites

#50 ·  Posted (edited)

E:\Autoit\6\Auto3Lib\Test Scripts\A3LConstants.au3 (583) : ==> Can not redeclare a constant.:

Global Const $LVFI_STRING = 0x00002

Global Const ^ ERROR

I declared some constants that were already declared in GUIConstants.au3. This was fixed in the latest release of code. If you find any that I missed, please let me know. Edited by PaulIA

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Finally got a chance to look over this a little today.

Did notice you are opening dlls in many functions, never saw where they are closed.

The way they are being used could be shortened to 1 line for example:

Local $aResult = DllCall("Kernel32.dll", "ptr", "VirtualAlloc", "ptr", $pAddress, "int", $iSize, "int", $iAllocation, "int", $iProtect)

The above opens the dll does the function and closes the dll

I've been working on the Current UDFs in the help file for ListView, I now have all those working with system controls as they should.

I'll pm you what I have if you want to take a look.

I've consolidated a file of functions needed and only what was needed for the Memory.au3 that would be submitted along with the new GuiListView.au3

I have to say you've done good work, glad have someone around who also knows how to work with structs and controls.

Also if you could provide a working example of the _ListView_SetBkImage used with an ListView created in autoit I would much appreciate it. Seem to be having problems with that one for some reason.

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Did notice you are opening dlls in many functions, never saw where they are closed.

Actually, I purposely didn't want to close the Dlls until the program exits. Opening/closing after each call is significantly slower than caching the Dll handles, especially with the amount of API calls that are used. You can use _DllClose in A3LLibrary if you want to manually close the Dlls when the program exits or let AutoIt do it for you. I agree with you though that an explict close on program exit is probably cleaner and I'll update the demo scripts to reflect this on the next release.

Also if you could provide a working example of the _ListView_SetBkImage used with an ListView created in autoit I would much appreciate it. Seem to be having problems with that one for some reason.

Can you PM me with an example you're having trouble with?

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Ok, What I`m trying to do is get into a tech Support room on a Chat site that uses ActiveX to create various controls in the Webpage.

If _TreeView_GetText($hTree, $hNext)  = "tec support (0)" Then 
        _TreeView_Select($hTree, $hNext, $TVGN_FIRSTVISIBLE)
        MsgBox(0,"TECH ROOM FOUND!!","")
        _TreeView_SetExpand($hTree, $hNext, $TVE_EXPAND)
    ENDif

So the treeview_Select works fine and scrolls the item to the top.

Now I want to get into the room itself, so I thought Treeview_SetExpand would do the same as clicking on the room name to enter it, but nothing happens.

I am using the right fuction?

Thanks for your help!


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

_TreeView_SetExpand is used to expand or collapse a branch in the TreeView. If you want to click on a node in the TreeView, you need to get the rectangle of the item with _TreeView_GetItemRect and then use MouseClick to click somewhere in that rectangle. You can use the _GetXYFromRect helper function in A3LLibrary to get the top/left corner of the rect. Something like this:

If _TreeView_GetText($hTree, $hNext) = "tec support (0)" Then
  _TreeView_Select($hTree, $hNext, $TVGN_FIRSTVISIBLE)
  MsgBox(0,"TECH ROOM FOUND!!","")
  _GetXYFromRect(_TreeView_GetItemRect($hTree, $hNext), $X, $Y)
  MouseClick($X, $Y, 1)
EndIf

If your MouseCoords are not right, you can use _ClientToScreen to change the X/Y position to make them relative to the TreeView.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Thanks Paul, I`ll give it a try. :whistle:


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

No problem. I probably need to add a _TreeView_ClickItem function to the library. I'll work on that for the next release, which will probably be in the next few days. I've been working on a new module for the library and it's almost done.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Great Stuff! :whistle:


2015 - Still no flying cars, instead blankets with sleeves.

Share this post


Link to post
Share on other sites

Thanks! If you have any suggestions for other enhancements, drop me a note.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

#59 ·  Posted (edited)

Thanks! If you have any suggestions for other enhancements, drop me a note.

Thought 1:

Rich Edit Controls. Now THERE would be a challenge!

Thought 2:

Control of Image Lists would complement much of the functionality you already have here. I seem to recall seeing the possibility of referencing them in MenuItems, TreeViewItems, ListViewHeaders, ListViewItems, ToolbarButtons and possibly others.

The ultimate, I think, would be to be able to:

- Import bitmaps files to an imagelist control (cf ImageList_LoadImage, but also maybe supporting seperate image files), and use them with the other controls.

- Extract images from the imagelists used in other applications, and save them as files or copy them to the clipboard.

Thought 3:

I feel that the point where AutoIt is weakest, feature-wise, is... um, ok you've already addressed that with treeviews and toolbars ( PaulIA = :whistle: )

The *next* most serious feature gap I think is in image handling abilities. A wrapper for loading and saving the bits of a bitmap file could go a long way, as would wrappers for the various Bitmap, Bit Block Transfer, Brush, Region, Graphical, and Palette functions.

In all seriousness, if you decide to do it, such a thing might be better as a seperate library related to but not immediately part of Auto3Lib. There are a LOT of functions involved (I'm browsing through API-Guide) and seemingly tons of constants. It would make a good long-term project, but I wouldn't want to guess how much time it would take just bringing GDI capabiliies to AutoIt, never mind GDI+ or DirectX...

Well, you asked for ideas for enhancements, and those are some that would really knock the socks off some of the people I see hanging around the Support and GUI forums.

Afterthoughts

Priorities? #1 would probably have the least impact, I think #2 would be easiest, and #3 would be most difficult and most influential.

Honestly, I'm not even sure how you found the time to do the things that you've already done. The sheer speed at which these features become available, and the quality at which they operate... Either you are privately wealthy and don't need a day job, there are really ten of you, you have some automated process that generates DLLCalls and documentation from MSDN pages, you own a time machine, or some combination of the above.

Do you have any productivity tips you could share? I'm totally in awe of what you've accomplished so far, and how little time it apparently took to do it.

Edited by sohfeyr

Share this post


Link to post
Share on other sites

Rich Edit Controls

Interesting. I looked at the API and it doesn't appear that difficult, but there are a zillion UDFs you'd have to implement in order to wrap the whole thing.

Control of Image Lists

Actually, this one would be fairly straight forward. Might take a look at this one sometime to complement the image list functions that already exist.

GDI capabilities to AutoIt

Ugh. I think I'd have to hear from a lot of people that they wanted this. You're right, the API is huge.

Either you are privately wealthy and don't need a day job

Not yet.

there are really ten of you

Wouldn't my wife love that! :whistle:

you have some automated process that generates DLLCalls and documentation from MSDN pages

No, but that would be an interesting project in itself.

you own a time machine

Actually, it's a "way back" machine but Mr. Peabody won't let me use it anymore ever since that whole incident with the BBQ in Rome. I told Nero he was using WAY to much lighter fluid...

[Entering personal opinion mode]

I'll probably here no end of it from those who disagree, but since you asked about productivity:

1. Code reuse. Look at areas where you're doing the same thing over and over. A good example would be the helper functions and wrappers in A3LLibrary. I can't count the hundreds of lines of code that these few functions save me.

2. Coding style. I don't care what coding style you use, as long as you've got one and you follow it. I use a modified version of Hungarian Notation that has served me well for over two decades.

3. Clarity. I'm not impressed with people who try to put as many function calls as they can into a single line of code. It's a nightmare to debug and not something that I would ever want to work on. I purposely go the other direction. I'll declare a few extra local variables and break all the function calls out so that it's clear what's going on. Not only is it easier to debug, but everybody else can understand it too. I'll sacrifice those few extra milliseconds it takes AutoIt to compile the extra lines of code for the sake of clarity any day.

4. Resources. MSDN, Windows SDK, Win32 Developer's Reference, Google, etc., etc., etc. Knowledge is power.

[Exiting personal opinion mode]


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0