Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. You can create a base EXE and you can use the ResourcesEx UDF in the builder to embed information into your base EXE
  2. Oh, okay. Some python error that I cannot understand
  3. Just out of curiosity, what error did pip show?
  4. @salah kai Do want to make a builder which builds a version of you au3 script with the custom RDP login details so that the built EXE would always connect to the same RDP without any prompt?
  5. TheDcoder

    Params Tool

    @careca Ah, sorry, I didn't actually download the script. I was just looking for the source
  6. Try this and spot the difference #include <IE.au3> Global $DocTranslator = "https://www.onlinedoctranslator.com/translationform" $oIE = _IECreate() _IENavigate($oIE, $DocTranslator) _IELoadWait($oIE, $DocTranslator) $Translation = _IEFormGetObjByName($oIE, "translation-form") $TranslationFrom = _IEFormElementGetObjByName($Translation, "from") _IEFormElementOptionSelect($TranslationFrom, "English", 1, "byText") $TranslationTo = _IEFormElementGetObjByName($Translation, "to") _IEFormElementOptionSelect($TranslationTo, "Dutch", 1, "byText")
  7. When I make websites for my project, I generally ignore the whole "SEO" part... there would be no need to give it special attention when you are using a good and responsive website framework. In my view, we shouldn't make websites more "search engine friendly". The search engines are supposed to improve... that is what most search engines do anyway, they encourage you to focus on the content, not the SEO. In a nutshell: If you have original content, ignore SEO. If you really want your website to be on the 1st page then fill your website with long and "SEO" friendly text which annoys users
  8. @Subz It works! I have no idea how... but it does work . Although I have noticed that it can take a while (around 5 seconds for me) for the code to filter all blank rows
  9. Yep, I can understand . P.S Congratulations on the 200th post
  10. @water That is what I had in mind . I am urged to create another function which can remove all blank elements with the most efficient way to do it... but if I do that, I will be pushing my personal projects again... they have crossed the deadline a long time ago
  11. @anthonyjr2 Your statement only makes it look smarter to be honest . There are several flaws... not to mention the obvious unnecessary rewriting of elements.... or that is what I thought until now. It actually moves all non-empty elements up, shifts all gaps to the bottom and then truncates the array. I have to admit, it's clever... but not very effective! Still does the job though, so I guess we can use it when feeling lazy .
  12. I can only see one array and that is $arr No, what it's doing is using $idx to count all "non-blank" elements and and resizing/trimming the array using ReDim
  13. @anthonyjr2 That's a strange way to remove blanks from an (1D) array... I wonder why it rewrites a row with the same contents? ($arr[$idx] = $arr[$i])
  14. @Subz Ah! My bad . I thought that @big_daddy's code used a spelling engine...
  15. Here is something that I created while _IELoadWait wasn't working with the job in hand. Some explanation first, I was working on a website automation project, I decided to use the IE UDF naturally. The website that I am trying to automate uses Javascript to log me in (no page refresh, no submitting form to new page etc.) so _IELoadWait do any good for me . Thanks to @TheSaint's excellent idea of checking for a piece of text that only appears after logging in (usually the username or the logout text). I present you _IEWaitForTagText! ; #FUNCTION# ==================================================================================================================== ; Name ..........: _IEWaitForTagText ; Description ...: Waits for a HTML tag to appear with the specified text ; Syntax ........: _IEWaitForTagText($oObject, $sTagName, $sTagText[, $iTimeout = 0[, $bNoError = True]]) ; Parameters ....: $oObject - Object related to IE (Any Window, Frame, IFrame or any DOM object). ; $sTagName - Name of the HTML tag (p, img, tr, etc). ; $sTagText - The (inner) text of the tag to wait for. ; $iTimeout - [optional] Timeout for the wait in milliseconds. Default is 0 (No timeout). ; $bNoError - [optional] Temporarily disable IE errors messages in the console. Default is True. ; Return values .: Success: The DOM element's object ; Failure: False and @error is set to 1 ; Author ........: Damon Harris (TheDcoder) ; Remarks .......: 1. Failure is impossible if $iTimeout is set to 0 ; 2. This is how $bNoError works: ; * If $bNoError is True, then _IEErrorNotify(False) is called and _IEErrorNotify(True) is called after the wait. ; * If $bNoError is True and _IEErrorNotify() is False, nothing will be changed. ; * If $bNoError is False, nothing will be changed. ; Related .......: _IELoadWait ; Link ..........: https://git.io/vHxOT ; Example .......: _IEWaitForTagText($oIE, "p", "logout") ; =============================================================================================================================== Func _IEWaitForTagText($oObject, $sTagName, $sTagText, $iTimeout = 0, $bNoError = True) Local $oTags, $hTimer, $sText, $bTurnOnNotify = False If Not $iTimeout = 0 Then $hTimer = TimerInit() If $bNoError And _IEErrorNotify() Then _IEErrorNotify(False) $bTurnOnNotify = True EndIf Do $oTags = _IETagNameGetCollection($oObject, $sTagName) For $oTag In $oTags $sText = _IEPropertyGet($oTag, "innertext") If @error Then ContinueLoop If ($sText = $sTagText) Then If $bTurnOnNotify Then _IEErrorNotify(True) Return $oTag EndIf Sleep(10) Next Until ($iTimeout = 0) ? False : (TimerDiff($hTimer) >= $iTimeout) If $bTurnOnNotify Then _IEErrorNotify(True) Return SetError(1, 0, False) EndFunc I only did some basic testing, I would appreciate if someone could code a simple HTML page with Javascript which can create a new element after 3 secs and test this function in that page to see if it works. That would make a great example! Enjoy, TD
  16. @Subz But that requires M$ Word to be installed on the computer!
  17. I see... Okay, thanks for the help
  18. Wow! It was so easy! Also, if possible, is there way to exclude blank rows in the _Excel_RangeRead function?
  19. Hello I am relatively new to the world of Microsoft Office and the Excel UDF. I am trying to loop through every row in a spreadsheet and get the text/values from each column in the given row... so far I have looked into the Help file for the Excel UDF and the wiki page for Excel UDF but I have no idea about how this is done ... This is all I have in my script: Global $oExcel = _Excel_Open(False, False, False, False, True) Global Const $sSpreadsheet = @ScriptDir & '\data.xlsx' Global $oSpreadsheet = _Excel_BookOpen($oExcel, $sSpreadsheet, True, False) ; ... I am placing my bet on the _Excel_Range functions... especially _Excel_RangeRead. I don't know how $vRange works so I would be glad if someone can point me in the right direction . What I would ideally like is to get all of the contents of the spreadsheet (it's just a normal text one) in a 2D array. Thanks in Advance!
  20. Do comment lines count? I can write really good and long comments
  21. TheDcoder

    Params Tool

    Is the source code not provided?
  22. I think this is a much easier and better way to capture ConsoleWrite output from a compiled GUI AutoIt Script #include <Process.au3> $sExe = @ScriptDir & '\GUI Script.exe' $sLogFile = @ScriptDir & '\output.txt' $sCommand = @ComSpec & ' /c "' & $sExe & '" > "' & $sLogFile & '"' _RunDos($sCommand)
  23. It is fairly easy to do it using AutoIt. I recommend that you try out AutoIt yourself, the wiki has some good resources: https://www.autoitscript.com/wiki/Tutorials Or if you are feeling lazy, you can hire a freelancer... like me (LOL, advertising) .
  24. You might consider learning the basics, they are very easy. There are several tutorials mentioned in the wiki: https://www.autoitscript.com/wiki/Tutorials I personally recommend Morthawt's Tutorials, that is what I followed to learn the basics of AutoIt and Programming
×
×
  • Create New...