Jump to content

Auto3Lib


PaulIA
 Share

Recommended Posts

excuse me the (dumb ?) question BUT this my first attempt in testing the Auto3Lib ...

i've copied all the include files in the right folder .... i wanted to try listview.au3 ...

but when i try it with the beta i get 11 errors in A3LConstants.au3 ... something related with a re-declaration of Const variables ...

Am i doing anything wrong ?

Link to comment
Share on other sites

excuse me the (dumb ?) question BUT this my first attempt in testing the Auto3Lib ...

i've copied all the include files in the right folder .... i wanted to try listview.au3 ...

but when i try it with the beta i get 11 errors in A3LConstants.au3 ... something related with a re-declaration of Const variables ...

Am i doing anything wrong ?

Not dumb at all. I haven't compiled Auto3Lib using the beta, so I'm sure there are some new constants that have been declared. Just open up the A3LConstants.au3 file and comment out any constants that SciTE complains about. Let me know if you have any other problems.
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

Not dumb at all. I haven't compiled Auto3Lib using the beta, so I'm sure there are some new constants that have been declared. Just open up the A3LConstants.au3 file and comment out any constants that SciTE complains about. Let me know if you have any other problems.

Yep ... that's what i did ... no more problems so far ...

In fact i wanted to interact with a system ListView and i had problems with code like :

$ItemID=GUICtrlRead("SysListView321")

returning zero even when an Item is selected :whistle: (maybe u know why ?) ...

I think ur Lib will help ... !

Thanks

Link to comment
Share on other sites

In fact i wanted to interact with a system ListView and i had problems with code like : CODE$ItemID=GUICtrlRead("SysListView321")

returning zero even when an Item is selected (maybe u know why ?) ...

Just use the Auto3Lib calls for now. Gary is working on migrating some of the Auto3Lib code into the ListView UDFs so that they will work with external list views.
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

I wanted to test _ListView_ClickItem on a system listView (the TCP/IP properties of the local network adaptor which has 4 items)

I test the ShowItems() (of paulIA's ListView example) no problem ... but when i try to click the item i want (with _ListView_ClickItem) nothing happens ... :whistle:

i choose the right item Index though ... but no reaction (my goal is to reach the IP setting area ... nothing original ...)

$hList = ControlGetHandle("Propriétés de Connexion au réseau local", "", "SysListView321")
_ListView_ClickItem($hList, 3)

Any Idea ?

Link to comment
Share on other sites

I wanted to test _ListView_ClickItem on a system listView (the TCP/IP properties of the local network adaptor which has 4 items)

I test the ShowItems() (of paulIA's ListView example) no problem ... but when i try to click the item i want (with _ListView_ClickItem) nothing happens ... :whistle:

i choose the right item Index though ... but no reaction (my goal is to reach the IP setting area ... nothing original ...)

$hList = ControlGetHandle("Propriétés de Connexion au réseau local", "", "SysListView321")
_ListView_ClickItem($hList, 3)

Any Idea ?

I would make sure that you have a valid ListView handle first. Something like:

$hList = ControlGetHandle("Propriétés de Connexion au réseau local", "", "SysListView321")
if @Error then _ShowError("Unable to get ListView handle")
_ListView_ClickItem($hList, 3)

Obviously, you'd want to make sure you have the correct control name (SysListView321) if there are more than one ListView in the window.

Other than that, I can't think what would be wrong. If you can run the ListView demo and the ClickItem test function works, this should work too.

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

I would make sure that you have a valid ListView handle first. Something like:

$hList = ControlGetHandle("Propriétés de Connexion au réseau local", "", "SysListView321")
if @Error then _ShowError("Unable to get ListView handle")
_ListView_ClickItem($hList, 3)

Obviously, you'd want to make sure you have the correct control name (SysListView321) if there are more than one ListView in the window.

Other than that, I can't think what would be wrong. If you can run the ListView demo and the ClickItem test function works, this should work too.

In fact the ClickItem of your ListView demo only works for the first Item (of the listView i'm talkin about cf. screenshot-01.jpg) ... as if the 3 others were "unresponsive" (?) ... when i try 1,2 or 3 (which are the ID given by one of your other function) nothing happens ...

post-6480-1163274780_thumb.jpg

Link to comment
Share on other sites

In fact the ClickItem of your ListView demo only works for the first Item (of the listView i'm talkin about cf. screenshot-01.jpg) ... as if the 3 others were "unresponsive" (?) ... when i try 1,2 or 3 (which are the ID given by one of your other function) nothing happens ...

post-6480-1163274780_thumb.jpg

I'm afraid that you must be doing something wrong then. I just ran the demo here and I can click on the whole range of items in the ListView. Please PM me with the code that you are using so that I can see where you're having trouble.
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

clicking on each of the "include" folder files does nothing

why?

Please make sure you have read the included documentation before posting. The "Read Me" file describes how to install Auto3Lib and the contents of each of the folders.

Not to offend you, but here is a little advice. Auto3Lib was designed for use by intermediate and advanced AutoIt programmers. If you don't understand the concept of an include file, your best bet is to put Auto3Lib aside until you master the basics. ;)

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

This isn't directly related, I think... Unless there's something I'm mssing about the authentication library...

I have a customer who wants this program to automatically log onto his workgroup. I've figured out how to do a domain logon from VB, but after two months of looking off and on, I have yet to find anything about programatically logging onto a workgroup.

Would you have any insight on that, PaulIA?

I'm hoping this has something to do with authentication and there just being a misunderstanding on my part. If it's too far off-topic, PM me and I'll repost in the Help forum if need be.

Link to comment
Share on other sites

Hi PaulA I have some coe uing your auto3lib

I am working with a listview I got to the point were a menu i wet to fid and click a item on comes up but

haw do i find a item and click on it I wet to find click on View Available Wirless Networks

#include <A3LListView.au3>
#include <A3LMenu.au3>

Global $stitle = "Network Connections"
Global $text1 ="FolderView"
Dim $objshell;$test
$objshell = ObjCreate('shell.application')
$objshell.ControlPanelItem("ncpa.cpl")
_WinWaitActive("Network Connections")


WinSetState("Network Connections","",@SW_MAXIMIZE)
Local  $iIndex
$card = "Wireless Network Connection"
$iItem ="View Available Wirless Networks"
$hList = ControlGetHandle($stitle,$text1,"SysListView321")
if @Error then _ShowError("Unable to get ListView handle")
$iIndex =_ListView_FindString($hList,$card,-1,False)
if $iIndex = -1 then _ShowError("Unable to find wireless networkcard")

thanks for any help beau

post-1791-1164039894_thumb.jpg

Edited by n9mfk9
Link to comment
Share on other sites

I don't have a wireless apdater on the machine I'm currently on, but here is a section of code that right clicks on the "Local Area Connection" item and selects the "Properties" menu item. You should be able to adpat it for your needs:

#include <A3LListView.au3>
#include <A3LMenu.au3>

Global $hList
Global $iIndex

; Run the "Network and Dialup Connections" dialog
Run("RunDll32.exe shell32.dll,Control_RunDLL ncpa.cpl")
_WinWaitActive("Network Connections")

; Get the ListView handle
$hList = ControlGetHandle("Network Connections", "", "SysListView321")
if @Error then _ShowError("Unable to get ListView handle")

; Find the "Local Area Connections" item
$iIndex =_ListView_FindString($hList, "Local Area Connection")
if $iIndex = -1 then _ShowError("Unable to find Local Area Connection")

; Right click on the "Local Area Connections" item
_ListView_ClickItem($hList, $iIndex, "right")

; Check to see if we got any popup menus
if _PopupCount() = 0 then _PopupScan()
if _PopupCount() = 0 then _ShowError("Unable to find popup window")
  
; Select the "Properties" menu item from the popup menu
_Menu_ClickPopupAccel("r")

Regards,

Paul

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

I don't have a wireless apdater on the machine I'm currently on, but here is a section of code that right clicks on the "Local Area Connection" item and selects the "Properties" menu item. You should be able to adpat it for your needs:

#include <A3LListView.au3>
#include <A3LMenu.au3>

Global $hList
Global $iIndex

; Run the "Network and Dialup Connections" dialog
Run("RunDll32.exe shell32.dll,Control_RunDLL ncpa.cpl")
_WinWaitActive("Network Connections")

; Get the ListView handle
$hList = ControlGetHandle("Network Connections", "", "SysListView321")
if @Error then _ShowError("Unable to get ListView handle")

; Find the "Local Area Connections" item
$iIndex =_ListView_FindString($hList, "Local Area Connection")
if $iIndex = -1 then _ShowError("Unable to find Local Area Connection")

; Right click on the "Local Area Connections" item
_ListView_ClickItem($hList, $iIndex, "right")

; Check to see if we got any popup menus
if _PopupCount() = 0 then _PopupScan()
if _PopupCount() = 0 then _ShowError("Unable to find popup window")
  
; Select the "Properties" menu item from the popup menu
_Menu_ClickPopupAccel("r")

Regards,

Paul

Thanks Paul

one quick thing how do i find $hWdn for a _Listbox_FindString

thanks Beau

Link to comment
Share on other sites

Thanks Paul

one quick thing how do i find $hWdn for a _Listbox_FindString

thanks Beau

The $hWnd parameter is the window handle to the ListView. To find this, you use ControlGetHandle:

; Get the ListView handle
$hList = ControlGetHandle("Network Connections", "", "SysListView321")
if @Error then _ShowError("Unable to get ListView handle")

I believe if you study the example I wrote for you, you'll see how it all works.

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...