Leaderboard
Popular Content
Showing content with the highest reputation on 04/02/2023 in all areas
-
Added the Beta SciTE4AutoIt3 installer and portable Zip file which will be the next production version when there are no further issues. Please give them a try when you want and report issues. There is also an fix for a reported issue with proper.case also changing text in Comment-blocks and other styles where it shouldn't be doing that. This is the History for this version, which sort of covers the major changes since 16-03-2021: -------------------------------------------------------------------------------------------------- 2-4-2023 *** Merged the SciTE v 5.3.5 by Neil Hodgson with our own version of SciTE. (Jos) - There Are many changes since the previous version published, so check the changelog available for details. - Installer will now also set SCITEUSER_HOME and copy localappdata files for installs ran by a different Admin account. *** Updated SciTE/Lua/ v21.316.1639.0.0 (Jos) Implemented Dynamic AutoComplete and Auto-Add required #include<>; lines at the top of your script while typing. This is a major overhaul of the internal way SciTE4AutoIt3 works, so I encurage you to read up on how things work in the supplied helpfile page and forum thread. *** Updated Au3Stripper v23.402.1150.0 (Jos) - v21.316.1639.1 Fixed: Skip merging Directive lines ending with continuation character (9/04/2021) - v21.316.1639.2 Fixed: Directive should have name #Au3Stripper_Ignore_Errors_in_Funcs (the s at the end was missing) (17/03/2022) - v22.611.2153.1 Changed: Iteration console messages from - (Warning) to --- (Brown) color (22/09/2022) - v22.611.2153.2 Added option /leavemastercomments" or "/lmc" to leave comments in Master script for /mergeonly or /mo (13/02/2023) *** Updated AutoIt3Wrapper v23.402.1150.0 (Jos) - v21.316.1639.1 Fixed: running the "#autoIt3Wrapper_run_after" defined programs twice in some occasions. (23/03/2021) - v21.316.1639.2 Added: SciTE console message from Watcher when AutoIt3Wrapper was terminated. (14/04/2021) - v21.316.1639.3 Fixed: UTF16 files and au3check (21/05/2021) - v21.316.1639.4 Changed: hotkeyset console messages in case of failure. (28/05/2021) - v21.316.1639.5 Added: small Sleep() to fix race condition with shoing ConsoleWrite output with Elevated scripts. (23/08/2021) - v21.316.1639.6 Fixed: getting error for missing include when in commentblock (13/10/2021) - v21.316.1639.7 Fixed: restoring bookmarks when compiling and running au3stripper. (16/11/2021) - v21.316.1639.8 give other warning when fileversion directive isn't found (16/11/2021) - v21.316.1639.9 Fix #RequireAdmin detection when containing inline comment. (11/03/2022) - v21.316.1639.10 Minor formating change on "XXXX ended. rc:xx" lines (25/05/2022) - v21.316.1639.11 Renamed Func Debug() to ShowDebug() (6/06/2022) - Added: Directive #AutoIt3Wrapper_Add_Includes replacing #AutoIt3Wrapper_Add_Constants It will add all required standard includes for the script. (15/06/2022) - v22.611.2153.5 Use previous found AutoIt3 directory in _Get_Include_Paths (16/06/2022) - v22.611.2153.6 Renamed all UDFs in script to contain _ prefix. (16/06/2022) - v22.611.2153.6 Few more changes (16/06/2022) - v21.316.1639.8 Made Compile the default button in "Compile with Options" (28/09/2022) - v21.316.1639.13 Fixes for RES_Field1&2 directive avaoiding duplication (4/10/2022) - v21.316.1639.15 Added the AU3Check -w 7 description to the GUI (11/01/2023) - v21.316.1639.16 Added directive #AutoIt3Wrapper_Run_Master to run another Master script on F5/Run (18/02/2023) *** Updated Tidy v23.402.1150.0 (Jos) - v21.316.1639.1 Fixed: hardcrash reading the new au3.api definition. (23/03/2021) - v21.316.1639.2 Fixed: hardcrash for one line input script (30/03/2021) - v21.316.1639.3 Fixed: hardcrash when option properconstants=1 is enabled (30/03/2021) - v21.316.1639.4 Fixed: hardcrash on a long inputline without spaces. (8/04/2021) - v21.316.1639.5 Fixed: Directive line ending with Underscore: space was added (9/04/2021) - v21.316.1639.6 Fixed: Removed Debug output for $FUNTION giving too much output (6/07/2021) - v21.316.1639.7 Fixed: Always show errors when encoutered. (30/07/2021) - v21.316.1639.8 Fixed: Don't tidy comments on an #include line (10/09/2021) - v21.316.1639.9 Fixed: Add space at the end of a literal string when missing. (29/09/2021) - Fixed: /rel parameter conflict (1/03/2022) - v21.316.1639.10 Fixed: Proper varaiable didn't work for Array variables. (1/03/2022) - v21.316.1639.11 Updated: TAB logic and decommisioned TABSIZE option from ini. TABCHAR now solely needs to be used. (9/03/2022) - v21.316.1639.12 Fixed: #preprosessor line with in the text FUNC() was not skippes causing an error. (23/03/2022) - v21.316.1639.13 Fixed: Don't add an Indent in a commentblock for empty lines. (23/04/2022) - v21.316.1639.14 Fixed: Avoid Tidying the string between <> in "#include <>" (24/04/2022) - v22.611.2153.1 Fixed: Show tided scriptline in the generated Doc file in stead of input (9/10/2022) - v22.611.2153.1 Fixed: Check for line were Variable is declare now working again in documentation (9/10/2022) - v22.611.2153.1 Fixed: more docs generation issues fixed (10/10/2022) - v22.611.2153.5 Fixes for CommentBlocks and Indenting (4/11/2022) - v22.611.2153.6 Removed extra space on continuation lines (16/11/2022) *** Updated Abbreviations (mLipok) - Updated au3abbrev.properties and helpfile page. -------------------------------------------------------------------------------------------------- Thanks.4 points
-
Subtract from a specific time to find out what time it was.
Dsmoeg999 reacted to mistersquirrle for a topic
Did you try my example? I think that it does what you want. I updated it slightly so that you can use hms as separators for the time instead of colons :. Here's the updated example: Global $sStartDate = @YEAR & "/" & @MON & "/" & @MDAY & " " & "05:44:15" Global $sEndDate = @YEAR & "/" & @MON & "/" & @MDAY & " " & "14:44:15" Global $iDifference = _DateDiff('s', $sStartDate, $sEndDate) ConsoleWrite('Seconds difference for comparison: ' & $iDifference & @CRLF) ConsoleWrite(@TAB & __MillisecondToTimestamp($iDifference, True) & @CRLF) ConsoleWrite(@TAB & __MillisecondToTimestamp($iDifference, True, False) & @CRLF) $sStartDate = @YEAR & "/" & @MON & "/" & @MDAY & " " & "05:44:15" $sEndDate = @YEAR & "/" & @MON & "/" & @MDAY & " " & "14:54:45" $iDifference = _DateDiff('s', $sStartDate, $sEndDate) ConsoleWrite('Seconds difference for second comparison: ' & $iDifference & @CRLF) ConsoleWrite(@TAB & __MillisecondToTimestamp($iDifference, True) & @CRLF) ConsoleWrite(@TAB & __MillisecondToTimestamp($iDifference, True, False) & @CRLF) Func __MillisecondToTimestamp($iMs, $bSeconds = False, $bColonSeparator = True) Local $sTimestamp If $bSeconds Then $iMs *= 1000 $iMs = Int($iMs, 0) ; Auto Int ; Convert the milliseconds to days, hours, minutes, and seconds $iDays = (($iMs >= 86400000) ? Int($iMs / 86400000) : 0) $iHours = Int(Mod($iMs, 86400000) / 3600000) $iMinutes = Int(Mod($iMs, 3600000) / 60000) $iSeconds = Int(Mod($iMs, 60000) / 1000) ; Format the timestamp as [DD ]hh:mm:ss.zzz ; Not using StringFormat here because it's considerably slower... when you do it 10K+ times, so probably doesn't matter at all for this $sTimestamp = _ ($iDays > 0 ? StringRight('0' & String($iDays), 2) & (($bColonSeparator) ? ' ' : 'd') : '') & _ StringRight('0' & String($iHours), 2) & (($bColonSeparator) ? ':' : 'h') & _ StringRight('0' & String($iMinutes), 2) & (($bColonSeparator) ? ':' : 'm') & _ StringRight('0' & String($iSeconds), 2) & _ ((Not $bSeconds) ? _ (($bColonSeparator) ? '.' : 's') & StringRight('00' & String($iMs), 3) & (($bColonSeparator) ? '' : 'ms') : _ (($bColonSeparator) ? '' : 's')) Return $sTimestamp EndFunc ;==>__MillisecondToTimestamp And here's the output: Seconds difference for comparison: 32400 09:00:00 09h00m00s Seconds difference for second comparison: 33030 09:10:30 09h10m30s You can change the separators in the function if you need it to be "H", "Min", "Sec". If you don't want the 0 padding, just change the second param of StringRight from 2 to 1.1 point -
Keeping 2 controls the same height after resizing
argumentum reacted to ahha for a topic
You are correct it's an editor of sorts. Thanks for the intro to ISN Studio. It looks impressive. I've updated the code to show how I sync the line numbers as an FYI for others. I'm unsure how to replace the code in the initial listing, so it's listed here. #AutoIt3Wrapper_run_debug_mode=Y ;use this to debug in console window <--- LOOK ; Opt("MustDeclareVars", 1) ;0=no, 1=require pre-declaration ;v3ai - trying to add line numbers on left ;v3aj - keep line number control synced with right edit control line number ;v3ak - cleaned up some code #include <Debug.au3> ;for _DebugArrayDisplay #include <GUIConstantsEx.au3> #include <GUIEdit.au3> #include <GuiStatusBar.au3> ;for status bar #include <WindowsConstants.au3> Global $g_hGUI, $g_hStatus Global $g_iOldLineNum = 0, $g_iLineNum = 1 ;init values Global $g_ihEditFVLineOld = 0 ;0 based first visible line in $g_hEdit control Global $g_hEdit, $g_aPos_hEdit Global $g_hLNEdit, $g_aPos_hLNEdit Global $iBorderWidth = 4 _SetUpWindows() ;set up GUI, Edit, and StatusBar ;has GUISetState(@SW_SHOW, $g_hGUI) _MAINLoop() ;main loop Exit Func _SetUpWindows() $g_hGUI = GUICreate("My GUI", 800, 570, -1, -1, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX), BitOR($WS_EX_CLIENTEDGE, $WS_EX_ACCEPTFILES)) ;handle GUISetBkColor(0x00f000, $g_hGUI) ;window background green 0x00f000 so see individual controls ;--- Create status bar and Set parts Local $aParts[3] = [150, 300, -1] ;right edge of 1st part at 75, 2nd at 150, 3rd = -1 meaning right edge extends to the border of the window ;v2gq need more room for Line: xxxxxx / yyyyyy $g_hStatus = _GUICtrlStatusBar_Create($g_hGUI) _GUICtrlStatusBar_SetParts($g_hStatus, $aParts) _GUICtrlStatusBar_SetText($g_hStatus, "Line: xx", 0) ;& _GUICtrlEdit_LineFromChar($g_hEdit, -1) + 1) ;+1 as Zero based _GUICtrlStatusBar_SetText($g_hStatus, "Part 2", 1) ;"Part 2", 1) _GUICtrlStatusBar_SetText($g_hStatus, "Part 3", 2) ;"Part 3", 2) ;--- Create Edit Control in rest of window area Local $aClientSize = WinGetClientSize($g_hGUI) ;[0] = Width of window's client area ;[1] = Height of window's client area Local $iStatusBarHeight = _GUICtrlStatusBar_GetHeight($g_hStatus) ;get actual height in case changed above ;Pause("$iStatusBarHeight = '" & $iStatusBarHeight & "'") ;we get 17 which is not correct - need to account for border on status bar also $iStatusBarHeight = $iStatusBarHeight +1 ;<-- border touches +2 ;<-- leaves a border 1 pixel Local $iMFF = 5 ;manual fudge factor Local $iWE = $aClientSize[0]-(2*$iBorderWidth) ;Width of Edit Local $iHE = ($aClientSize[1]-(2*$iBorderWidth)) - $iStatusBarHeight - $iMFF ;Height of Edit ;Manual Fudge Factor $g_hEdit = GUICtrlCreateEdit("", $iBorderWidth + 100, $iBorderWidth, $iWE - 100, $iHE, BitOR($ES_AUTOVSCROLL, $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_NOHIDESEL)) ;control ID GUICtrlSetResizing($g_hEdit, $GUI_DOCKBORDERS) ;control will grow as the window GUICtrlSetBkColor($g_hEdit,0xFFFFFF) ;0xFCD299 ;0xB9700A ;0xFDB44E ;0xffa500) GUICtrlSetColor($g_hEdit,0x000000) ;text color GUICtrlSetFont($g_hEdit, 10, 400, 0, "Courier New") ;monospace font _GUICtrlEdit_SetLimitText($g_hEdit, -1) ;now Set parts in status bar Local $sMsg = "Line: " & (_GUICtrlEdit_LineFromChar($g_hEdit, -1) + 1) & " / " & _GUICtrlEdit_GetLineCount($g_hEdit) ;+1 as Zero based _GUICtrlStatusBar_SetText($g_hStatus, $sMsg, 0) ;+1 as Zero based ;Part 0 to show Line: ;looks like I need to dynamically scale the height on resizing? - do in While 1 loop Global $g_hLNEdit = GUICtrlCreateEdit("1234567", $iBorderWidth, $iBorderWidth, 70, $iHE, BitOR($ES_AUTOVSCROLL, $ES_WANTRETURN)) ;control ID ;works GUICtrlSetResizing($g_hLNEdit, BitOR($GUI_DOCKLEFT, $GUI_DOCKTOP, $GUI_DOCKWIDTH)) GUICtrlSetBkColor($g_hLNEdit,0xFCD299) GUICtrlSetColor($g_hLNEdit,0x0000ff) ;text color GUICtrlSetFont($g_hLNEdit, 10, 400, 0, "Courier New") ;change default font _GUICtrlEdit_SetLimitText($g_hLNEdit, -1) Local $i, $sMsg = "", $sI For $i = 1 To 2345 ;build up a string for testing $sI = StringRight(" " & $i, 7) $sMsg = $sMsg & $sI&@CRLF ;need right justified, since monospace prefix with spaces " " Next _GUICtrlEdit_SetText($g_hLNEdit, $sMsg) ;display GUISetState(@SW_SHOW, $g_hGUI) ;--- Let's show our creation GUIRegisterMsg($WM_SIZE, "WM_SIZE") EndFunc ;Func _SetUpWindows() Func WM_SIZE($hWnd, $iMsg, $wParam, $lParam) ;Resize the status bar when GUI size changes ;_ResizeLN() ;resize $g_hLNEdit based on $g_hEdit ;does not always fully adjust so keep in While 1 loop ;_SyncLN() ;keep these user funcs out of this Func WM_SIZE see: https://www.autoitscript.com/forum/topic/107977-gui_rundefmsg-and-fdblclk/#comment-761384 _GUICtrlStatusBar_Resize($g_hStatus) Return $GUI_RUNDEFMSG EndFunc ;==>WM_SIZE Func _ResizeLN() ;Local $dHRatio ;decimal Height ratio Local $aPos_hEdit = ControlGetPos($g_hGUI, "", $g_hEdit) ;$a[0] = X position, $a[1] = Y position, $a[2] = Width, $a[3] = Height ;_DebugArrayDisplay($aPos_hEdit, "$aPos_hEdit") Local $aPos_hLNEdit = ControlGetPos($g_hGUI, "", $g_hLNEdit) ;_DebugArrayDisplay($aPos_hLNEdit, "$aPos_hLNEdit") ;$dHRatio = $aPos_hEdit[3] / $aPos_hLNEdit[3] ;Pause("$dHRatio = '" & $dHRatio & "'") ;this is all very interesting but we want them the same height so redraw $g_hLNEdit if needed If $aPos_hLNEdit[3] <> $aPos_hEdit[3] Then ;redraw/move ;recall Global $g_hLNEdit = GUICtrlCreateEdit("1234567", $iBorderWidth, $iBorderWidth, 70, $iHE, BitOR($ES_AUTOVSCROLL, $ES_WANTRETURN)) ;control ID ;works ;GUICtrlCreateEdit ( "text", left, top [, width [, height [, style = -1 [, exStyle = -1]]]] ) ;show what we're doing ;~ Local $sStatus = "Edit Window height = '" & $aPos_hEdit[3] & "'" & @CRLF & _ ;~ "Line Window height = '" & $aPos_hLNEdit[3] & "'" & @CRLF ;~ ControlSetText("My GUI", "", $g_hEdit, $sStatus ) ;show status - use handle to directly address it ;~ Pause("Click to adjust.") ;GUICtrlSetPos($aPos_hLNEdit, $iBorderWidth, $iBorderWidth, 70, $aPos_hEdit[3]) ;does not seems to resize vertically ControlMove("", "", $g_hLNEdit, Default, Default, 70, $aPos_hEdit[3]) ;WORKS! EndIf EndFunc ;Func _ResizeLN() Func _SyncLN() ;A note about _GUICtrlEdit_GetFirstVisibleLine - it keeps track from the very first line (which is 0) what is displayed ;for our purposes we don't want to create a line number control having a huge set of numbers like from 1 to a million or plus ;what we want to do is simply show what the edit box line number is so we can dyamically create the line numbers ;and only change the line numbers when the $g_hEdit first visible line changes ;recall initially Global $g_ihEditFVLineOld = 0 ;0 based first visible line in $g_hEdit control Local $i_hEditFVLine = _GUICtrlEdit_GetFirstVisibleLine($g_hEdit) ;0 based first visible line in $g_hEdit control If $g_ihEditFVLineOld <> $i_hEditFVLine Then ;put new LN ;-1 as line numbers start with 1 and _GUICtrlEdit_GetFirstVisibleLine is 0 based ;need to fill $g_hLNEdit with line numbers and since starting at the top it's unlikely to be more than 100 lines Local $i, $sMsg = "", $sI For $i = $i_hEditFVLine + 1 To $i_hEditFVLine + 100 ;build up a string for testing $sI = StringRight(" " & $i, 7) $sMsg = $sMsg & $sI&@CRLF ;need right justified, since monospace prefix with spaces " " Next _GUICtrlEdit_SetText($g_hLNEdit, $sMsg) ;display $g_ihEditFVLineOld = $i_hEditFVLine ;update the old first view EndIf EndFunc Func _MAINLoop() Local $nMsg, $aMsg, $iReturn, $sMsg ;MAIN loop START While 1 ;Do everything inside this loop while the program is running. $aMsg = GUIGetMsg(1) ;Check what's happening in the GUI $nMsg = $aMsg[0] ;now I know that there is just 1 GUI so I can just use [0] ;skip checking if no event If $nMsg <> 0 Then ;we have a message so Switch $nMsg ;Check for GUI events Case $GUI_EVENT_CLOSE Exit ;program Case Else ;Pause("$nMsg = '" & $nMsg & "'") ;do nothing as some negative values used for other purposes EndSwitch ;End running through GUI events. EndIf ;---- do these always ---- ;Sleep(20) ;Not really needed since GUIGetMsg() has a built-in delay. ;possibly update Line: $g_iLineNum = _GUICtrlEdit_LineFromChar($g_hEdit, -1) ;get current line, Zero based If $g_iOldLineNum <> $g_iLineNum Then ;it's changed $g_iOldLineNum = $g_iLineNum ;so update $sMsg = "Line: " & $g_iLineNum + 1 & " / " & _GUICtrlEdit_GetLineCount($g_hEdit) ;+1 as Zero based _GUICtrlStatusBar_SetText($g_hStatus, $sMsg, 0) ;Part 0 to show Line: EndIf ;check to see if resizing occurred for possible dynamic adjustment of Line Number Edit box ;probably need to learn to do this in Func WM_SIZE _ResizeLN() _SyncLN() WEnd ;End main body loop ;MAIN loop END EndFunc ;Func _MAINLoop() Func Pause($text="") ;__scrolltext("Debug: Paused " & $text & @CRLF) MsgBox(262144, "DEBUG", "Paused: " & $text) EndFunc ;Func Pause($text="")1 point -
Moved to the appropriate AutoIt General Help and Support forum, as the AutoIt Example Scripts forum very clearly states: Moderation Team1 point
-
@BlaxxunInteresting. So I think we should be displaying @OSArch instead of @OSType. Then it would display _WD_Startup: OS: WIN_11 X64 22621 instead of _WD_Startup: OS: WIN_11 WIN32_NT 22621 Thanks and sorry for the confusion. 🙂1 point
-
I'm pretty sure Danyfirex means the Win32 (collective term for x86 and x64 code) implementation of the UI Automation code. It's already implemented in AutoIt.1 point
-
Multiline comment: what is considered the comment content?
SOLVE-SMART reacted to Jos for a topic
Just a little off-topic remark and only FYI: I see that there is an issue in the current au3lexer and it doesn't do correct syntax highlighting for these: The lexer should not recognize them as Start/Stop of commentblocks and should simply be colored as some PREPROCESSOR statement. Will be fixed.1 point -
Multiline comment: what is considered the comment content?
SOLVE-SMART reacted to genius257 for a topic
Hi all Thanks for the answers so far! So i think i will go with the AB solution. I agree that most if not all people will use multi-line comments, where the text content always starts at line two in the block (me included). It does make the most sense. But from a parser perspective, all content after the #cs, and before the #ce that works in the native AutoIt3 executable should be included. I can see why you think that, bout my current parser needs to be a one to one implementation of the parser rules AutoIt version 3.3.14.5 uses. I apologize that i did not make clear what my current target AutoIt version was. I do plan to make parsers for future AutoIt3 versions also, but choose 3.3.14.5 as my starting point. If they "patch" the multi-line syntax in a later version, that specific parser implementation will of course reflect that I thank you all! You have saved me days of time wasted on this "simple" implementation choice1 point -
It's version 7.2.8.1124 from 2015. Direct download link from the source: http://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/win/7.x/7.2/en_us/FoxitReader728.1124_enu_Setup.exe That was the last version you could opt to use the classic toolbar. Anything after that you're stuck with the Ribbon, Here's the discussion about it on Foxit's forum: https://forums.foxitsoftware.com/forum/portable-document-format-pdf-tools/foxit-reader/152744-need-previous-version-of-foxit-reader-7-2#post1527441 point
-
Ah here yourproblem was. So is it works now or do you have other issues ?1 point
-
AV / Firewall issue ?1 point
-
I don't believe these are needed / supported any longer by the webdrivers. If you still have a need, you could manually enable them using _WD_CapabilitiesDefine.1 point
-
I usually keep the directives on separate lines. My preference would be to consider the example as invalid code. #csA and #ceC should be reported as invalid directives. using comment on directive lines can be done with existing syntax without ambiguity. #cs ;A B #ce ;C or implicit comment (not my preference) #cs A B #ce C I have voted for AB because that seems to be the current implementation but my preference would be it would be just B. I prefer to see comment on a directives line not as part of the comment. It has to major functions 1: remark why did I comment this code 2: add a marker to both begin comment and end comment to pair both, especially used with nested comments or large blocks of code.1 point
-
GuiBuilderPlus [updated March 24, 2024]
TheSaint reacted to kurtykurtyboy for a topic
It's been a while. But here we are again, finally, with another update. Check the first post for v1.0.0-beta4. I'm excited to announce the new undo/redo functionality, which makes this little program 100x more useful (in my humble opinion). I'm sure there are lots of bugs to be found. Let me know! Highlights: FIXED: Jumping while resizing ADDED: Undo / redo functionality ADDED: Change window title to match Title property UPDATED: More sophisticated handling of AutoIt3.exe location UPDATED: Updated About dialog1 point