-
Posts
17 -
Joined
-
Last visited
Recent Profile Visitors
210 profile views
JibsMan's Achievements

Seeker (1/7)
2
Reputation
-
StdOutRead, StdErrRead, no output!
JibsMan replied to JibsMan's topic in AutoIt General Help and Support
Hi Jos, I figured out what I was doing wrong (with the help of another programmer). I did not understand what @SW_SHOW and @SW_HIDE actually did. If I understand now, @SW_SHOW displays the console output in the bottom panel of SciTE, and @SW_HIDE hides it. If this is still incorrect, and if there are docs explaining it, can you give me a link or hint how to find it? I changed RunWait to Run, assuming the ProcessWaitClose(iPID) would do the same thing. Using the $STDOUT_CHILD in Run and StdoutRead(iPID) worked. I think RunWait was causing issues. The code below works for me! $iResult = RunWait(@ComSpec & ' /c "' & 'runtest.exe -i "'&$sVideo&'"', "c:\Test\Sample_Test\", @SW_SHOW, $STDOUT_CHILD) ProcessWaitClose($iResult) Local $sOutput = StdoutRead($iResult) MsgBox(0, "Output", $sOutput) Thanks for your help! Jibsman -
I'm using SciTE to write and test this script. $iResult = RunWait(@ComSpec & ' /c "' & 'runtest.exe -i "'&$sVideo&'"', "c:\Test\Sample_Test\", @SW_SHOW, $STDERR_CHILD) ProcessWaitClose($iResult) Local $sOutput = StderrRead($iResult) MsgBox(0, "Output", $sOutput) UpdateLogFile("Output is ",&$sOutput) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;This works fine on my test system: #include <AutoItConstants.au3> $CMD = 'echo ipconfig /all && ipconfig /all' Local $iPID = Run(@ComSpec & ' /c "' & $CMD & '"', @SystemDir, @SW_HIDE, $STDOUT_CHILD) ProcessWaitClose($iPID) Local $sOutput = StdoutRead($iPID) MsgBox(0, "Output", $sOutput) I get nothing in the MsgBox, but I get the text I'm looking for in the bottom panel that shows the script running. How do I get that text into the MsgBox? If I can see i there, I can write it to a file, which is the end purpose. I've tried @SW_HIDE with the above & $STDOUT_CHILD with StdOutRead($iResult), but that does not print to the bottom panel, so Stderr_child must be it. The bottom test works fine, providing a $sOutput I can use. I am obviously doing something wrong, or the console output from runtest.exe (pseudonym for the actual app which I did not write and cannot control) is just weird. Thanks in advance for any help! Jibsman
-
I have used _LargeFileCopy before and it worked great! Thanks for the script! However with a new script I'm having problems. Wraithdu, (or anyone!) do you know why FileCopy and _LargeFileCopy fails? DirCopy does work. I get a Zero (0) returned when I run my code using either FileCopy or _LargeFileCopy _LargeFileCopy.au3 is in the C:\Program Files (x86)\AutoIt3\Include directory. My actual script does a lot more than this, so I toned it down to only do the copy. I used _LargeFileCopy in a script last year and it worked perfectly. #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <_LargeFileCopy.au3> #include <File.au3> Local $sSourceTestDir = "C:\Validation\214" ;Source is 3 Dirs Deep, over 12,000 files, 400MB Local $sDestTestDir = "C:\FileCopyTest\214" ;Empty Dir MsgBox($MB_OK,"","Source Dir is "&$sSourceTestDir&" and Dest Dir is "&$sDestTestDir&". Copy Files Next!",5) ;$iRes = FileCopy($sSourceTestDir,$sDestTestDir,$FC_OVERWRITE + $FC_CREATEPATH) ;$iRes = _LargeFileCopy($sSourceTestDir,$sDestTestDir,1) $iRes = DirCopy($sSourceTestDir, $sDestTestDir,$FC_OVERWRITE) MsgBox($MB_OK,"","$iRes is "&$iRes,10) I have created the Sink directories C:\FileCopyTest\214 while trying to get _LargeFileCopy working. However DirCopy creates these if they are not there. I have tried adding backslashes ( C:\Validation\214\ ), asterisks, ( C:\Validation\214\* ) & ( C:\Validation\214\*.* ) to the code. I have made both the Source and Sink directories Shared, Full Control for Everyone and turned off Read Only attributes. I would prefer to use the _LargeFileCopy because of the progress bar showing the darned script is actually doing something instead of waiting, not knowing if the script is stuck or working. I have tried this on multiple systems; Windows 10, Windows 8.1 and get the same results. I'm pulling out my hair trying to figure out what I'm doing wrong! Any help is certainly appreciated! JibsMan
-
Trying to get a Tester's attention!
JibsMan replied to JibsMan's topic in AutoIt General Help and Support
FYI my system does have an issue. I can hear the sounds now. For some reason audio is not coming through the Planar IX2850 on DisplayPort, but is coming through headphones. A combination of sounds and _WinAPI_FlashWindowEx will get their attention, assuming their systems don't exhibit my problem. Thanks again, esp. JohnOne! Jibs -
JibsMan reacted to a post in a topic: Trying to get a Tester's attention!
-
Trying to get a Tester's attention!
JibsMan replied to JibsMan's topic in AutoIt General Help and Support
That fixed that! Thanks! -
JibsMan reacted to a post in a topic: Trying to get a Tester's attention!
-
Trying to get a Tester's attention!
JibsMan replied to JibsMan's topic in AutoIt General Help and Support
The _WinAPI_FlashWindowEX looked promising, but running the sample code on a test system displayed no flashing. Have not tried to debug yet. Beep and SoundPlay or _SoundPlay do not produce sounds either. I did not have the time to debug so it could be the system, but the onboard sound device has the driver loaded and I can play music and videos with sound that work just fine. Getting it to work in AutoIt seems to be an issue. I can pause the test with a MsgBox telling the tester what to do next, but I was hoping to get their attention faster with flashing or sounds. I will go with that until I can figure why these other methods don't work. Thanks all for your suggestions and assistance! Jibs -
I need to determine a way to get a Test Engineer or QA Tech's attention. Audio may not work as the tester may not have headphones or speakers plugged in. What I was thinking of doing was creating and playing a video that shifts from black to white and back until the tester hits a key, but that may interfere with what we are testing, or if there was a way to do something like this using AutoIt. That is, using AutoIt to Flash the screen, not play the video. Searching the inet for "Flash Video AutoIt" or other combinations brings up lots of answers to Video Flashing problems with monitors, but nothing to help me with this. I am writing tests for a video utility and there are some areas of the test that require the tester to LOOK at the monitor to verify video quality or other things that can only be validated by looking at the screen. Other tests are validated internally and automatically post "Pass" or "Fail" messages to the log file. Yeah I know they are supposed to be watching but they test multiple systems at once and can't watch everything. Are there features of AutoIt that could help me? Thanks JibsMan
-
argumentum reacted to a post in a topic: Using @ComSpec or Closing Command Prompt (revisited)
-
Using @ComSpec or Closing Command Prompt (revisited)
JibsMan replied to JibsMan's topic in AutoIt General Help and Support
Thanks argumentum. I realized since I was simply typing in the DOS box, all I had to do was Send ("Exit{Enter}") and the DOS Boxes will close after BinScope finished. Problem Solved! -
Hello, I am checking code with Microsoft BinScope 2014. It runs in a command line. You may be familiar with it if you are testing security for DLLs. Anyway, I get a directory of .DLL and corresponding Symbol .PDB files from developers. The .dll and .pdb filenames have to match to run BinScope on them. I create an array of DLL files, then an array of PDB files, compare the files to make sure I am only testing matching filenames, and then running them through BinScope. I have the automated script running but because I am having problem with @ComSpec, I am using Run("CMD.exe"). It leaves a DOS box for every file. Here is some code: For $i = $iDllCount to $aTestDllList[1] $iDllCount += 1 $sCmd = "Binscope "&$sPath&$sDllFile ;MsgBox($MB_OK,"","File to test is "&$sDllFile&" DLLCount is "&$iDllCount) Run("CMD.exe","") Sleep(500) Send("CD C:\Program Files\Microsoft BinScope 2014\{Enter}") Sleep(500) Send($sCmd&"{Enter}") ;RunWait(@ComSpec & " /c " & "Binscope /Target "&$sDllFile,'""C:\Program Files\Microsoft BinScope 2014\""') Commented out Next If I could use RunWait(@ComSpec " /c "... the DOS box would close automatically. However I can't get that to work. I have tried RunWait(@ComSpec&" /k "&'""Binscope.exe C:\testdll\apiREST.dll""', '""C:\Program Files\Microsoft BinScope 2014""') RunWait(@ComSpec&" /k "&'""C:\Program Files\Microsoft BinScope 2014\Binscope.exe C:\testdll\apiREST.dll""', '""C:\Program Files\Microsoft BinScope 2014""') In any case using the RunWait command does not work. Using Run("CMD.exe") does. I would like to close the DOS box after each file is run. I need to either get RunWait (@ComSpec...) running OR close each DOS box after BinScope is done. Any help is appreciated! JibsMan
-
My program starts by asking the user to select or create a directory to copy files to. FileSelectFolder won't let me type in a directory name and have it created. DirCreate doesn't have the GUI interface to allow the user to select a directory. Is there a method to display the File Tree and let the user either select an existing directory OR enter a directory name to add? Thanks! JibsMan
-
SorryButImaNewbie reacted to a post in a topic: Need a FileSelectFolder function that displays the files
-
Hi, This question is about adding and changing files in the Include Directory. Not a Programming Question. Windows 8.1 Laptop. My Include Directory, actually the entire AutoIt3 folder and everything below is read only. Maybe this is because it is in the Program Files directory, I'm not sure. I have tried to change AutoIt3 and everything below to turn off Read Only. It acts like it works but does not. This causes me to save my include files to my Script Directory, start File Munger and copy the file to the Include Directory, clicking OK to all the Administrator Permission requests along the way. If I cannot make this directory writable, can I reinstall AutoIt to some other location that may not be Read Only? Can I include a path in my #include <filename.au3> so it reads #include <mydirautoit3includefilename.au3> ? Does anyone else have this problem with Windows 8.1 and AutoIt? Thanks in advance for any advice! JibsMan
-
Strip any characters from a string function
JibsMan replied to Bowmore's topic in AutoIt Example Scripts
Edit: After finding this function did not work, I searched some more and found StringReplace() which works just fine. So it really does not matter to me if this is fixed. Leaving it here FAI (For Anyone's Information). I realize this function is kinda old, but I tried it to help me get rid of periods so I can compare versions. My code comparing with the periods keeps picking the 3.2.5.50 version instead of the 3.2.5.155 version, so I copied / pasted the entire StringStripChar function in the Include Directory. The output in my script were periods. IE: '3.2.5.155' became '.' and '3.2.5.50' became '.' I pulled out the _StringStripChar and made it simple. #include <MsgBoxConstants.au3> #include <StringStripChr.au3> Local $sMyDir1 = "3.2.5.50" Local $sMyDir2 = "3.2.5.155" MsgBox($MB_OK,"", "Before Stripping "&$sMyDir1&" and "&$sMyDir2) $sMyDir1 = _StringStripChr($sMyDir1,".",4,0) $sMyDir2 = _StringStripChr($sMyDir2,".",4,0) MsgBox($MB_OK,"", "Stripped Periods become "&$sMyDir1&" and "&$sMyDir2) I can't include my entire script due to confidentiality issues. I don't know what changed, but this does not work for me, or maybe it never did for periods. If this code gets fixed, I'll try it again. Meantime I guess I will have to do this the "Old Math" way... Thanks, JibsMan -
JibsMan reacted to a post in a topic: Need a FileSelectFolder function that displays the files
-
JibsMan reacted to a post in a topic: Need a FileSelectFolder function that displays the files
-
JibsMan reacted to a post in a topic: Need a FileSelectFolder function that displays the files
-
The FileSelectFolder function does not appear to display the files in the selected directory. I found many different examples of other FileSelectFolder functions, some by Melba23, which are way cool but not quite what I need. If the standard FileSelectFolder just displayed the files in the currently selected directory I could move on. Problem is the user might not know where the files they want to process are located. A possible solution is to display directories with files and either allow the user to select all the .bat files to copy to an array or just automatically copy all .bat files into the array. Some of you like to know the "why" of things: This entire exercise is to copy / rename a single file.txt to the same name as the .bat filenames in the selected dir. File1.bat File2.bat File3.bat Copy TestFile.txt to: File1.txt File2.txt File3.txt so there are both .bat and .txt files for each .bat filename. The user must decide which directory they want to process, and needs to see what's in the directory to select it. Doesn't matter if it's the standard Explorer window or a custom explorer. If you know of one I could try I'd certainly appreciate it! Thanks in advance! Jibs
-
I'm having problems reading my .ini file. I can locate it. I can create it. I can write to it. I cannot read it! What I do get is Message Boxes with "HTML Path is" and "EXE Path is". I don't even get the defaults I created in the variables... or the default "Fail"... I'm sure it's something stupid I missed. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.12.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <MsgBoxConstants.au3> Local $htmlPath = "htmlPath" Local $exePath = "exePath" SetIni() Func SetIni() If Not FileExists ("C:\Temp\IniPaths.ini") Then MsgBox ($MB_ICONINFORMATION+$MB_OK, "Error", "Unable to find IniPaths.ini. Creating File") IniWrite ("C:\Temp\IniPaths.ini", "Validation", "Path", "C:\Temp\validation.html") IniWrite ("C:\Temp\IniPaths.ini", "EXE", "Path", "C:\Temp\") EndIf $htmlPath = IniRead("C:\Temp\IniPaths.ini", "Validation", "Path", "Fail") MsgBox ($MB_ICONINFORMATION+$MB_OK, "Info", "HTML Path is ", $htmlPath) $exePath = IniRead("IniPaths.ini", "XDMR", "Path", "Fail") MsgBox ($MB_ICONINFORMATION+$MB_OK, "Info", "EXE Path is ", $exePath) EndFunc Expert (or even beginner if you can fix it) help appreciated!