Danyfirex

Launch an advanced association dialog box

1 post in this topic

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
    LaunchAdvancedAssociationUI($aRegApp[0])
EndIf

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"

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

    If $i = 1 Then Return 0
    Return $aRegApp


EndFunc   ;==>_GetRegisteredApplications

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

Saludos

1 person likes this

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

    • scintilla4evr
      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:
       
      Changelog:
      Download
    • GarnetDagger
      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
       
    • Schoening
      By Schoening
      So i was in need of this custom udf Fastfind



      Melba23

      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


      Benchmark.au3
      FastFind.au3
      FastFind.dll
      FastFind_Demo.au3
      FastFind.dll

      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?"