-
Posts
7,103 -
Joined
-
Days Won
88
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by TheDcoder
-
@Jos I downloaded the latest version and updated SciTE, here is the full output for the same script: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "W:\Test.au3" /UserParams +>16:25:21 Starting AutoIt3Wrapper v.19.102.1901.0 SciTE v.4.1.2.0 Keyboard:00004009 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:W:\Test.au3 +>16:25:22 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "W:\Test.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop +>16:25:22 AutoIt3.exe ended.rc:0 +>16:25:22 AutoIt3Wrapper Finished. >Exit code: 0 Time: 2.001 The only new thing which I have noticed is the "Setting Hotkeys" message.
-
@argumentum Nothing out of the ordinary in the file's permissions or attributes 😕 @FrancescoDiMuro They point to a directory on the host computer, VirtualBox provides a GUI to create shared folders: https://www.virtualbox.org/manual/UserManual.html#sharedfolders @spudw2k Yes to both questions, everything works fine (including running EXEs from the shared drives) except AutoIt not being able to execute scripts within them
-
@FrancescoDiMuro Doesn't seem to be related to UAC as it worked fine before, disabling it didn't work @argumentum Same result with both tests: C:\Program Files (x86)\AutoIt3>AutoIt3 "\\VBOXSVR\Win10JailBox\Test.au3" C:\Program Files (x86)\AutoIt3>echo %ERRORLEVEL% 0 C:\Program Files (x86)\AutoIt3>AutoIt3 W:\Test.au3 C:\Program Files (x86)\AutoIt3>echo %ERRORLEVEL% 0
-
Hi everyone, Ever since I have switched to Linux, I have been using Windows in a virtual machine so that I can use AutoIt and some other software which only runs on Windows. Suddenly since yesterday my AutoIt scripts inside shared drives (which are simulated shared folders by VirtualBox) have stopped working... they were working fully before! No errors, warnings, messages or crashes. AutoIt.exe just exits with a 0 exit code . Here is a test script which does not work: #include <MsgBoxConstants.au3> If MsgBox($MB_YESNO, "Test", "Is it working?") = $IDYES Then ConsoleWrite("It is working!") Else ConsoleWrite("It does not work...") EndIf ConsoleWrite(@CRLF) >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "W:\Test.au3" /UserParams +>10:40:43 Starting AutoIt3Wrapper v.18.708.1148.0 SciTE v.4.1.0.0 Keyboard:00004009 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\John Doe\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 input:W:\Test.au3 +>10:40:44 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3.exe "W:\Test.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop +>10:40:44 AutoIt3.exe ended.rc:0 +>10:40:44 AutoIt3Wrapper Finished. >Exit code: 0 Time: 1.051 The same script does work if I copy it to a normal drive (in my case I copied it to the Desktop which is inside the C drive) This is a really strange issue, did anyone experience this before? Maybe we will need the expertise of the AutoIt Devs with this one... Thanks for the help in advance!
-
PyAutoGUI looks like a neat piece of library for python, it has functions for MsgBox and Screenshots too But I believe it is not relevant in this topic as it is not about having a cross-platform automation toolkit... maybe I should change the name of the topic to mention the AutoIt language specifically? Edit: Done!
-
WebDriver UDF - Help & Support
TheDcoder replied to Danp2's topic in AutoIt General Help and Support
It seems that it is indeed the case: https://sites.google.com/a/chromium.org/chromedriver/downloads The ChromeDriver's version matches the version of Chrome for which it is compatible with, so grab the same version of the driver as chrome. -
WebDriver UDF - Help & Support
TheDcoder replied to Danp2's topic in AutoIt General Help and Support
That might be the issue, I am using your latest release (not the master branch) from GitHub: https://github.com/Danp2/WebDriver/releases/tag/0.1.0.18.1 If _WD_FindElement in that version doesn't escape the double quoted characters then it is safe to say that it was the issue. -
WebDriver UDF - Help & Support
TheDcoder replied to Danp2's topic in AutoIt General Help and Support
@Danp2 Unfortunatley I no longer have the line and I couldn't share it even if I had it because it is part of a client's project. But I suggest modifying one of the pages used in the demo script to have a specific attribute and try to select that element only using that attribute in the CSS attribute selector. -
WebDriver UDF - Help & Support
TheDcoder replied to Danp2's topic in AutoIt General Help and Support
This may not necessarily be this UDF's issue (maybe the driver's fault), the attribute selector doesn't seem to be working when I use it in _WD_FindElement (with ChromeDriver v74), here is an example of the selector which I used: [href="/login"] This is not an issue that I need support with as I went with another way which does not involve using this selector. Just wanted to post about it here -
Auto decide which @IPAddress1-4 to take
TheDcoder replied to LWC's topic in AutoIt General Help and Support
If you want the external IP address which is visible to other computers/servers, you can use the _GetIP function: _GetIP -
Good question, I guess a constant map isn't really useful since there is no initialization syntax (as far as I am aware) to set the initial values (which would be constant). But I am pretty sure that your end goal doesn't really demand for constant maps. So it would be better if you could tell us what you are trying to do
-
If anyone has difficulties visualizing maps, my Map UDF has a handy _Map_Display function which displays the contents of a map in a neat GUI
-
No worries, it would have helped if you had asked this directly though Allow me to explain, "packet loss" is simply the number of ping requests (packets) which fail. So if you send 10 pings (10 packets), and 3 of them fail (no response or network error etc.), then you say that the packet loss is 3/10 (or 30%) Packet loss is not a seperate fancy feature that needs to be implemented... if you can ping, you can also measure the packet loss
-
Yes, absolutely. That is what I have demonstrated in my example Not sure I understand the reason as you have explained... Maybe you are confusing the ping command with AutoIt's inbuilt Ping function? If you are already using AutoIt's Ping function then that is great, but I am afraid in that case I am not sure why you want to take output from the ping command and sort it.
-
It is easier than it seems, if you break my script into bits, it is very easy to understand. The core of the code is the Ping function, which works on a simple concept, you give it a website and it will return you the time it took for the ping to go back and forth... if it fails, it sets the @error macro to something which is not zero (values are documented in helpfile). Based on that information you can build your logic! You can have a loop and a variable to count the number of pings which have failed (lost), at the end of the loop you compare the total amount of times you pinged and the number of pings you lost to get the quality of the connection Much simpler and easier... and doesn't require arrays at all! If I am understanding correctly, you want to measure the packet loss: Which is not really directly related to sorting an array filled with string values... you have made the task complex for your own sake in my opinion. This is commonly referred to as the XY problem I recommend you try use the Ping function first, as it is the most efficient and objectively the correct way to do it in AutoIt Feel free to ask questions, we are happy to answer them and don't see them as a burden which bothers us.
-
Why not use the Ping function to do it yourself in the script? No need to waste resources slicing up the output into an array and sorting it out before processing: Global Const $HOST = "example.com" Global Const $COUNT = 4 Example() Func Example() Local $iLost = 0 Local $iCounter = 0 Do Ping($HOST) If @error Then $iLost += 1 $iCounter += 1 Until $iCounter = $COUNT Local $sMsg = StringFormat("Sent %i packets and recieved %i packets (%i lost)", $iCounter, $iCounter - $iLost, $iLost) ConsoleLog($sMsg & @CRLF) EndFunc Should work just as well
-
@rcmaehl Good to see you Thanks for sharing your project, an interesting wrapper for Wine! Even though I did not study your code that much, but I can indeed see how that can be useful to make Linux releases for your AutoIt projects... I myself had this idea of something similar but I never gave it much thought again. I will make sure to alert all those who have voted to volunteer once I start the project
-
Embedded IE fails to load webpage
TheDcoder replied to TheDcoder's topic in AutoIt General Help and Support
It did indeed help! Instead of the white blank page it did show an error when I added the style: "Navigation was cancelled" (or something along those lines). What really fixed the issue was navigating to about:blank before performing any other actions (including navigation), so the working code looks a bit like this: #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Main() While True Sleep(1000) WEnd Func Main() ; Create GUI $hGUI = GUICreate("", $GUI_WIDTH, $GUI_HEIGHT, $iLeft, $iTop, $WS_POPUP + $WS_CLIPCHILDREN) $oIE = _IECreateEmbedded() ;$oIE = _IECreate() ; This works, but it is not embedded in the GUI GUICtrlCreateObj($oIE, 0, 0, $GUI_WIDTH, $GUI_HEIGHT) GUISetState() ; Initialize by navigating to about:blank _IENavigate($oIE, 'about:blank') ; Navigate to the URL and authenticate _IENavigate($oIE, $URL) EndFunc Navigating to about:blank was indeed mentioned in the helpfile, but it only stated that we "must therefore use _IENavigate() to navigate this browser to 'about:blank' after it has been embedded into the parent application and before you attempt any operations that rely on having a document loaded (e.g. _IEBodyWriteHTML())". I did notice it initially when I was writing code, but I decided to navigate directly to the URL since I did not have to perform any operations relying on having a document loaded... now guess other operations are effected too Not really sure about that as I am pretty sure only one version of IE is present in an installation of Windows. Thanks for the tip but I have fixed my issue by navigating to about:blank first -
Hello everyone, I encountered this strange issue while working on a freelance project, I cannot give you the webpage/website on which this is happening because it is an internal site which is inaccessible externally. I am attempting to create a GUI with an IE control embedded in it, but when I navigate to the desired address, it shows a blank white page. The webpage does load if I use a different browser or normal (non-embedded) IE instance. I managed to get my hands on the source of the blank page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="res://ieframe.dll/ErrorPageTemplate.css" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Navigationen blev annulleret</title> <script src="res://ieframe.dll/errorPageStrings.js" language="javascript" type="text/javascript"> </script> <script src="res://ieframe.dll/httpErrorPagesScripts.js" language="javascript" type="text/javascript"> </script> </head> <body onLoad="javascript:navCancelInit(); "> <table width="730" cellpadding="0" cellspacing="0" border="0"> <!-- Error title --> <tr> <td id="infoIconAlign" width="60" align="left" valign="top" rowspan="2"> <img src="res://ieframe.dll/info_48.png" id="infoIcon" alt="Oplysningsikon"> </td> <td id="mainTitleAlign" valign="middle" align="left" width="*"> <h1 id="mainTitle">Navigationen til websiden blev annulleret</h1> </td> </tr> <tr> <!-- This row is for HTTP status code, as well as the divider--> <td id="errorCodeAlign" class="errorCodeAndDivider" align="right"> <div class="divider"></div> </td> </tr> <!-- Error Body --> <!-- What you can do --> <tr> <td> </td> <td id="whatToTryAlign" valign="top" align="left"> <h2 id="whatToTry">Prøv at:</h2> </td> </tr> <!-- refresh page --> <tr> <td > </td> <td id="refreshPageAlign" align="left" valign="middle"> <h4> <table> <tr> <td valign="top"> <img src="res://ieframe.dll/bullet.png" border="0" alt="" class="actionIcon"> </td> <td valign="top"> <span id="navCancelContainer"></span><noscript id="refreshPage">Opdatere siden.</noscript> </td> </tr> </table> </h4> </td> </tr> </table> </body> </html> The ieframe.dll resources are a point of interest. I am not sure how the server is able to detect the embedded instance of IE ... Any suggestions? Here is a basic outline of the script: #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Main() While True Sleep(1000) WEnd Func Main() ; Create GUI $hGUI = GUICreate("", $GUI_WIDTH, $GUI_HEIGHT, $iLeft, $iTop, $WS_POPUP) $oIE = _IECreateEmbedded() ;$oIE = _IECreate() ; This works, but it is not embedded in the GUI GUICtrlCreateObj($oIE, 0, 0, $GUI_WIDTH, $GUI_HEIGHT) GUISetState() ; Navigate to the URL and authenticate _IENavigate($oIE, $URL) EndFunc Thank you for the advice in advance!
-
Seleinum uses the WebDriver interface for automation, it is the web standard for automation. Most popular browser support automation via this method, and @Danp2 has made an excellent UDF for just that! You will find more information in that topic, good luck
-
I see, this is indeed an interesting aspect. We can use LLVM further down the road to perform JIT compilation of bytecode to machine code for faster execution... if that is feasible, but for now I will concentrate on getting the basics working first I plan to make my own It will help me concentrate on the implementation rather than learning another technology and producing bytecode that it can use. I have already mentioned that I will be using C, the lowest and least (relatively) abstract language among the other choices that you have listed. I have a thing for C