Leaderboard
Popular Content
Showing content with the highest reputation on 06/21/2021 in all areas
-
.... or just first read/search the helpfile for an available option!? find.close.on.find=2 Jos4 points
-
DLL callback application crash with "Variable used without being declared"
JockoDundee and one other reacted to TheXman for a topic
Were you able to successfully port the SDK's IPS-AE sample to AutoIt? Did you try setting changing the UPS settings to the ones in the sample to see if maybe it provides more stable results? It sets the input lost delay to 5 minutes where your UPS is set to 30 seconds. It also sets the cutoff delay to 5 seconds where your UPS is set to 1 second. Maybe those settings, or one of the others, have something to do with how often it reports or why the script silently dies? Maybe slowing down the interval in which it reports or does a callback may make it more stable. I don't know. I've never used or even heard of EAPI before. Most importantly, I have no way to test it myself. Therefore, I can only guess as to what the issue or issues may be, and I try not to guess or make assumptions, if possible. All I know for sure is that you are using a R&D version of a set of APIs, that aren't available to the public on their public site and you are using the APIs to interface with an external UPS, and that AutoIt is successfully processing the callbacks (up to a point). The first 2 "knowns" are pretty significant because I can't rule either one of them out as a root cause. And because I can't rule out issues with the first 2, I can't definitively say that AutoIt or your AutoIt logic is an issue. Given all of that, I'd say that its up to you to do some more digging/research, trouble shooting, and a bit of trial & error in order to see if you can get it working. Hopefully, you are more successful in finding additional EAPI samples on the web than I was. 🙂 Good luck! Edit: Where is this script running? Is it running in a VM or a physical PC? Is the machine going into a power saving mode or to sleep? Is the UPS' connected directly to a COM port or is it using a USB-to-COM cable? If USB-to-COM, is the USB port set to allow itself to be turned off to save power? Those are just some of the questions that popped into my head because the script appears to silently end around 15 minutes after being launched. 10-15 minutes is a common power saving timeout settings. Just a thought...2 points -
Can't get value from Stdout
66Gramms reacted to oli_the_true_one for a topic
Forget what I said about "#AutoIt3Wrapper_Change2CUI=y", it is irrelevant in your case. It's a compiler directive to display the ConsoleWrite output in windows command prompt which you are not doing. There is a missing parameter in the Run command. This is working for me: #include "AutoItConstants.au3" RunAU3("externalScript.au3") Func RunAU3($scriptName, $absolutePath = @ScriptDir & "\Tests") Local $exitCode = 0 Local $pid = Run(@AutoItExe & ' "' & $absolutePath & "\" & $scriptName & '"',"",@SW_HIDE, $STDOUT_CHILD) Sleep(1000) ConsoleWrite("$pid: " & $pid & @CRLF) Local $sOutput While ProcessExists($pid) $sOutput = StdoutRead($pid) if @extended <> 0 Then ConsoleWrite("$sOutput: " & $sOutput) EndIf WEnd return $exitCode EndFunc externalScript.au3: ;MsgBox(0,"external script","external script") For $i=0 To 10 ConsoleWrite("Lefut a viewertest;0" & @CRLF) Sleep(500) Next Exit 1 Console output of the main script: +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. $pid: 1808 $sOutput: Lefut a viewertest;0 Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 $sOutput: Lefut a viewertest;0 +>22:07:55 AutoIt3.exe ended.rc:0 +>22:07:55 AutoIt3Wrapper Finished. >Exit code: 0 Time: 7.1561 point -
To automate the latest versions of Browsers use the WebDriver UDF (written by Danp2). There are still a lot of users with a need to use older versions of the IE. So I think the IE UDF will be here for quite some time.1 point
-
@Danp2 in wd_helper.au3 you are using @trancexx _Base64Decode() function. As for me It is ok that you use this function, but I start wondering if it will hit an issue in a future when somebody want to use both @trancexx functions I mean _Base64Encode() and _Base64Decode() for any other purpose. So I propose to change in wd_helper.au3 this function name from _Base64Decode() to __WD_Base64Decode() .. of course the author and link should stay unchanged. What you think about ? mLipok1 point
-
DLL callback application crash with "Variable used without being declared"
TheXman reacted to oli_the_true_one for a topic
The input lost delay parameter is in seconds and its value goes from 3 to 360. The cutoff delay is in minutes and its value goes from 1 to 10. On my developement PC, I use a USB-Serial converter and on the target PC there is a native Serial port. Both have the same crash so it is not related to the converter. It is running on physical PC. What I would like to do now is to put some logs inside the DLLCallbackRegister to see if it is well trying to run the callback inside the callback and I think it is from what I see in the console. But since I am not able to do that I'm stuck. I could try to close the DLL/unregister the callback when I start the callback, I'm not sure it's going to work and I don't like this solution. Also, their compiled example in X86 never crashed, after several hours of tests in the same conditions. So this is another hint that something is wrong on the AutoIT side (either my code or the DLL functions). Thank you very much for the time you spent analyzing all my data and for your suggestions, I appreciate it.1 point -
Incremental search in owner and custom drawn ListViews
pixelsearch reacted to supersonic for a topic
@pixelsearch ... and all others involved: Thank you so much - I really appreciate your effort. I have very often wondered if or how to implement such functionality at all. All thumbs up! ☺️1 point -
Hi all, I've been trying to get my head around how this works and have come across a strange issue whereby I can't clear an input field anymore. When I was doing some preliminary testing I found that _WD_SetElementValue($sSession, $sInputElement, "") worked to clear existing data. But now, it doesn't? Not sure if I was simply mistaken before (entirely possible) or if the latest Firefox broke the behaviour somehow? EIther way, my goal is to clear an input field so I can put another string into it. Func Google_Navigation($sURL = "https://www.google.com") Local $XPath. $sInputElement _WD_Navigate($sSession, $sURL) ;;;;;;;;;;;;;;;;;; MY CODE :::::::::::::::: $XPath = "/html/body/div[1]/div[3]/form/div[1]/div[1]/div[1]/div/div[2]/input" $sInputElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, $XPath) ;should find the search input field ConsoleWrite("$sInputElement = " & $sInputElement & @CRLF) _WD_SetElementValue($sSession, $sInputElement, "stuff") MsgBox(0,"Check Google", "Input says 'Stuff'.") _WD_SetElementValue($sSession, $sInputElement, "") MsgBox(0,"Check Google", "Input should be blank...?") EndFunc Any help very appreciated. EDIT: D'Oh! _WD_ElementAction($sSession, $sInputElement, "Clear") works. Why did I have to find that just after posting for help?1 point
-
Using StringReplace() is fine to blanket convert all commas. In case there are any commas in the string that don't need converting, here is a conditional converting method. Local $sOrigString = 'When a comma is between digits, replace with a point e.g. StringReplace("1,62918,", ",", ".")' Local $sString = StringRegExpReplace($sOrigString, "(?<=\d),(?=\d)", ".") Local $iReplacements = @extended MsgBox(4096, "", $iReplacements & " replacement" & _ ; $MB_SYSTEMMODAL is 4096 ($iReplacements = 1 ? " was" : "s were") & _ ; Allow for plural or singular grammatically. " made and the new string is:" & _ @CRLF & @CRLF & $sString) ; The RE Pattern:- ; "(?<=\d)," - (Lookbehind assertions) Match an occurrence of a comma, ",", that is preceded by a digit, "\d", but does not include the digit in the match; and, ; ",(?=\d)" - (Lookahead assertions) Matches a comma followed by a digit, "\d", but does not include the digit in the match. ; So, to match a particular comma to convert, there must be a digit on either side of the comma. ; Returns :- ; 1 replacement was made and the new string is: ; ; When a comma is between digits, replace with a point e.g. StringReplace("1.62918,", ",", ".") ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ : Replacement : Comma converted to point.1 point
-
Incremental search in owner and custom drawn ListViews
Norm73 reacted to pixelsearch for a topic
Hi everybody, The attached script (version 2y) allows to drag and resize any column (even column 0) without having characters overlap other columns Well... this is the end of my "journey through incremental search" as all functionalities have been added. Thanks to all contributors and a special thanks to LarsJ Edit: June 22, 2021 * minor update (less code for computing col 0 coords, in Func WM_DRAWITEM, after an horizontal scrolling has been performed) * added functionality : do not draw actual non-visible column(s), this makes a big difference when LV got many columns : the scrolling stays smooth (tested) Edit: June 25, 2021 * Fixed issue with left-aligned columns in Func WM_DRAWITEM (thanks Norm73) Incremental Search (2y).au31 point -
robertcollier4, If all you want is the Windows dialog, then use the standard _ChooseColor UDF - look in the Help file for more details and an example. M231 point