Multi-OEM/Retail Project {MRP} - Mk3

Discussion in 'MDL Projects and Applications' started by mxman2k, Oct 15, 2016.

  1. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,534
    21,765
    210
    I struggle learning new things since my brain hemorrhage in 2019 as my short term memory is shafted.

    That why I not tried ahk.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Could help here and in general :).

    Once you set-up a nice and functional GUI in AHK (you always start building from base here). You set #includes and your Var-Definitions and stuff.

    Then adding the functnionalitty looks like PHP syntax and is stringent.

    You can use a lot of other code, like CMD/PS directly via their Script-Host. So most functions are written fast.

    There are nice functions from people for Live-Log (running downwards), Extracting, Downloads and many more, you name it, someone wrote it, just needs adaptions.

    Marvelous!
     
  3. Example:

    Function runs and schows activity in the appropriate Bar in the GUI. The checkvalue-Value will then be sorted and presented, in the Log and a List-View, if better.

    Code for the function without the sorting in AHK:
    Code:
    Run, %system32%\cmd.exe /c "powershell -noprofile Unhide-WindowsUpdate -Title '%KBValue%*' -Confirm:$false" >> %A_Temp%\check.txt,, Hide, NewPID
    gosub, ProgressBar
    FileRead, checkvalue, %A_Temp%\check.txt
    FileDelete, %A_Temp%\check.txt
    
    Progressbar is infinite and shows that.
     
  4. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,534
    21,765
    210
    The ini creator for mrp I would like it to be more user friendly in dpi and resizable but damned if I can break the rigid gui.

    Same with the gui qt. But to learn a whole new programming language is what puts me off.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. The complete Unhide-Function:
    Code:
    FormatTime, TimeString,,HH:mm:ss
    output_Text(timestring . " Unhiding Updates with Title: " . KBValue . "`r`n", hOut1)
    output_Text(timestring . " " . msg2 . "`r`n", hOut1)
    KBCheck := StrLen(KBValue)
    if (KBCheck < 1){
        FormatTime, TimeString,,HH:mm:ss
        output_Text(timestring . " Please Enter KB or Title." . "`r`n", hOut1)
        goto, EndUnhide
    }  
    Run, %system32%\cmd.exe /c "powershell -noprofile Unhide-WindowsUpdate -Title '%KBValue%*' -Confirm:$false" >> %A_Temp%\check.txt,, Hide, NewPID
    gosub, ProgressBar
    FileRead, checkvalue, %A_Temp%\check.txt
    FileDelete, %A_Temp%\check.txt
    count=0
    Loop, Parse, checkvalue, `n, `n`r
    {
        if !eachLine := Trim(A_LoopField)
            continue
                       
        count++
           
        FormatTime, TimeString,,HH:mm:ss
        output_Text(timestring . " " . A_LoopField . "`r`n", hOut1)
    }
    gosub, CheckWU
    EndUnhide:
    FormatTime, TimeString,,HH:mm:ss
    output_Text(timestring . " " . msg2 . "`r`n", hOut1)
     
  6. The reason i started using AHK, ...

    ...but more a minor problem - that can be transferred with a little help from a stupid doggie™ ...

    I rewrote mine from scratch ... 12k lines now an rising ...

    how long is yours?
     
  7. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,534
    21,765
    210
    I did attempt to write a simple gui using just powershell, but gez that was a task and half I gave up after I managed to get a 'shell gui' but adding checkboxes etc was tiring so gave it up.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Remember the Sig of the original account ;). Nothing changed.
     
  9. As much as i love PS - GUI?! - NOOOOOOO!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
  10. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,534
    21,765
    210
    Not at pc as on phone watching tv lol.

    But I know the gui qt is 20k lines excluding the #include files.

    A lot can be trimmed out and I have on all mrp scripts as I go along.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    6,534
    21,765
    210
    Creating a Pshell gui is a pain in the glass!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. should be usable as are and might only need adaptions, both share similiarities ;).
     
  13. You are already using AutoIT, they are sibblings, AIT is the slow one, they all love, but .... ;).

    GUI >>> Always AHK!
     
  14. Making you smile a bit, today ... and that part is checked on my list. What's next .....
     
  15. The_MagicMan

    The_MagicMan MDL Novice

    Oct 11, 2011
    43
    83
    0
  16. The_MagicMan

    The_MagicMan MDL Novice

    Oct 11, 2011
    43
    83
    0
    Does the MRP have Alienware images? I was wondering since I now own one. :D
     
  17. Hi, nice to see :).
     
  18. stupid doggie! here, you might remember :blush:.
     
  19. The_MagicMan

    The_MagicMan MDL Novice

    Oct 11, 2011
    43
    83
    0
    I do.