Jump to content

Auto3Lib


PaulIA
 Share

Recommended Posts

The Auto3Lib library contains a suite of over 1200 functions written in AutoIt. These functions expose the full Windows API calls for use in AutoIt and are designed primarily for the advanced AutoIt programmer. The library comes with an AutoIt style help file. All functions are heavily documented and include sample scripts.

Auto3Lib has the ability to manipulate the following controls:

  • Animation controls
  • DateTime controls
  • Header controls
  • IPAddress controls
  • Listbox controls
  • ListView controls
  • Menus
  • Month Calendar controls
  • ProgressBar controls
  • StatusBar controls
  • Tab controls
  • ToolbarWindow controls
  • ToolTip controls
  • TreeView controls
Auto3Lib has functions that support the following:
  • Clipboard
  • Event Log
  • GDI+
  • ImageLists
  • Memory Manager
  • Network Authentication
  • Network Share Manager
  • Pipes
  • Screen Capture
  • Strings
  • Windows API
  • Windows Networking
  • Windows Time

With the exception of "Strings" this library has been Ported to the standard UDF includes in Autoit.

This libaray is not supported by the original poster nor is it supported by the Dev team.

If installed on a system with the Latest version(s) of AutoIt you'll get bundles of errors.

Therefore I've removed the link and download, not needed anymore.

Gary

Edited by GaryFrost
Removed links and Locked
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

@PaulIA

Great job !! :lmao:

I have a use for it (maybe). I am trying to grab some data for the Explorer now for some time. But no success so far.

Maybe you tool can handle this ?

I need to grab the computer names from within the explorer, when you are in the "Microsoft Windows Network" area. The right side window pane.

I saw it could grab data from the left side window pane, but how can I grab the data from the left side pane ?

Some example would be appriciated.

Thanks

regards

ptrex

Link to comment
Share on other sites

@ptrex: If I'm reading your post correctly, the control that you are trying to read is a SysListView32 control. Auto3Lib is used to manipulate external SysTreeView32 controls, so (for the moment), it won't help you out. I'm currently working on adding modules to manipulate other types of external controls, so check back ever so often. Thanks for the comment.

Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

@PaulIA

You are correct it's a different type of control :lmao:

But I can already start as long as the list of objects stay in the left window pane.

It' s not 100 %, but it's workable for now.

Thanks for the feedback and I am looking forward for your updates.

Regards

ptrex

Link to comment
Share on other sites

Thanks for the comments. I do appreciate that type of feedback every now and then. :lmao:

This package is not actually patterned after tweast's DLL. Tweast did a great job with his DLL, but it lacked some functionality that I had to have, so I wrote this one completely from scratch and implemented the full TreeView message set. I had actually written a custom TreeView component for Delphi a couple of years ago that we use in our main product line, so it was pretty easy porting the TreeView calls into AutoIt.

Hope you get some use out of it and let me know if you have any suggestions for improvements.

I meant that your project is on similar base, no copy/paste. Sorry for missinterpret my minds.

I'm using tweast's Dll in many of my work projects, so I will use your better/native way of treeview controling surely.

Maybe Jon can use it as inspiration for his ControlTreeView() which is on ToDo list

Link to comment
Share on other sites

:lmao: I should have waited... I spent weeks earlier this year trying to do this stuff, and you whip it out in practically no time at all.

Have all these been tested? I don't see anyone reporting bugs... All the test scripts seem to work... well, the test scripts don't test anywhere near all the functions you have here, but what they test apparently works...

PaulIA, you are definitely a master of Win32.

I can't wait to see what you come up with next. Any plans to take on context menus some time?

Link to comment
Share on other sites

I attempted to test all of the functions, but with anything this new, I'm sure there will be bugs to fix. I tried to concentrate the heaviest testing on the functions that would be used the most (like click, get info, get rect, etc.), but I believe that all of the functions have been given the "once over". I would appreciate any appropriate feedback/suggestions from people that are using this package.

As for further development, I am looking at the SysListView32 control next. Context menus shouldn't be that hard to implement, so I'll put that on the "to do" list. If users would like to see other controls added, please post requests here in the forum.

Thanks for the positive feedback. :lmao:

Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

PaulIA, you are one of the best!! :)

Thank you very very much. This is EXACTLY what I was waiting/hoping for.

If you allowed it, I think AutoIt3 should implement it in it's Standard-Functionality!

THANK YOU AGAIN!!!!! :ph34r::);):geek::lmao::ph34r:

PS: Does AutoIt3 not already support SysListView32 controls? See AutoIt-Help: "Function Reference/Window Management/Controls/ControlListView" In the Examples on the bottom of that help-topic it even uses that exact phrase, ie: ControlListView("C:\Program Files\NSIS", "", "SysListView321", "SelectAll")

PS2: The heavy documentation of the Auto3Lib include files will have to do for right now. That's already good! Thank you. If I'm allowed to put something on the wishlist it would however anyways be a regular help-file (.chm or similar). I would also be willing to help in the creation of it (to get it started), if you tell me, how I can do it.

Edited by autocart
Link to comment
Share on other sites

Thank you for the feedback. :lmao:

You are correct that AutoIt does have the ability to control the SysListView32 control. However, it does so in a somewhat limited fashion. There are over 130 different functions for the ListView control. I concede that most users will never need anything more than the ControlListView functions that AutoIt already provides, but my thought was to be able to offer a complete mapping of the ListView control for the people who needed it.

As far as documentation, I am in total agreement with you. It would be nice to have documentation similar to what is provided with AutoIt. I was waiting to get some feedback from the user community on what they would like to see and then maybe get some volunteers to help with various aspects of the project (i.e. help file, more example scripts, enhancements, optimizations, controls to implement next, etc.).

So if there are people out there using Auto3Lib that would like to contribute to it's expansion in the areas I've listed above, please feel free to email me. Please let me know what your skill set is and what kind of assistance that you'd like to provide.

Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

You are correct that AutoIt does have the ability to control the SysListView32 control. However, it does so in a somewhat limited fashion. There are over 130 different functions for the ListView control. I concede that most users will never need anything more than the ControlListView functions that AutoIt already provides, but my thought was to be able to offer a complete mapping of the ListView control for the people who needed it.

You are right. I have one of my projects stopped due to missing capability of insert item into listview in other application. It can't be done with ControlListView().

Just for your info - this app is Patch Maker.

Link to comment
Share on other sites

@Zedna: That Patch Maker project looks interesting. I might have use for something like that in the future, so I'll keep you in mind. As for the ListView problem, hang tight for a few days. I'm close to having the ListView32 control mapped.

Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

@Zedna: That Patch Maker project looks interesting. I might have use for something like that in the future, so I'll keep you in mind. As for the ListView problem, hang tight for a few days. I'm close to having the ListView32 control mapped.

We are using Patch Maker at work for periodical updates of our huge IS (it is over 300 MB of compiled stuff!)

and our patches are max. 10 MB (with minimal changes less then 1 MB). So realy great utility!

I want to make some AutoIt script for make patch automatically immediatelly after night compiling main stuff.

Here is some simple AutoIt script for Patch Maker, there must be predefined list of files saved in UTS for it:

patch_maker_uts.au3

note: some comments in this scripts are in Czech

Link to comment
Share on other sites

I can't wait to see what you come up with next. Any plans to take on context menus some time?

He already has, sort of.

I've already posted this in response to your question in a separate thread, but I wanted to cross-polinate in case some of the folks here wanted to know, too.

To get stuff from context menus, try this:

#include <A3LMenu.au3>;the source of much goodness. 
                                   ;Can be found here:  
                                   ;http://www.autoitscript.com/forum/index.php?showtopic=33677

Opt("WinTitleMatchMode", 4); Option required to be able to match window by classname

; Code to launch the context menu 
; this can be arbitrarily complex, but don't forget that using 
; ControlSend("<title", "", "<controlID>", "{APPSKEY}") can be just as effective

$hWnd = WinGetHandle("classname=#32768"); Part one of the magic - this is the classname for popups.

$hMenu = "0x" & Hex(_SendMessage($hWnd, $MF_GETHANDLE, 0, 0)); Part two of the magic            
; where _SendMessage is found in Paul Campbell's Windows SDK 
; library routines (A3LWinSDK.au3)

$text = _Menu_GetMenuString($hMenu, 0, $MF_BYPOSITION)
MsgBox(4096,"", "Menu item text: " & $text)

Also, to give proper credit to everybody, I would like to point out that the second part of the magic was lifted from Paul Campbell's _PopupScan() function (also in A3LWinSDK.au3), though I would not have known to steal it without Christian ASTOR's comment and Kuc's reply in this thread: http://groups.google.com/group/microsoft.p...bf6f15e26a7d3a/

I would further like to point out that Mr. Campbell has some interesting code in A3LMenu.au3 that makes me wonder how difficult it will be to select items from submenus of context menus. However, since I don't have any applications right now that have that feature, I'll not worry about that until I get there.

I would finally like to point out that Mr. Campbell has also done some very interesting things with ToolbarWindow32 in case that's a sticking point for you as well.

To sum up . . .

- use Paul Williams AU3 libraries

- "classname=#32768" is the secret to getting the handle to the context menu window

- (_SendMessage($hWnd, $MF_GETHANDLE, 0, 0)) is the secret to getting the handle to the context menu

- hope this helps

- thank you again, Mr. Campbell!

Link to comment
Share on other sites

@Birch: Thank you for the feedback. Your comments are most welcome!

Sorry I didn't answer the context menu question earlier, but it must have slipped by me. Auto3Lib already handles popup menus, including context menus. For example, when you call the _Toolbar_Clickx functions, Auto3Lib captures any menus that pop up as a result of clicking the button and stores information about the popup(s) in a global array. So, for example, if you have Explorer up and wanted to close it by using the Toolbar button, this is what the code would look like:

; Get the toolbar handle
$hToolbar1 = ControlGetHandle("My Computer", "", "ToolbarWindow323")
; Click the "File" menu on the toolbar
_Toolbar_ClickAccel($hToolbar1, "f")
; Click the "Close" item on the popup menu
_Menu_ClickAccel(_PopupGetParent(1), _PopupGetMenu(1), "c")oÝ÷ Ù8^ªê-¨"r«¨¶ØZ´«r¬­çÞ®¸§Ú"±©ky§rn襶)í ­£râl¢·nëm¢x¬rXçZq©eÇhëh>'©ÝÛZëªê-²v©²-ªê-¡ö¥Ø^¦n¦g§ºËajÖ«yË«­éí*)zr-ÇWj¢§íz»ay»­¶â±ÉbrGjwb¶Ö¤zƧ¢Ø^®«¨¶ÉÚ¦Èh¶«¨µ©Ý¢yr穲Ø^ì)¢©éî²ØZ¶¯z^çH¶Ëh­ë-éè§~æjبg§º§vW¦z{©j·§¶g§ºÜ©z)ÚZjV«­¬­«r¢ç§zË0Ømãè¦êFzÓãè¦êFzÓÚ­éíjwO¢©ëSʺw-ì!ü¨ºÖ¤y©h¢F­¶¢[j»^²Û®*mÊj{z0ÚÞ¶¸½ë)¢©wè®f­Ú×b²ZÊËaz)ºè§~æjب¶¬yÚ'­êíêh¦êpjÆ­®ç©¢©éî²Ö¢[j¶¶)à)j)ºäáz)ºkiÉ".¦+¶ËayƬ{^­ì¨¹Ê.ØZ½ëp¢)ºë-«¢g®¥«-êÞ²ém¡÷%É"ºÛhw¬µçi¢©±*0éò¢ç[axú)º·îËb¢{2¢ë)yÈÊØ^¦n¦ØZ·*.Á©íN­¢¨²Úh¦êb²í¢¶®¶²²è®f¥,¨º;¬¶¬±­H*.Á©í¶*n«^iÊ'µìméîÊjwh¶¬Â+aëhܸjÇèZ0±«­¢+ØìM¸Ñ¡ÍåÍÑ´½Èá¥ÍÑ¥¹Á½ÁÕÀµ¹ÕÌ)}A½ÁUÁM¸ ¤(ì5½ÙÑ¡µ½ÕͽÙȸ½©Ð)5½ÕÍ5½Ù ÀÌØí¥`°ÀÌØí¥d°À¤(ìI¥¡Ð±¥¬Ñ¡µ½ÕÍѼÐÑ¡½¹Ñáе¹Ô)5½ÕÍ
±¥¬ ÅÕ½ÐíÉ¥¡ÐÅÕ½Ðì¤(ìM¸Ñ¡ÍåÍÑ´½È¹ÜÁ½ÁÕÀµ¹ÕÌ)}A½ÁUÁM¸

Now, you use the _PopupGetx functions to retrieve the menu information and use the Auto3Lib menu functions to control the popup menu.

The code that Birch posted will not work for all popup menus. For example, when you click on "Favorites" in Explorer, it does not create a #32768 popup menu. It creates a series of nested windows (BaseBar, MenuSite, SysPager, etc) and then finally a Toolbar that contains the folders/sites. That's why you need the _PopupGetType function so that you can tell if the menu handle you're getting from _PopupGetMenu is a "true" popup menu or a Toolbar.

If anybody has any problems with Auto3Lib not being able to do something you want, be sure and let me know. You should be able to click any of the menus, submenus, etc. using the Toolbar and Menus libraries. If you've got a specific issue that you're having trouble with, email me an short example script and I'll see what I can do.

Edited by PaulIA
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...