6 posts in this topic
I thought I might share my little Language UDF plus the more powerful SciTE Tool to ship Strings from SciTE into the xml file. While I haven't had the time to fully adapt the small UDF to one of the big XML-UDFs the so called "Language Transmitter" that basically writes the XML file for you runs mostly on "XML DOM wrapper (COM)" by eltorro. The Transmitter should work with other XML-Language-UDFs depending on their encoding.
First let's start with the UDF, there are two functions of interest: _LangInit($sFilePath) and s($sString) As you will have guessed, _LangInit($sFilePath) is called once to initialize the UDF and s($sString) is used to receive the string to your key. Plain and simple.
Now to the actual "new" part, the Language Transmitter. It basically allows you to transfer a selected String from SciTE into a xml file. While doing so it will scan for AutoIt variables, macros etc. and parse the string to fit StringFormat(). It then saves the formatted string in the xml file and returns the formatted call into SciTE. If the selected string is already defined it will directly parse the key into SciTE. To change the default output file, you can either edit the ini-file in the @ScriptDir of the LanguageTransmitter.exe or press Alt+A on empty space again and keep clicking cancel/no until the Transmitter let's you select the current output file. Standard output is strings.xml in the current opened AutoIt Script.
; given the line: MsgBox(16, 'Error', 'Error message') ; select 'Error' run the Transmitter follow the instructions, repeat with 'Error message'. Outcome (e.g.): MsgBox(16, s('Error'), s('Error_msg')) ; Variables and Macro example: $sString = "Value: " & $iValue & @CRLF & 'Another value: '& $iValue2 ; Select the full string including all AutoIt variables and macros etc. in SciTE and press Alt+A (default) to run the LanguageTransmitter ; follow the instructions and it will then paste a formatted string like that into SciTE: $sVar = StringFormat(s('Key'), $iValue, $iValue2) ; the correlating xml entry should look like that: ; <string name="Key">Value: %s\r\nAnother value: %s</string> ; as you can see @CRLF has been replaced with \r\n as well. If you are working on a project and want to directly add a string to the xml file just start the Language Transmitter without selecting any text, enter your string and a key.
Since xml files are required all examples can be found in the zip file. There are two examples, one includes a language selection interface.
Language File Checker
I added a script to check whether the xml file contains all required strings or even unnecessary strings.
Hope you like my little helper!
UDF - LanguageSupport.zip
Hello, i'm trying to rename a variable to another variable name (not the value attached to the variable). This would save me TONS of coding.
Here is an example:
Local $clear1="$SATJ" ;sets the $clear1 variable to become $SATJ
GUICtrlSetState($clear1 & "3", $GUI_UNCHECKED) ;i want this to come out to be $SATJ3, it should look something like - GUICtrlSetState($SATJ3, $GUI_UNCHECKED)
I've already tried
any help is greatly appreciated!!!
Hi everyone. I want to format the output of _INetGetSource to look nice and pretty.
Example google.com source output:
by eltorro Posted April 26, 2010
Most print preview solutions use the MFC Doc/View architecture which limits it usefulness outside of c++. I found an article where a Delphi programmer used Enhanced Meta Files wrapped in a custom header and packaged together to create a print preview control. After a little more searching, It looks like using EMFs is a solution that would work.
Some people suggest to create the document in Word or HTML and use Word or a browser to view it. Indeed, I have rendered documents to HTML and used the IE UDF to display the contents and/or print them. Not quite as ideal as one would like.
Using GRS's printwin.au3 as a start, I came up with a print preview solution which others may be able to expand upon
This baby can do almost any language! I found Gleany on this site and set it up on a fresh win10 install. all i would need to do to make it build an exe of the search files app we discovered is the .NET Target Framework download to build 100 % but the exe works and generates! You also need to add the path the the version of csc.exe that you want to run. MSBuild is part of .NET and can read your .csproj file.
YOU can develop .NET OR C/C++ on this baby!
Super lightweight (fit for crappy laptops), and you can use any dev compilers you wish, Ming, MS, etc, whatever.
To use the build, you need to open the csproj file, else, to check your syntax it can compile individual files as well. The warning are because I do not have the .NET 4.6 Targeting Pack installed... LOL, and I could get rid of the Core warning, yes, I did not want to build a .NET Core.dll I wanted a live x64 exe! Told you MSBUILD could handle .CSPROJ, .VBPROJ, and all others Microsoft. Don't let Visual Code or Visual Studio slow you down, although, this works with Visual Code as well but there is only debugging in CORE.DLL projects