Jump to content

Launch an advanced association dialog box

Recommended Posts

Well a Simple way to launch an advanced association dialog box to easy edit aplication association.

Local Const $sCLSID_LaunchAdvancedAssociationUI = "{1968106d-f3b5-44cf-890e-116fcb9ecef1}"
Local Const $sIID_ILaunchAdvancedAssociationUI = "{1f76a169-f994-40ac-8fc8-0959e8874710}"
Local Const $sTagILaunchAdvancedAssociationUI = "LaunchAdvancedAssociationUI hresult(wstr)"
; Create the object.

Local $aRegApp = _GetRegisteredApplications()

If IsArray($aRegApp) Then

Func LaunchAdvancedAssociationUI($AppRegName)
    Local $oLaunchAdvancedAssociationUI = ObjCreateInterface($sCLSID_LaunchAdvancedAssociationUI, $sIID_ILaunchAdvancedAssociationUI, $sTagILaunchAdvancedAssociationUI)
    If Not IsObj($oLaunchAdvancedAssociationUI) Then Return False
    Return SUCCEEDED($oLaunchAdvancedAssociationUI.LaunchAdvancedAssociationUI($AppRegName))
EndFunc   ;==>LaunchAdvancedAssociationUI

Func _GetRegisteredApplications()
    Local $sWow64 = ""
    Local $sString = ""
    Local $aRegApp[0]
    Local $i = 1
    If @AutoItX64 Then $sWow64 = "\Wow6432Node"

        $sString = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\RegisteredApplications", $i)
        If Not @error Then
            ReDim $aRegApp[$i]
            $aRegApp[$i - 1] = $sString
            $i += 1
    Until @error <> 0

    If $i = 1 Then Return 0
    Return $aRegApp

EndFunc   ;==>_GetRegisteredApplications

    Return ($hr >= 0)
EndFunc   ;==>SUCCEEDED


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

  • Similar Content

    • By matwachich
      HI everybody! It's been a (very) long time since I posted something useful!
      Here I come with a new functions that I needed in a project that needs many different forms to insert different data into a database. Instead of creating a different Koda form for each data type, I decided to create this function, inspired by this one (from the excellent IUP GUI library).
      To create an input dialog, you first must create a JSON definition of this dialog. Simple example of a login form:
      { title: "Dialog Title", controls: [ {type:"label", value:"Please login"}, {type:"input", id:"user", label:"User name"}, {type:"input", id:"pass", label:"Password", style:$ES_PASSWORD}, {type:"check", id:"remember", label:"Remember me", value:true} ] } Then pass it to the advInputBox function:
      #include "advInputBox.au3" Dim $oRet = advInputBox($sJSON) If @error Then MsgBox(64, "Example1", "Dialog canceled") Else MsgBox(64, "Example1", "Return: " & Json_Encode($oRet, 128)) ; you can access individual values by ids: ; Json_ObjGet($oRet, "username") ; Json_ObjGet($oRet, "password") ; Json_ObjGet($oRet, "remember") EndIf And you will get an InputBox like this one:

      The code is on GutHub
    • By scintilla4evr
      I started writing this UDF a while ago, so I decided to share it here.
      This is an UDF full of advanced mathematical functions. It allows to work with primes, create number sequences, interpolate, calculate values of functions like Riemann zeta.
      Full list of functions:
    • By GarnetDagger
      Hello friends, I need some help and ideas because I am a tiny bit lost here!
      I am building some GUI with some tools and one of my tabs allows me to retrieve Data from my database in pre-defined ways I prefer.

      Currently, I can just look at them as in a Listview so no editing allowed I believe(*if I am wrong please correct me), but my dream is that I can have full control over it as in a spreadsheet program such as excel and open office. 
      what I like to include is for example;
      click cell to edit,
      Move cursor to next left, top, down or right cell, and make the cells bigger or smaller
      mouse over functions (for example a product info or picture loading etc),
      Enter to save temporary data in the cell / field or right away update it to my database also,
      Right mouse click for options etc,
      drag my cells and columns to edit 
      select multiple* rows / columns  etc
      the whole basic shenanigans i guess.
      this seems to be a daunting task for a beginner like me and I Know I am not a great programmer myself either. but I got time on my hand and I am very interested in how to accomplish this if possible, has it been done before and if not why not?!?!?! , The options I want in bold are required for the bare minimum to make things remotely work.
      Can I have some small guidance on this? I am under the impression that the AutoIt itself does not have these functions or possibilities, can I program this myself and how? Do I need to start accessing resources outside AutoIt and for example need to start learning win32 GUI programming or whatever it is called?
      I have tried the search for a while but I am at a loss.
      any help is appreciated and I will try to contribute myself as much as possible and I want to emphasize that I really Require the ELI5 (explain me like I am 5 years old) approach!
      thank you so much for reading and your time!  Regards Rene
    • By Schoening
      So i was in need of this custom udf Fastfind


      showed me this great article on AutoIt wiki..http://www.autoitscript.com/wiki/Adding_UDFs_to_AutoIt_and_SciTE

      and i think i did like it said.. mostly anyway..

      I downloaded and unzipped FastFind and placed all files in a new Folder i created in the AutoIt3 Folder

      The files i placed in the new Folder: <-- Named it FastFind


      I think the Benchmark and FastFind_Demo are just examples.. But i don't think they will Hurt by being in there ? They don't have any Dll to them.. and Even though i am not shure about it.. i think you need the dll to include and call the Custom Files from that folder.

      Correct me if i am wrong

      So after placing the files in the new Folder, i started SciTE --> SciTE Config --> User Include Dir: C:Program Files (x86)AutoIt3FastFind Save+Apply

      So can i now #include <fastfind.au3> ? and you the build in functions?
      I have not tried this yet because i dont know how to use the custom UDF "syntax?"
  • Create New...