Jump to content

Dent

Active Members
  • Posts

    95
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Dent's Achievements

Wayfarer

Wayfarer (2/7)

2

Reputation

  1. alfev: Funny that you should have literally posted this an hour ago as I came here looking for help with exactly this issue too! I have a script that I've had for a couple of years that runs daily and emails me with a success or failure message, only I noticed I wasn't getting the emails they were sitting in Drafts. I have the latest version of the udf and the problem persists. The only thing that has changed on that machine (Windows 10 Home) is Windows/Office automatic updates. On my other machine which is Win10Pro I've used gpedit.msc to completely disable updates after being forced to update and losing a week trying to fix the system (that I had to eventually rebuild). However that doesn't exist on Win10Home so I'm hoping a registry hack will disable future updates.
  2. Hi all, Apologies if this has been asked and answered before but I couldn't find anything upon searching, if you know of a topic that covers this I would be grateful for a pointer to it. Because my AutoIT executables are flagged as viruses with every AV vendor it makes distributing an app I've created to multiple, not very tech savvy users, near impossible. So - I would like to create a web form that takes the inputs the GUI would normally take, then send these inputs to my server running the app and then report the results back to the user. In the past I've accomplished this by having the form email the data to my server that has Outlook running and a macro that looks out for the relevant subject line, then when found it executes, exports and cleans up the email into a text file and then calls the AutoIT app. The app reads the text file for inputs and executes normally. In this instance the app emails the results back to the user. This is fine as the output is a large PDF document so emailing it back to the user is acceptable. But is there a good way of having the output sent back live? The only way I've come up with in my head is that upon submission of the form the user is redirected to a page that displays the contents of a document created by the app and placed in the relevant folder on my server. If the document isn't found then it'll display a 'Please wait' type message and once found it displays it. Great. But the only way I can think of for checking for the existence of the document created by the app is to refresh the page every 'x' seconds, is there a better way? Furthermore, if multiple users are using it, how do I ensure the correct user gets the correct results? Thanks for any help.
  3. Solved. Thanks to Dent for working on this so diligently. Turns out if I _FTP_FileDelete the file first then the newly uploaded one is fine. I may well have discovered an FTPEx.au3
  4. The following function successfully connects to and uploads a local text file named user.dat I have checked the data being written to the text file when it is created locally using a MsgBox and it appears exactly how it should be written to the file. If I comment out the FileDelete and go and open the file locally it is as expected. However when I download the file from the FTP server and open it up the text that should be at the end of the file is missing. With each subsequent run more characters are missing. I added the Sleep(5000) in case the function was closing the FTP connection too quickly before the file could be fully written but it makes no difference. The user.dat file is (should be) approximately 100 bytes so it is tiny. Any idea why this is happening? Func UpdateUserData() ; Upload the modified user.dat file Local $hOpen = _FTP_Open("myftp") Local $hConn = _FTP_Connect($hOpen, "my.ftp.server", "user", "pass", 1, 0, 1, 2) If @error Then MsgBox(16, "Error", "Connection failed" & @CRLF & @CRLF & "Please contact support") _FTP_Close($hConn) _FTP_Close($hOpen) Exit EndIf _FTP_FilePut($hConn, @TempDir & "\user.dat", "user.dat") ; Upload the new user.dat file Sleep(5000) If @error <> 0 Then MsgBox(16, "Error", "Couldn't transmit data" & @CRLF & @CRLF & "Please contact support") _FTP_Close($hConn) _FTP_Close($hOpen) Exit EndIf _FTP_Close($hConn) _FTP_Close($hOpen) FileDelete(@TempDir & "\user.dat") EndFunc
  5. Could this be used to/modified to get the GUID of the processor? I should have run it first. It seems it already does this.
  6. I have a written an app in AutoIT that with a few more iterations may have some commercial value so now I'm thinking about copy protection. I have searched the forum and found articles on _WinAPI_CreateGUID but if the created GUID was used on a different machine the app would still run. Is there a way to get the GUID of, say the processor that can then be sent to my server and checked each time the app is run?
  7. https://rmplusportal.rightmove.co.uk/ On that page is a login form requiring username, password and then the clicking of the button (or pressing enter but I'm not a fan of using Send) Here's the section of code from the page that specifically deals with the form... <form> <div class="error-message-login" data-test="error-message"></div> <label> <span>User email</span> <div class="ui input"> <input id="email" type="text" placeholder="Your email"> </div> </label> <label> <span>Password</span> <div class="ui input"> <input id="password" type="password" placeholder="Password"> </div> </label> <button class="ui primary button" role="button" data-test="login">Login</button> <p> <a class="forgot-your-password" href="https://www.rightmove.co.uk/forgottenPasswordForm.html">Forgot your password?</a> </p> </form> Specifically the <button class...></button> is causing me problems as I can't find a way to click it. The 'User email' and 'Password' objects have an 'id' so I can reference these in the AutoIT code and interact with them and the button also previously had the id of 'login' but I guess in a change to this page that was altered. Oddly, if I get the code to show the instance of IE that is created and manually click Login or press Enter the page gives me an error saying 'Please enter your email address' even though it is there. I have to manually go into each field and make a change i.e. adding a character to the end of each field then deleting it before it will let me in by either clicking Login or pressing enter. So maybe there's so code elsewhere on the page that knows the fields haven't been physically typed in? Any help on this would be much appreciated.
  8. So I've created a ListView with 13 columns and depending on the search there are various rows returned. The ListView has the extended style that adds checkboxes to each row. Is it possible to export the checked rows into a 2D array? I haven't been able to find a ControlID for the checkboxes when they are created just from the ListView. After the required checkboxes are selected I would want to click a button to export the rows into the array. All help gratefully received.
  9. Here is the URL to get to the page with the code as shown in the screenshot https://www.rightmove.co.uk/house-prices/detail.html?country=england&locationIdentifier=POSTCODE^1603593&searchLocation=SW1V+1AA&year=1&referrer=listChangeCriteria But how do I select the highlighted text, the address? I've tried variations of the below code but to no avail so far Local $oClassReturn = $oIE.document.getElementsByClassName("soldList") If Not IsObj($oClassReturn) Then Exit ConsoleWrite("Error in $oClassReturn" & @CRLF) Local $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("div") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) MsgBox(0, "TEST", $oTagReturn.Item(0))
  10. I'm trying to read the number 5 in the <span id="resultcount">5</span> from the IE screenshot. Here is the code I've tried and which just returns two blank lines. Local $oClassReturn = $oIE.document.getElementsByClassName("soldSummary") If Not IsObj($oClassReturn) Then Exit ConsoleWrite("Error in $oClassReturn" & @CRLF) Local $oTagReturn = $oClassReturn.Item(0).getElementsByTagName("resultcount") If Not IsObj($oTagReturn) Then Exit ConsoleWrite("Error in $oTagReturn" & @CRLF) ConsoleWrite(@CRLF & $oTagReturn.Item(0) & @CRLF)
  11. Thanks Danp2. For anyone else who stumbles across this thread; certain actions carried out in AutoIt cause the script to hang, meaning the remainder of the script won't execute until whatever is causing the hang is dealt with, usually by user interaction (e.g. clicking 'ok') which defeats the purpose of a script to automate a task. To overcome this a second script can be called to take care of whatever the first script is waiting for. This is the solution I used and it works perfectly.
  12. It seems the _IEAction($Object, "click") and $Object.click() leave IE hanging and the rest of the code never executes. This would seem like a UDF/AutoIt bug to me. I'm using version 3.3.14.3
×
×
  • Create New...