Contributions
- 2.1KViews0likes0Comments
Type Mismatch Error
I'll preface this with "I'm sure I'm doing something dumb".... ;) I am just trying to feed in multiple variables from one script to another and am receiving a "Type Mismatch" error when I run RunMod below... They are in two different scripts but I have 'Useunit set up on both. SubRunMod Join("EPA, EPB") <----- I'm not sure the quotes are correct but TC will only compile if in this format... End Sub Sub Join(xMeth,yMeth) Sys.Keys(xMeth) Sys.Keys("[Enter]") Sys.Keys(yMeth) Thank you...Solved2.1KViews0likes4CommentsRe: aqFileSystem to locate that a folder exists not working quite right
OOPS. I figured out the problem with aqFileSystem.exists... I THOUGHT I was directing to the correct path but I was actually missing a component. That part is good. The question on removing a backslash remains. :) Thanks! Morgan1.4KViews1like0CommentsaqFileSystem to locate that a folder exists not working quite right
I'm using aqFileSystem to check that a folder exists but for some reason, the below script keeps hitting the 'else' statement even though when I debug 'sTestPath + where', the correct path is present AND that path does match what appears on the computer. Additionally, is there a better way to remove a trailing backslash than aqString.Remove? Thank YOU, Morgan (where is a case statement but essentially a path)... where := '\StdData\'+BaseName; sTestPath := aqString.Remove(Project.Variables.TestPath, 8, 1); If aqFileSystem.Exists(sTestPath + where) then begin Log.Message('ValidReports folder present') end else begin BuiltIn.ShowMessage(Project.Variables.TestPath + where + ' folder is missing from the ValidReports folder!'); Runner.Halt(Project.Variables.TestPath + where + ' folder is missing from the ValidReports folder!'); end;Solved1.4KViews0likes2Comments- 1.1KViews0likes0Comments
How do I convert a text variable to a wildcard?
I'm sure this is basic but I can't figure it out... I am trying to feed in a file name as a variable to a subroutine and I only want to look for PART of the extended name so I have it surrounded by asterisks. However, the asterisks are relayed as asterisks and the script doesn't hunt for the text within it. Any ideas? It looks similar to the following... ProjectName := 'ABC' RestoreProject('*'+ProjectName+'*',ProjectName); This is read as the text of *ABC*, which doesn't do me any good. I've tried VarToStr but the result is still the same... I need the quotes or else TC errors. What am I doing wrong here? Thanks, MorganSolved1.1KViews0likes2CommentsRe: Log.SaveResultAs producing error... why?
Okay, I got it working if I use the 0, 1, or 2 values for the LogFormat field (no idea why but it works). One more question on SaveResultsAs.... is there anyway to produce JUST the .htm file without the extra supplemental files or does it not function like that? I assume for a space-saving measure, this takes up less room than creating a MHT file...? Correct? Thanks, Morgan807Views0likes0CommentsLog.SaveResultAs producing error... why?
Hi, The following code is producing an error that IsHTML is an unknown name... what am I doing wrong? function SaveOutResults; var strDesktop, sPath; begin // Specifies the path to the file that will contain the test results in the HTML format strDesktop := Sys.OleObject('WScript.Shell').SpecialFolders('Desktop'); sPath := strDesktop + '\' + Project.Variables.ScriptRunning + ' Results'; If aqFile.Exists(sPath) then begin aqFileSystem.DeleteFolder(sPath, true); Log.Message('Folder existed previously - deleted'); end; Log.SaveResultsAs(sPath,IsHTML); Log.Message('Results for ' + Project.Variables.ScriptRunning + ' saved'); end; Thanks a lot, Morgan814Views0likes1Comment