Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. errr... I hope you have corrected my code before testing . I forgot to insert the final quote to close the string.
  2. Try this code: If Not ProcessExists("INM DB Meter.exe") Then $rr = Run(@ScriptDir & "\Extend\INM DB Meter.exe", @ScriptDir & "\Extend, @SW_SHOW") If @error Then MsgBox(0,0,$rr) Else MsgBox(0,1,$rr) EndIf EndIf
  3. Hmm.... Did you check if the launched program is running in the background? You can use ProcessExists to do this.
  4. Is INM DB Meter.exe 64-bit?
  5. I have been using Windows 8(.1) for a long time and I do not have any issues what so ever .
  6. This is not related to 64-bit or 32-bit at all. Run ONLY returns the PID or 0 if there was an error.. Silly me . It is not AutoIt's fault. INM DB Meter.exe is exiting immediately after launching, it might be the switch from 32 to 64 bit. Have you tried launching the program manually? Does it work that way?
  7. It might help if you tell us the name of the application . A screenshot would be great
  8. @Jos Turns out that you were right, there is Windows IoT Core available for RPi 2 and 3. Unfortunately, as I expected, applications should be compiled for the ARM architecture and should not contain any GUI... With those 2 things, AutoIt won't function in Windows 10 IoT
  9. Not sure, at least I know for sure that its ARM instead of traditional processors so the CPU Instructions would be different... even if Windows 10 were to be ported, I would think that it will be something like Windows CEish.
  10. nope, AutoIt won't run on RPi
  11. I votes "yes" .
  12. looks like it... but why is AutoIt3.exe not shelling sort.exe in the example for StdinWrite? #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $iPID = Run("sort.exe", @SystemDir, @SW_HIDE, $STDIN_CHILD + $STDOUT_CHILD) ; Write a string of items to be sorted to child sort.exe's Stdin. StdinWrite($iPID, "Banana" & @CRLF & "Elephant" & @CRLF & "Apple" & @CRLF & "Deer" & @CRLF & "Car" & @CRLF) ; Calling StdinWrite without a second parameter closes the stream. StdinWrite($iPID) Local $sOutput = "" ; Store the output of StdoutRead to a variable. While 1 $sOutput &= StdoutRead($iPID) ; Read the Stdout stream of the PID returned by Run. If @error Then ; Exit the loop if the process closes or StdoutRead returns an error. ExitLoop EndIf WEnd MsgBox($MB_SYSTEMMODAL, "", "The sorted string is: " & @CRLF & $sOutput) EndFunc ;==>Example
  13. Today I experimented more... Added $RUN_CREATE_NEW_CONSOLE to create a new console for the child process itself, it should output to the console window... but its is not doing that! #include <AutoItConstants.au3> $iPID = Run("sort.exe", @SystemDir, @SW_SHOW, $STDIN_CHILD + $RUN_CREATE_NEW_CONSOLE) ConsoleWrite("PID: " & $iPID & @CRLF) $sSortString = "Banana" & @CRLF & "Elephant" & @CRLF & "Apple" & @CRLF & "Deer" & @CRLF & "Car" & @CRLF Sleep(10000) ; Time for you to see the newly created console StdinWrite($iPID, $sSortString) While I was researching and asking around, someone proposed a plausible theory, here is the relevant part from my IRC Log: [17:22:32] <Mysoft> so maybe AutoIT is using a pipe for STDOUT and writing to it's own console [17:22:42] <Mysoft> instead of specifying the "standard handle" [17:22:53] <Mysoft> which would then be converted to the handle of the new console [17:23:15] <Mysoft> that explains why you get that only when "acquiring the STDIN" This thing is getting stranger .
  14. I have already played around with Stdin and Sleeps . The thing which amazes me is why does using $STDIN_CHILD instead of $STDIN_CHILD + $STDOUT_CHILD make the output get redirected to the parent process? . If I use $STDIN_CHILD + $STDOUT_CHILD, I will have to use StdOutRead to read the output (as shown in the example for StdinWrite).
  15. SciTE is reading the output of sort.exe, it should only be reading the output of the script... am I correct?
  16. Hello, I discovered this a few days ago but I am not able to explain why would this happen... here is the script: #include <AutoItConstants.au3> $iPID = Run("sort.exe", @SystemDir, @SW_SHOW, $STDIN_CHILD) ConsoleWrite("PID: " & $iPID & @CRLF) $sSortString = "Banana" & @CRLF & "Elephant" & @CRLF & "Apple" & @CRLF & "Deer" & @CRLF & "Car" & @CRLF StdinWrite($iPID, $sSortString) And here is the console output: PID: 1234 Apple Banana Car Deer Elephant Why is the STDOUT being redirected to SciTE? Thanks in Advance, TD .
  17. @water Huh? I did not say that it is different... I just pointed out that the OP is not asking about the Enum keyword.
  18. @Xandy I do not think that he is talking about "Enum" but about Enumeration in general .
  19. Yup, that would be it... You can say that: Registry Editor enumerates the values of a registry key:
  20. It means to "list" things... For example: "Enumerate a registry" means to list that registry Wikitionary
  21. Excuse me @Padol but I don't know a thing about C or its internal workings
  22. USC-2 always uses 2 bytes to store 1 character
  23. It's very hard to convert AutoIt to C, an "AutoIt Compiler" which compiles AutoIt code into C code is more appropriate in this situation . I also see that you are using Regex in the parse function... Take my advice, DO NOT USE REGEX to parse ANYTHING. You are better off parsing everything manually rather than using Regex to capturing the needed parts. It will be far easier to understand and modify in the future than using Regex .
×
×
  • Create New...