Sign in to follow this  
Followers 0
Dinesh

Want to know the checkbox status

13 posts in this topic

Hi Everyone,

I am new to AutoIT. I am trying to write a AutoIT code to enable/disable one of the checkboxes available in the "Windows Features" wizard.

I did the following:

  • Launched Windows Features wizard (enter OptionalFeatures text from Run command to get the Windows Features wizard).
  • This wizard lists out all the optional features which can be installed/uninstalled.
  • My intention is to know, whether the "Internet Explorer 8" check box is enabled or disabled in the above mentioned wizard.
  • I have launched, "AutoIt Windows Info" to know the information about the Windows Features wizard (for adding the parameters in ControlCommand function).
  • The AutoIt Windows Info tool is showing blank in the "Control ID" column and hence I am unable to get the actual status of Internet Explorer 8 check box status.

Appreciate your help on this.

Thanks,

Dinesh

Share this post


Link to post
Share on other sites



Welcolme to the forum ! Posted Image

If it's for IE window see _IEFormElementGetValue and _IEFormElementCheckBoxSelect Functions


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Thanks alot for Welcoming me on to the Forum and for your quick reply as well.

I am interested even in getting to the know the status of "Services for NFS" check box in the same wizard (Windows Features). Can you please help in getting information for the same as well??

Appreciate your help.

Share this post


Link to post
Share on other sites

Thanks alot for Welcoming me on to the Forum and for your quick reply as well.

I am interested even in getting to the know the status of "Services for NFS" check box in the same wizard (Windows Features). Can you please help in getting information for the same as well??

Appreciate your help.

I have tried to find infos with AutoIt Info Tool

but you are right !

The no-autoit Listbox window does'nt return any usefull informations for get state of checkbox ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Do you suggest me any workaround to get the required information?

Thanks alot for your help,

Share this post


Link to post
Share on other sites

Do you suggest me any workaround to get the required information?

Thanks alot for your help,

For IE8 case, what do you want to know ?

if it is installed or not ?


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Not with IE. I want to know about "Services for NFS" status in the "Windows Features" window .

I got the answer to know about the status of IE installation (from one of your previous posts).

Share this post


Link to post
Share on other sites

Not with IE. I want to know about "Services for NFS" status in the "Windows Features" window .

I got the answer to know about the status of IE installation (from one of your previous posts).

I don't find this NFS service checkbox...

Is it in the service manager list ?


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Nop ;) ... My intention is to write a code to check if "Services for NFS" is enabled/disabled. If the Services for NFS is enabled then, leave the state as it is and if not, enable the same.

Share this post


Link to post
Share on other sites

Services for NFS is a Vista only windows feature option...

Looks like you can get the handle to the "SysTreeView32" object, have you tried to see what you can get from that?

Share this post


Link to post
Share on other sites

This features is available even with Win 7. How can I verify the object (handle that is being returned)?

I am really sorry for asking this question. As I am new to AutoIT, still figuring out to solve this problem.

Appreciate your help

Share this post


Link to post
Share on other sites

well this was posted on another site, not autoit related, but it discusses how to read the contents of a VB TreeView, which i understand is not overly simple.

Dim pItem As TVITEM

Dim pid As Long, tid As Long, lStyle As Long

Dim hProcess As Long, lpSysShared As Long, dwSize As Long

Dim nCount As Long, lWritten As Long, hFileMapping As Long

Dim h As Long, i As Long

Dim nLong As Long

nLong = SendMessage(hWnd, TVM_GETNEXTITEM, TVGN_CARET, ByVal 0&)

h = hWnd

If h = 0 Then Exit Function

tid = GetWindowThreadProcessId(h, pid)

nCount = SendMessage(h, TVM_GETCOUNT, 0, 0&)

If nCount = 0 Then Exit Function

pItem.hItem = nLong

pItem.mask = TVIF_TEXT Or TVIF_CHILDREN

pItem.cchTextMax = 32

pItem.pszText = Space(pItem.cchTextMax) ' & vbNullChar

dwSize = Len(pItem)

lpSysShared = GetMemSharedNT(pid, dwSize, hProcess)

WriteProcessMemory hProcess, ByVal lpSysShared, pItem, dwSize, lWritten

SendMessage h, TVM_GETITEMA, 0, ByVal lpSysShared

ReadProcessMemory hProcess, ByVal lpSysShared, pItem, dwSize, lWritten

FreeMemSharedNT hProcess, lpSysShared, dwSize

Now i dont 'do' VB so someone else will have to take a look and see if its doable in AutoIT. I suspect you are going to have to create a struct and get the data from the pointer perhaps?

Az.

Share this post


Link to post
Share on other sites

You should be able to check registry settings at HKLM\Software\Microsoft\Client for NFS\...

;)


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

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