Jump to content

Proph

Active Members
  • Posts

    218
  • Joined

  • Last visited

Reputation Activity

  1. Thanks
    Proph got a reaction from NassauSky in MetroGUI UDF v5.1 - Windows 10 style buttons, toggles, radios, menu etc.   
    To fix the Title issue I went ahead and made this change to script...
    MetroGUI_UDF.au3
    Under This:
    If $AllowResize Then     DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) ;Adds compatibility for Windows 7 Basic theme     $GUI_Return = GUICreate($Title, $Width, $Height, $Left, $Top, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX), -1, $ParentGUI)     _Metro_SetGUIOption($GUI_Return, True, True, $Width, $Height)     DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", BitOR(1, 2, 4)) Else    DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) ;Adds compatibility for Windows 7 Basic theme     $GUI_Return = GUICreate($Title, $Width, $Height, $Left, $Top, -1, -1, $ParentGUI)     _Metro_SetGUIOption($GUI_Return, False, False, $Width, $Height)     DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", BitOR(1, 2, 4)) EndIf Add this:
    GUICtrlCreateLabel($Title, 54, 7) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 8.5, 400, 0, "Arial", 5)  
    Hope this helps someone until the UDF is updated with something better.
  2. Like
    Proph reacted to aleeksunder in GetWildPath Function   
    Hello!
    I've just finished a function and decided to share it. Maybe you know some better alternatives or can give some advices to optimize it, since finally it completely blows up my brain 
    Function retruns array of paths that match the entire pattern. You pattern can be wild as you wish.
    Usage:
    ; Get <any files and folders that matches *.exe> inside <anydrive> \ <anyfolder that match 'W*nd*s'> \ <anyfolder that match 'Sys'> _ArrayDisplay( GetWildPath( '*:\W*nd*s\Sys*\*.exe' ) ) ; Get <anyfolder that match 'W*nd*s'> inside <anydrive> _ArrayDisplay( GetWildPath( '*:\Wind*s' , $FLTA_FOLDERS ) ) ; If pattern begins with '\' function interprets it as _root_ of a working directory's drive or directory passed as 3rd paramter _ArrayDisplay( GetWildPath( '\*Te*\*34.*t*t*' , $FLTA_FOLDERS ) ) ; If pattern not begins with '\' function interprets it as relative path to working directory or directory passed as 3rd paramter _ArrayDisplay( GetWildPath( '*Te*\*3*.*t*' , $FLTA_FILESFOLDERS , 'D:\' ) )  
    Function itself, maybe a bit hard-coded but as is:
    #include-once #include <script\autoit\AutoItConstants.au3> #include <script\autoit\StringConstants.au3> #include <script\autoit\File.au3> #include <script\autoit\Array.au3> Func GetWildPath( $s_pattern , $i_flag = $FLTA_FILESFOLDERS , $s_working_directory = @WorkingDir ) $s_working_directory = StringRegExpReplace( $s_working_directory , '[\\/]+$' , '' ) Local $a_split = StringSplit( $s_pattern , ':' ) If Not @error Then $s_drive = $a_split[1] $s_path = $a_split[2] Else $s_drive = StringSplit( $s_working_directory , ':' )[1] $s_path = $a_split[1] EndIf If $s_drive = '*' Then Local $a_drives = DriveGetDrive( $DT_ALL ) Else Local $a_drives[1] $a_drives[0] = _ArrayAdd( $a_drives , $s_drive & ':' ) EndIf Local $a_result = [] For $i_drive = 1 To $a_drives[0] If StringLeft( $s_path , 1 ) = '\' Or StringLeft( $s_path , 1 ) = '/' Then $s_path_root = StringUpper( $a_drives[ $i_drive ] ) & '\' $s_path_relative = StringTrimLeft( $s_path , 1 ) Else $s_path_root = StringUpper( $a_drives[ $i_drive ] ) & StringSplit( $s_working_directory , ':' )[2] $s_path_relative = $s_path EndIf Local $a_path = StringSplit( $s_path_relative , '\/' ) Local $a_final = [] If $a_path[ 0 ] > 1 Then Local $a_relative = _FileListToArray( $s_path_root , $a_path[ 1 ] , $FLTA_FOLDERS , True ) If Not @error Then For $i_path = 2 To $a_path[ 0 ] If $i_path < $a_path[ 0 ] Then Local $a_relative_result = [] For $i_relative = 1 To $a_relative[ 0 ] Local $a = _FileListToArray( $a_relative[ $i_relative ] , $a_path[ $i_path ] , $FLTA_FOLDERS , True ) If Not @error Then _ArrayConcatenate( $a_relative_result , $a , 1 ) EndIf Next $a_relative_result[0] = UBound( $a_relative_result ) - 1 $a_relative = $a_relative_result Else For $i_relative = 1 To $a_relative[0] Local $a = _FileListToArray( $a_relative[ $i_relative ] , $a_path[ $i_path ] , $i_flag , True ) If Not @error Then _ArrayConcatenate( $a_final , $a , 1 ) EndIf Next $a_final[0] = UBound( $a_final ) - 1 EndIf Next EndIf Else Local $a_final = _FileListToArray( $s_path_root , $a_path[ 1 ] , $i_flag , True ) EndIf _ArrayConcatenate( $a_result , $a_final , 1 ) $a_result[0] = UBound( $a_result ) - 1 Next Return $a_result EndFunc Since I'm new to AutoIt all of your comments and ideas are welcome 
  3. Like
    Proph got a reaction from coffeeturtle in MetroGUI UDF v5.1 - Windows 10 style buttons, toggles, radios, menu etc.   
    To fix the Title issue I went ahead and made this change to script...
    MetroGUI_UDF.au3
    Under This:
    If $AllowResize Then     DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) ;Adds compatibility for Windows 7 Basic theme     $GUI_Return = GUICreate($Title, $Width, $Height, $Left, $Top, BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX), -1, $ParentGUI)     _Metro_SetGUIOption($GUI_Return, True, True, $Width, $Height)     DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", BitOR(1, 2, 4)) Else    DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) ;Adds compatibility for Windows 7 Basic theme     $GUI_Return = GUICreate($Title, $Width, $Height, $Left, $Top, -1, -1, $ParentGUI)     _Metro_SetGUIOption($GUI_Return, False, False, $Width, $Height)     DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", BitOR(1, 2, 4)) EndIf Add this:
    GUICtrlCreateLabel($Title, 54, 7) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 8.5, 400, 0, "Arial", 5)  
    Hope this helps someone until the UDF is updated with something better.
  4. Like
    Proph got a reaction from EmilyLove in [Updated!] Quickly Email False Positives to AV Vendors   
    It was pretty simple once I got it working.  Hopefully the Antivirus Vendors do their jobs now. ;-)
     
    I just checked my email and I have many replys from the AV Vendors.  They all say that the files are clean.  So it looks like it worked well. Thanks!   This will come in handy for sure.
  5. Like
    Proph reacted to EmilyLove in [Updated!] Quickly Email False Positives to AV Vendors   
    View the Project at GitHub: https://github.com/BetaLeaf/False-Positive-Reporter
    Download False Positive Reporter: https://github.com/BetaLeaf/False-Positive-Reporter/releases
    Wiki: https://github.com/BetaLeaf/False-Positive-Reporter/wiki
     
    Thanks Jos for your Example Script involving Emailing attachments.
    Thanks JohnOne for helping me figure out the Run as Non-Admin Issue.
    Thanks Chiron at http://www.techsupportalert.com/content/how-report-malware-or-false-positives-multiple-antivirus-vendors.htm for your wonderful post.
    Disclaimer: This script is meant for submitting false positives to AntiVirus Vendors so you can deploy your scripts faster. I am not responsible for your misuse of this script.
  6. Like
    Proph got a reaction from EmilyLove in [Updated!] Quickly Email False Positives to AV Vendors   
    I was able to successfully use this once I went and enabled access for less secure apps here:
    https://www.google.com/settings/security/lesssecureapps
×
×
  • Create New...