Leaderboard
Popular Content
Showing content with the highest reputation on 03/29/2020 in all areas
-
Can AutoIT script retrieve text from web page?
Colduction and one other reacted to TheXman for a topic
Are you @oemript under a new account? Your post looks quite similar to this one, references the same site, and shows the same amount of effort.2 points -
Personal Function Documentation
SouzaRM reacted to seadoggie01 for a topic
I love the help file and all the information it contains. Its fatal flaw is that it can't be added to. I create a lot of wrapper functions and install a lot of UDFs, so it gets tiring opening the include file each time I need to remember if it returns a 0 or 1 based array, what this particular error means, or what the argument should be. I've been fed up with this for too long, hence this script. Features Reads *.au3 files to parse UDF style headers to get function information (the UDF header style is defined here, thanks water!) Supports multiple search paths Integration with SciTe (more on this later) Stores function documentation so it doesn't need to re-read files each startup (Currently, in a config file) Only updates a file based on it's last modification date Will update another instance instead of launching a new one before exiting. Planned Updates Optionally (user's choice) use a SQLite Database to increase storage/read speeds Redirect unknown functions to AutoItHelper.exe to open the almighty Help File Remove functions from folders not in the search folders (would be a lot easier with SQLite) Fully support and parse UDF headers SciTE Integration This took me a while to figure out (I thought I needed to use lua), but it's totally worth it. By editing your "User Options File" aka SciTEUser.properties files, you can launch this file with a keyboard shortcut. I put this in mine: (After compiling) command.41.$(au3)="$(SciteDefaultHome)\..\FunctionDocs.exe" "$(CurrentWord)" command.name.41.$(au3)=Personal Function Docs command.shortcut.41.$(au3)=Shift+F1 command.subsystem.41.$(au3)=2 command.save.before.41.$(au3)=2 command.quiet.41.$(au3)=1 (Note that 41 is an unused command number. You may need to change this if you've added other tools) It says (respectively): * Launch FunctionDocs.exe from the directory above SciTE.exe with the currently selected word as a command line parameter * Make the MenuItem in SciTE named "Personal Function Docs" * Use Shift F1 as the shortcut to start the program * (I don't know) * Don't save the file before launching the program * (And my favorite) Don't clear SciTE's output panel1 point -
Maybe read the automatic generated post again? It does clearly state it was moved to the appropriate forum, hence the one it is in now is the correct one and you seem to have found it or else you couldn't have posted here ....right? anything else that is still unclear? Jos1 point
-
I second what @RTFC said. Depending on the nature of the problem you have to solve, some norm may be completely misleading or unsignificant, while another (more or less unintuitive) will provide enlightning results. It often boils down to which mathematical property your problem requires or implies, which some norm(s) satisfy while other(s) destroy. Digging further into this for the general case needs non-trivial background as you can imagine. Clearly, stepping into higher dimensions makes things less simple. The distance between two points in 1D, 2D, 3D, ... nD is pretty intuitive. But even in as low as 2D, deciding what means the "distance" between two closed curves (say shadows projected on a paper of two different patatoes) is something open to very different interpretations. Is the distance between the closest points of the two curves more meaningful for your problem than the distance of their center of gravity, or distance between the most distant points, or whatelse? Just with this example you can see the answer can't be unique and fit every problem involving two closed curves in 2D plane. Going into higher dimensions generally breaks down intuition because "usual" (everyday life) properties don't hold anymore. Even stepping from 2D to 3D can be tricky: for instance, rotations in 3D aren't commutative anymore (the result depends on the order of applying two or more of them), but they are in 2D. Nonetheless you can very often rely on results published in the huge freely available academic litterature, as well as practical implementations easy to use provided by computational packages like the one @RTFC has wrapped into his useful UDF.1 point
-
You're welcome! Glad I could help.1 point
-
Hi TheXman, Apologies for the late reply. Thanks for the investigation, you nailed it. The mystery is now solved1 point
-
Euclidean Distance (Points)
seadoggie01 reacted to RTFC for a topic
Please don't. No calculus is required, yippeee. You can think of "distance" as: 1. how far is point A from point B in some space with any number of dimensions, and 2. how dissimilar (distant from one another) are two mathematical entities, be it a scalar, a vector, a matrix, or a tensor. There are various so-called "norms" for expressing this, of which the Euclidean norm/distance is one. The problem with high-dimensional entities is that they can be close in some respects and distant/dissimilar in others, so it's not always easy to figure out which method to use for quantifying this (that is, which norm is most appropriate in that particular context). But I think it's great that you're exploring this topic.1 point -
Can AutoIT script retrieve text from web page?
oemript reacted to Colduction for a topic
Yes, try to search and learn INetGetSource() to get text in website and try _StringBetween() function to get main text in that website (_StringBetween() is an array, you must convert it to string by using _ArrayToString() function). You must see website's source by using your favorite Browser to know how you want to retrive text😃1 point -
Update on this. In record time, Cisco released a custom version of the client for us that will auto-answer every call. Thanks - this can be closed. Stay safe everyone1 point
-
@fjorger If you want to ensure that the XML prolog is on its own line (regardless of the MSXML version), then you can TIDY the XML and write the file using a non-XML write function: #include <xml.au3> example() Func example() Const $XML_DATA = _ '<?xml version="1.0" encoding="UTF-8"?>' & @CRLF & _ @CRLF & _ @CRLF & _ @CRLF & _ '<SETTINGS>' & @CRLF & _ @CRLF & _ @CRLF & _ '</SETTINGS>' Local $oXmlDoc Local $sXML $oXmlDoc = _XML_CreateDOMDocument() ;Create xml object _XML_LoadXML($oXmlDoc, $XML_DATA) ;Load XML $sXML = _XML_Tidy($oXmlDoc, "UTF-8") ;Tidy XML ConsoleWrite($sXML & @CRLF) ;Display XML FileWrite("test.xml", $sXML) ;Write XML EndFunc Output & content of test.xml file: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <SETTINGS> </SETTINGS>1 point
-
The result is almost the same. Exception : Areas with double quotation marks are masked by Google with \", and not adjusted by your code. ... "xxx" ... -> Google : ... \"xxx\" ... But this can be easily filtered - apart from that, "Good Job" . Yes, the JSON UDF I use here was developed by @AspirinJunkie (a very respected member in the German forum, but not so active here) Thread : https://autoit.de/thread/85435-json-udf/1 point
-
@Musashi, It works fine with me. First I used the Json.au3 which I was using for WebDriver UDF and it failed. Later I found that it was a different one with same name. With the new file it works fine. I don't know how many variations there could be in Google API's return strings, but, assuming that it would be same format as this one, the following code works for me, too. Please take a look and see if there are any problems I don't see. As an amateur who started learning AutoIt at a pretty old age, I am always amazed at your expertise. Thank you for sharing your knowledge. Global $g_sMytext, $g_sFrom, $g_sTo, $g_Url, $g_oHTTP, $g_sData, $g_aData, $g_sResult $g_sMytext = 'This is an English text to be translated into Italian. ' & _ 'The Moderation team will do their best to act in fair and reasonable manner. Sanctions will ' & _ 'only be applied as a last resort and any action taken will be explained in the relevant thread. ' & _ 'If moderation action is taken, you will need to acknowledge this through a dialog or you ' & _ 'will be unable to post further in the forum. Please note that this dialog is not an agreement ' & _ 'that the warning was justified - it is only there so that members are aware that moderation ' & _ 'action has been taken and that they may have certain restrictions applied to their account. ' & _ 'If you feel that you have been unfairly moderated then contact the Moderator concerned - ' & _ 'using a PM or the "Report" button is preferable to opening a new thread (although new members ' & _ 'may have to do this). But do be aware that the Moderation team has the final word - the rules ' & _ 'are set out by the site owner and you are only welcome here if you respect his wishes.' $g_sFrom = "en" $g_sTo = "it" $g_Url = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=" & $g_sFrom & "&tl=" & $g_sTo & "&dt=t&q=" & $g_sMytext $g_sData = BinaryToString(InetRead($g_Url), 4) $g_sData = StringRegExpReplace($g_sData, ',null,null.+md"', "") $g_aData = StringRegExp($g_sData, '\["(.*?)","', 3) For $i = 0 To UBound($g_aData)-1 $g_sResult &= $g_aData[$i] Next ConsoleWrite("+ Source : " & $g_sMytext & @CRLF) ConsoleWrite("> Result : " & $g_sResult & @CRLF)1 point
-
ClipGet returning empty
a6point6 reacted to alienclone for a topic
i found an old thread that suggested there was not enough time between the ctrl+c and the ClipGet() for the content to get written to the clipboard, try a msgox of $sData after it is set to check if that is the case, if so then add a sleep between the ctrl+c and the ClipGet()1 point -
Can you attach the shortest script and xml file that reproduces the issue? Update: @fjorger You can disregard the request for a script and test file. I was able to recreate the issue on my workstation. When preserving white space, I'm clueless as to why there's a difference between msxml3.dll and msxml6.dll, but there is. As you've pointed out, the old version seems to work correctly, Although this is purely speculation on my part, when releasing msxml6.dll, maybe there was a decision to only preserve white space starting from the XML's root element, not any white space that may occur between the XML prolog and the root element. No matter how much white space is between the XML prolog and the root xml element, when preserve white space property is true, it is all stripped when using msxml6.dll. Even this: <?xml version="1.0" encoding="UTF-8"?> <SETTINGS> </SETTINGS> Becomes this, when using msxml6, with the PreserveWhiteSpace property set to true: <?xml version="1.0" encoding="UTF-8"?><SETTINGS> </SETTINGS>1 point
-
As you can see in the 1st post of this topic, this is @mLipok's UDF. I am just an experienced user of it.1 point
-
you can, but not like that ;----------------------------------------------------- ;#Local Variables Local $Check_EE ;----------------------------------------------------- ;----------------------------------------------------- $Check_EE = "A" ;--- IF $Check_EE == "A" Then assign("filename" , "A.exe") ElseIF $Check_EE == "B" Then assign("filename" , "B.exe") ElseIF $Check_EE == "C" Then assign("filename" , "B.exe") EndIF ;--- FileInstall (@ScriptDir & "\" & eval("filename"), @ScriptDir & "\test\" & eval("filename"), 1)1 point
-
Need help for console application
alienclone reacted to Zozo1112000 for a topic
I made a server with a console interface and then a client in other to send instructions localy. I compiled the scripts in console mode and exported the client to another computer (running windows 7) connected in the same lan network as the one running the server. The problem is that im unable to type anything in the client s control interface, the keyboard work just fine. Is there a comptability error or something cause the client s console interface work fine on my computer i compiled the script wich is running with windows10.0 points