Administrators Jon Posted February 13, 2004 Administrators Share Posted February 13, 2004 http://www.hiddensoft.com/autoit3/files/unstable/Just Larry's Splash fix and a new section in the help file for recommended editors. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Chris_1013 Posted February 13, 2004 Share Posted February 13, 2004 (edited) Excellent - the fix works like a charm :-) Thanks Edited February 13, 2004 by Chris_1013 Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 15, 2004 Author Administrators Share Posted February 15, 2004 While writing the textpad/syntax scripts I had a nasty bug when I misspelt a variable. So I added a "MustDeclareVars" Also, numbers can be unmodified hotkeys now so CybeSlugs () should work. 3.0.94 (15th Feb, 2004) - Added: WinGetCaretPos() - Added: WinGetState() - Added: MustDeclareVars (AutoItSetOption) - Added: Editors page in help - Fixed: Splash() and moveable flag - Fixed: (Internal) Execute() recursion limit dropped to 384 levels - FIxed: (Internal) Calls to Util_AttachThreadInput will not attach to hung windows - Fixed: (Internal) some RegRead/RegWrite sizing problems (Ta, Chris) Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Valik Posted February 15, 2004 Share Posted February 15, 2004 I assume you didn't modify anything so WinGetCaretPos() can return either relative or absolute coordinates? I added an AutoItSetOption to toggle between the two in a later release I sent to CyberSlug (After I had already sent the code to Jon). If you don't have that, you'll probably get requests for it (I know I did and I only had one person using my version ). Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 15, 2004 Author Administrators Share Posted February 15, 2004 No, I didn't change it. Send me that as well. Default to screen coords rather than window like all the others I guess. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Valik Posted February 15, 2004 Share Posted February 15, 2004 I'll just post here, it's not much different. Add member: bool m_bCaretClientCoord; It needs initialized to false in the constructor. In AutoItSetOption add: else if (!stricmp(vParams[0].szValue(), "CaretCoordMode")) { if (vParams[1].nValue() == 0) m_bCaretClientCoord = false; else m_bCaretClientCoord = true; } And in Win_GetCaretPos, add this before Util_VariantArrayDim(&vResult, 2) if (!m_bCaretClientCoord) // Means put them in screen coordinates ClientToScreen(hWnd, &point); Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 15, 2004 Author Administrators Share Posted February 15, 2004 Updated. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 16, 2004 Author Administrators Share Posted February 16, 2004 Updated with WinGetState fix and IsDeclared/Eval() Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 16, 2004 Author Administrators Share Posted February 16, 2004 Yes I know what a ball-ache the changes are as I've just spent 30 mins updating all the help file generation scripts. Will give better flexibility in the future and FileWriteLine now does what its name suggests.... 3.0.94 (16th Feb, 2004) SCRIPT BREAKING CHANGES for FileReadLine and FileWriteLine: FileWriteLine now automatically writes a DOS @CRLF pair UNLESS the last character of the string to write is already @CR or @LF (to make it possible to write non-DOS text files) FileReadLine will correctly read a DOS, UNIX or MAC line (@CRLF, @LF and @CR terminated respectively). FileWrite and FileRead added to add further support. CHANGE YOUR SCRIPTS AS FOLLOWS: From: FileWriteLine($handle, "line" & @LF) To: FileWriteLine($handle, "line" & @CRLF) or FileWriteLine($handle, "line") From: FileWriteLine($handle, "line") To: FileWrite($handle, "line") - Added: FileWrite() and FileRead() - Changed: FileReadLine() and FileWriteLine() - Added: Eval() and IsDeclared() - Added: CaretCoordMode (AutoItSetOption) - Added: WinGetCaretPos() - Added: WinGetState() - Added: MustDeclareVars (AutoItSetOption) - Added: Editors page in help - Fixed: Splash() and moveable flag - Fixed: (Internal) Execute() recursion limit dropped to 384 levels - FIxed: (Internal) Calls to Util_AttachThreadInput will not attach to hung windows - Fixed: (Internal) some RegRead/RegWrite sizing problems (Ta, Chris) Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 16, 2004 Author Administrators Share Posted February 16, 2004 Lots of errors in the FileRead() docs.... Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jpm Posted February 16, 2004 Share Posted February 16, 2004 3.0.94 (16th Feb, 2004)SCRIPT BREAKING CHANGES for FileReadLine and FileWriteLine:FileWriteLine now automatically writes a DOS @CRLF pair UNLESS the last character ofthe string to write is already @CR or @LF (to make it possible to write non-DOS text files)FileReadLine will correctly read a DOS, UNIX or MAC line (@CRLF, @LF and @CR terminated respectively).FileWrite and FileRead added to add further support.CHANGE YOUR SCRIPTS AS FOLLOWS:From: FileWriteLine($handle, "line" & @LF)To: FileWriteLine($handle, "line" & @CRLF) or FileWriteLine($handle, "line")From: FileWriteLine($handle, "line")To: FileWrite($handle, "line")Jon,FileAppend, This is line 1\nThis is line 2\n, myfile.txt\n\nHow this can be translated to AutoItV3 with this new handling,I think it will be better to add a mode doing as <3.0.94OPT("FileLineFeed",$mode) Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 16, 2004 Author Administrators Share Posted February 16, 2004 Jon,FileAppend, This is line 1\nThis is line 2\n, myfile.txt\n\nHow this can be translated to AutoItV3 with this new handling,\n = @LFFileWriteLine($handle, "This is line 1" & @LF & "This is line 2" & @LF ", myfile.txt" & @LF & @LF)I think you probably meant something different... Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jpm Posted February 16, 2004 Share Posted February 16, 2004 \n = @LFFileWriteLine($handle, "This is line 1" & @LF & "This is line 2" & @LF ", myfile.txt" & @LF & @LF)I think you probably meant something different...Yes I doBecause now with the new strategy I get just LF inside the file not as before CRLFSo The OPT can be a solution to handle such difficulty, unless you propose an alternative. Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 16, 2004 Author Administrators Share Posted February 16, 2004 No need for an OPT as until release as previous versions don't exist. Just use @CRLF then (if it is a DOS file...) or @LF if you are writing to a file for UNIX, or just @CR if for a MAC Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jpm Posted February 16, 2004 Share Posted February 16, 2004 No need for an OPT as until release as previous versions don't exist. Just use @CRLF then (if it is a DOS file...)or @LF if you are writing to a file for UNIX, or just @CR if for a MACWe need to change the StringFormat \n tooThe V2 to V3 conversion is not as straight forward Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 16, 2004 Author Administrators Share Posted February 16, 2004 We need to change the StringFormat \n tooThe V2 to V3 conversion is not as straight forwardThe CR LF differences only apply to disk files. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
CyberSlug Posted February 16, 2004 Share Posted February 16, 2004 Jon, did you say at one point that you'd remove the limitation that prevents '(' and ')' from being set as hotkeys? I just tried 3.0.94, and HotKeySet fails for those characters. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
jpm Posted February 16, 2004 Share Posted February 16, 2004 The CR LF differences only apply to disk files.I agrre. But when you write FileWrite($handle,$line) with $line generated with StringFormat you get into the problem of \n generated in the middle of the string.I don't understand for the time being all the consequence of this new change.I will think about Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 16, 2004 Author Administrators Share Posted February 16, 2004 Jon, did you say at one point that you'd remove the limitation that prevents '(' and ')' from being set as hotkeys?I just tried 3.0.94, and HotKeySet fails for those characters.Ah, JP sent me an update and I copied it over the top, I bet that undid the change. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Administrators Jon Posted February 16, 2004 Author Administrators Share Posted February 16, 2004 (edited) I agrre. But when you write FileWrite($handle,$line) with $line generated with StringFormat you get into the problem of \n generated in the middle of the string. I don't understand for the time being all the consequence of this new change. I will think about What's it got to do with stringformat? You can still do \r\n can't you if you intend to write the string to a file? Or just run it through StringAddCR() It can't think of any other way to support all the file operations that everyone wants to do. I undo all the changes and make v3 only support DOS formatted files if everyone wants? This code in vbs: Const ForReading = 1, ForWriting = 2 Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("test.txt", ForWriting, True) f.WriteLine "123" & vblf & "456" Produces the file: 31 32 33 0A 34 35 36 0D 0A The same code in the new version of au3 produces the same output as the VB script. Under the old version it produced an extra CR in the middle: 31 32 33 0D 0A 34 35 36 0D 0A Edited February 16, 2004 by Jon Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now