Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/01/2023 in all areas

  1. UEZ

    Tester needed ^^

    This DPI stuff is very tricky because of different os with different behavior. Let's see where we end... 😉
    2 points
  2. This Beta version contains SciTE v 5.4.0 and a major change to the AutoComplete functionality and automatically addition of required #include lines at the top. Many LUA functions are updated. 2023-12-27 13:30 Merged SciTE Release 5.4.0 with the SciTE4AutoIt3 sources Many changes to the new LUA functions 2023-03-10 13:00 Merged SciTE Release 5.3.4 with the SciTE4AutoIt3 sources Added option to jump to the definition of a Variable when Ctrl+J is used with the caret placed with a variable name. Many other small changes... see this thread for details Move the zip into the Beta directory making it for more people available. Move this thread to AutoIt Technical discussions, so others can participate in testing when they want. 2023-03-14 20:00 Merged SciTE Release 5.3.5 with the SciTE4AutoIt3 sources Also show constant includes in #include<... dropdown. Fixed issue with portable directory duplicates due to improper case checking Fixed REGEX getting all possible *.au3 files when Dir returns a Timestamp in format hh:mm AM/PM How to test/install: Backup your current SciTE directory! Download the Beta SciTE4AutoIt3.exe installer or portable zip. Run installer or do your thing with the portable zip. Check below documentation on all possible configuration option via #Directive or in the SciTEUser.properties. Jos ============ Quick feature overview... check this Documentation for all details ======================================== This is how it looks with a basic example: Here I am using @Melba23's ExMsgBox include file which is located in my Private Include directory: This shown you in more details the basics of the changes: The announced change here has grown into a project on it own, which I feel is now at a stage where I could use some help from beta testers trying out these updated. I have created the initial documentation on all updates made and how the added functionality works, which is now part of the Helpfile available: AutoComplete & Dynamic Includes Previous Top Next Overview This LUA script functionality build in the SciTE4AutoIt3 version of SciTE will dynamically add #include statements required for the used UDFs or Global Const Variables. When dynamic.includes=1 you will be able to use Ctrl+Shift+z to process the whole file and scan it for missing Global Const Variables or UDFs. When dynamic.includes.whiletyping=1 is also set, the LUA functionality will add the required #include lines while typing. This only works when dynamic.includes=1. The AutoComplete functionality has also been changed and will now also search for partial matches in the names in stead of "Starting with", so you don't need to know the exact start of the funtion to be able to search for it. Changes to existing features Syntax Coloring All found Func's as defined here, not just the standard ones, will now immediately have their correct Font & formatting as defined for properties Styles 15-17. After you specified a none-standard known UDF, you will see it has Style 17 Color&Formatting when it is an UDF that exists in an Include file specifically for this Script. Selection for #include lines You can now use either < ' " as starting character to trigger the DropdownList with available include files. This list will now include all Standard, User defined and Dynamically found Include files. You can now type any part of the include name, not just the starting letters, to find the Include file you want. For example when you type: #include<apic this will be shown and we just press 2 times the Down key: .. then when you hit the Tab key, this will be the result: Smart AutoComplete function for Variables, Functions and Abbreviations The Dropdown will show al list of possible Variables or Functions and Abbreviation when you start typing. The match is done on the whole functionname now, not just the starting characters. The Starting $ or _ characters are ignored in this search and the results are shown in the order of the starting position in the found "words" of the typed characters: Example 1: When we type Find the below is returned: As you can see they are sorted in the order of starting position of "Find" and then Alphabetically Example 2: When you type $Yes, the result will be: New: How Dynamic #Include line insertion works Example1 When you type the following in your source: _ArrayAdd .. and then when you hit the Opening bracket or space key, the required #include<array.au3> line will be added within the existing or newly created #region: The same will happen when you use one of the Global Const variables from one of the *constants*.au3 includes in the defined include directories. This #region can be moved to any place in the script you prefer and will be used from here on as long as you do not change anything in those 2 #region lines. Any Subsequent added include file will be added to the end of the list with the Date&Time of the addition so you can easily see when/what was added. Example2 This is an Example for an new script in the SciTE_Jump Directory showing the use of the #SciTE4AutoIt3_Dynamic_Include_Path=; directive: The includes for this Utility are located in the Includes subdirectory, so aren't considered unless we specify it as follows: #SciTE4AutoIt3_Dynamic_Include_Path=;Includes; ... and then we start typing the name of one of the UDFs in a include in this directory and hit Tab on the first one shown: When we then hit the Opening bracket or Space key, the required #include"includes\_SciTE.au3" line will be added within the existing or newly created #region: Example3 This is an Example for a Global Const include file addition: We have just typed the last line of this script: .. and hit the Space key, the required #include<MsgBoxConstants.au3> line will be added within the existing #Region above the #EndRegion line: These are all the Func's (UDFs) that will be recognized by the dynamic include process: All Funcs in the default autoit/includes directory with format _ABC(), undocumented Funcs will be added to AutoComplete All Funcs except __*.au3 from all extra *.au3 Files in the openfile= paths that have a #include-once in it, are added to Style 16 (UserUDFs). All Funcs from the current script file are added to style 17 (InFIleUDFs) All Gobal Const Variables defined in any of the previous defined paths that are defined in a *constants*.au3 scriptfile which also includes #include-once. All Funcs except __*.au3 from all *.au3 Files in the current script directory are added to Style 16 (UserUDFs). All Funcs except __*.au3 from all *.au3 Files in the directories defined with Directive:#SciTE4AutoIt3_Dynamic_Include_Path=;Includes\relative\path;d;\includes\absolute\path Items 1-4 are read from those directories one time during the life of SciTE, but only when the first *.au3 files is opened. (slows it down ~0.5 sec one time to build all required tables) Items 5-6 are read each time an *au3 file is Opened or Switched to its Tab. (slows it down ~0.1 - 0.2 secs per change of tab and at Save time, to build all required current file tables) Configuration options for AutoComplete & Dynamic Includes This is the section in au3.properties where the autocomplete & dynamic includes config is defined. You can copy any of these lines into your SciTEUser.properties: ## ------------------------------------------------------------------------------------------------------------------------ ## dynamic.include Directives and properties reference ## ----------------------------------------------------- #SciTE4AutoIt3_Dynamic_Include=y ;dynamic.include=y/n #SciTE4AutoIt3_Dynamic_Include_whiletyping=y ;dynamic.include.whiletyping=y/n #SciTE4AutoIt3_Dynamic_Include_recursive_check=n ;dynamic.include.recursive.check=n/y #SciTE4AutoIt3_Dynamic_Include_use_local_cache=n ;dynamic.include.use.local.cache=n/y #SciTE4AutoIt3_Dynamic_Include_version=prod ;dynamic.include.version=prod/beta #SciTE4AutoIt3_Dynamic_Include_verboselevel=0 ;dynamic.include.verbose.level=0/1/2 #SciTE4AutoIt3_Dynamic_Include_Path= #SciTE4AutoIt3_AutoItDynamicIncludes_debug=n ;debug.autoitdynamicincludes=n/y #SciTE4AutoIt3_AutoItAutocomplete_debug=n ;debug.autoitautocomplet=n/y #SciTE4AutoIt3_AutoItGotoDefinition_debug=n ;debug.autoitgotodefinition=n/y #SciTE4AutoIt3_AutoItTools_debug=n ;debug.autoIttools=n/y ## ================================================ ## dynamic.include config ## ================================================ #> dynamic.include=y/n n=disabled y=will automatically build the func tables for coloring and autocomplete (requires restart SciTE!) dynamic.include=y #> whiletyping=y/n n=disabled y=will automatically add any required standard or USERincludefile for the current line, on the fly, when ) or enter ispressed !) dynamic.include.whiletyping=y #> use.local.cache=n/y n=disable y=Use cache file for local Include UDFs and VARs which could increase the speed when you have a lot of local includefiles which normally shouldn't be the case dynamic.include.use.local.cache=n #> version prod=Use AutoIt3 Production version beta=Use AutoIt3 Beta version dynamic.include.version=prod #> recursive.check=n/y n=disable y=When you like to only add an Include when it isn't included through another #included file yet. dynamic.include.recursive.check=n # level of debug messages 0/1/2 0=disabled; 1= Warnings & Timing per Function; 2=1+Total timing dynamic.include.verbose.level=0 #> Max number of includes files to read from the user directories in the list. This doesn't including the standard AutoIt3 includes. dynamic.max.includes=150 #> Max number total UDFs in the Userlist to handle by dynamic includes. This doesn't including the standard AutoIt3 includes-UDFs. dynamic.max.funcs=3000 #> Scriptlines longer that this value won't be looked at for Checking for required #Include statements. dynamic.max.line.length=300 ## ================================================ ## Autocomplete and call tip settings ## ================================================ autocomplete.au3.disable=0 autocomplete.au3.ignorecase=1 # Define minimum length before AutoComplete dropdown is shown- default=2 autocomplete.au3.min.length=2 # Include Abbrevs in AutoComplete dropdown (default=1/y) autocomplete.au3.include_abbrevs=1 # Don't show AutoItComplete with these styles (Internal only in SciTE4AutoIt3) autocomplete.ignore.styles.$(au3)=1;2;3;6;7;10;13 # Define which character will be added after Tab or Enter was entered and not on a Function/UDF: Can be \s \t \n for space;tab;newline autocomplete.au3.on.enter=\n autocomplete.au3.on.tab= # List of all AutoComplete API files used api.$(au3)=$(SciteDefaultHome)\api\au3.api;$(SciteDefaultHome)\api\au3.autoit3wrapper.api;$(SciteUserHome)\au3.std.dynamic.calltips.api;$(SciteUserHome)\au3.file.dynamic.calltips.api;$(SciteUserHome)\au3.usr.dynamic.calltips.api;$(SciteUserHome)\au3.user.calltips.api ## ================================================ ## Separate settings for debugging these Lua files ## ================================================ #> Enable debugging for these lua scripts: debug.autoitdynamicincludes=n debug.autoitautocomplete=n debug.autoitgotodefinition=n debug.autoitindentfix=n debug.autoittools=n #> when debug.tofile is defined, log records will be send to the log in stead of OutputPane: debug.tofile=$(SciteUserHome)\SciTE_LUA_Scripts_Debug.err # ------------------------------------------------------------------------------------------------------------------------
    1 point
  3. Shark007

    Tester needed ^^

    Yes. I took that whole section out and put in the few lines I posted above. So I have no need for #AutoIt3Wrapper_Res_HiDpi=Y because the inquiry became redundant.
    1 point
  4. Shark007

    Tester needed ^^

    I omit the whole HiDPI=Y section of AutoIt3Wrapper.au3 because I wiped out that whole section and replaced it with this because this performs best for dragging from one monitor to another and I am unconcerned of not using Awareness. FileWriteLine($hTempFile2, '<asmv3:application>') FileWriteLine($hTempFile2, ' <asmv3:windowsSettings>') FileWriteLine($hTempFile2, ' <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True</dpiAware>') FileWriteLine($hTempFile2, ' </asmv3:windowsSettings>') FileWriteLine($hTempFile2, '</asmv3:application>') All software I create is DPI Aware.
    1 point
  5. Why r u so serious? 😁 If (senseOfHumour = true) { return "Smile"  }else { "Probably it's a good idea to learn the basics of humour" }
    1 point
  6. Hi Danp2, I'm glad to help! Installed and tested: it works very well. Uploading .js code as-is is the best solution even for me. Good work!
    1 point
  7. Latest update just released. See below for change log.
    1 point
  8. I must say I am totally lost now... the shown batch file is used to compile an au3 source file into a au3.exe file, and you state you want to incorporate this in a exe? As stated... give me the specifics what you actually change/move as you can't simply move that batchfile and expect it to work.
    1 point
  9. It seems to be specific for all old DWG files, and I manually add a generic header to the output BMP with this line: FileWrite($hFile, Binary("0x424d000000000000000036040000")) ; BMP Header
    1 point
  10. I don't know if it works for you. I mention this as an idea #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <Excel.au3> Global $oExcel = _Excel_Open() Global $oWorkbook = _Excel_BookNew($oExcel) Global $aData[][] = [ _ ["Month", "Bears", "Dolphins", "Whales"], _ ["jan", 8, 150, 80], _ ["feb", 54, 77, 54], _ ["mar", 93, 32, 10], _ ["apr", 116, 11, 76], _ ["may", 137, 6, 93], _ ["jun", 184, 1, 72]] _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aData, "A1") Global $oChart = $oWorkbook.Activesheet.ChartObjects.Add(300, 10, 600, 400) Global $iRow = UBound($aData) Global $iCol = UBound($aData, 2) Global $sRng = "A1:" & _Excel_ColumnToLetter($iCol) & $iRow $oChart.Chart.SetSourceData($oWorkbook.Activesheet.Range($sRng)) $oChart.Chart.ChartType = 65 ;65 xlLineMarkers - Line with Markers. ;https://learn.microsoft.com/en-us/office/vba/api/excel.xlcharttype ;~ $oChart.Chart.Export(@ScriptDir & "\export_chart.gif", "GIF") $oChart.Chart.Export(@ScriptDir & "\export_chart.jpg", "JPG")
    1 point
  11. If you need to check if a script in a3x format is running, the following function can be used: #Region Includes #include <WinAPIProc.au3> #EndRegion Includes #Region Main _Main() Func _Main() Local $boExists = _ProcessExists_A3X("Example.a3x") MsgBox(0, "A3X-Check", "Count: " & @extended & @TAB & $boExists) EndFunc ;==>_Main #EndRegion Main #Region Functions Func _ProcessExists_A3X($sProcess, $iReturn = 0) ;--------------------------------------------------------------------------------------------------------------- ; Get process list and create string containing process name & ID ;--------------------------------------------------------------------------------------------------------------- Local $aProcessList = ProcessList(), $sProcessList, $iProcess If @error Then Return SetError(0x01, "", False) For $iProcess = 1 To UBound($aProcessList) - 1 $sProcessList &= $aProcessList[$iProcess][0] & "|" & $aProcessList[$iProcess][1] & @CRLF Next ;--------------------------------------------------------------------------------------------------------------- ; Get window list ;--------------------------------------------------------------------------------------------------------------- Local $aWinList = WinList("[class:AutoIt v3]", "") If @error Then Return SetError(0x02, "", False) ; Loop trough all windows Local $iWindow Local $aCmdLine, $sCmdLine Local $iCount For $iWindow = 0 To UBound($aWinList) - 1 ; Get process belonging to windows $iProcess = WinGetProcess($aWinList[$iWindow][1]) If $iProcess < 0 Then ContinueLoop ; Find process name in list StringRegExpReplace($sProcessList, "(?ms).*\r\n([^\|]+)\|" & $iProcess & "\b.*", "$1", 0) If Not @extended Then ContinueLoop ; Get command line as it should contain filepath $sCmdLine = _WinAPI_GetProcessCommandLine($iProcess) $aCmdLine = StringRegExp($sCmdLine, ".*\Q" & $sProcess & "\E.*", 3) If @error Then ContinueLoop $iCount += 1 Next If $iCount Then Return SetExtended($iCount, True) Return SetError(0x03, 0, False) EndFunc ;==>_ProcessExists_A3X #EndRegion Functions
    1 point
  12. dreamzboy, Create the background picture after the tabs and set the $WS_CLIPSIBLINGS style - then you see the tab control. In this example I have also corrected the tab creation code and added a little extra code to force the tabs to fill the entire control (otherwise you get a nasty grey area at top right where there are no tabs): #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <TabConstants.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 400, 300) $cTab = GUICtrlCreateTab (20, 20, 360, 260, $TCS_FIXEDWIDTH) ; Add style for user-defined tab width GUICtrlCreateTabItem ("Option 1") GUICtrlCreateGroup ("Radio A", 40, 60, 320, 200) $radio1 = GUICtrlCreateRadio ("Radio 1", 60, 80) ;DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($radio1), "wstr", 0, "wstr", 0) $radio2 = GUICtrlCreateRadio ("Radio 2", 60, 110) ;DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($radio2), "wstr", 0, "wstr", 0) GUICtrlCreateTabItem ("Option 2") GUICtrlCreateGroup ("Radio B", 40, 60, 320, 200) $radio3 = GUICtrlCreateRadio ("Radio 3", 60, 80) ;DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", 0, "wstr", 0) $radio4 = GUICtrlCreateRadio ("Radio 4", 60, 110) ;DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", 0, "wstr", 0) GUICtrlCreateTabItem ("") ; Force tabs to cover whole width of control $aPos = ControlGetPos($hGUI, "", $cTab) Local $iTabWidth = Int(($aPos[2] - 3) / 2) Local $iTabHeight = Int(20 * $iTabWidth / 190) Local $iParam = BitOR(BitAND($iTabWidth, 0xFFFF), BitShift(BitAND($iTabHeight, 0xFFFF), -16)) GUICtrlSendMsg($cTab, $TCM_SETITEMSIZE, 0, $iParam) GUICtrlCreatePic ("Image_path", 0, 0, 400, 300, $WS_CLIPSIBLINGS) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< GUICtrlSetState(-1, $GUI_DISABLE) ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; Delete the previous GUIs and all controls. GUIDelete($hGUI) EndFunc ;==>Example I hope that helps. M23
    1 point
×
×
  • Create New...