Using Suites - File Operations - Preventing Close

General discussion about the Phantom Automation Language and related tools.

Using Suites - File Operations - Preventing Close

Postby SpiritualMadMan on Wed Feb 16, 2011 9:24 pm

How do I keep a File Handle Open across an entire Suite???????

I have a Suite.Fun file that holds my FileName and FileHndl variables

This file is included at the top of every Script in the Suite.

The StartUp.psc initializes the filename and FileHndl variables, opens the file, and writes an initial line about whats going on.

when I disp(FileHndl); at the end of the StartUp.psc it displays the entire Path and FileName.

the next script in the suite is PPU.psc and at the very top of this file I have included Suite.fun

At the beginning of code when I disp(FileHndl); I get (None) and error out...

If I remove the Include "Suite.fun"; I then get a statement unknown error for FileHndl...

Obviously, the inlcude is reinitilizing the FileHndl variable...

Breaking the connection...

I can't find any "Global" or "Public" keyword so I could set up my variables in the StartUp...

So, it would appear that I can NOT do what I want with a suite. And, would thus lose the abiloity to EASILY add or remove test cases using a checkbox?

Alternately, It appears that I can run any number of scripts as includes and then get the Global Variable Effect.

But, personally, IMHO, not being able to pass variable (easily) across scripts in a suite is a detriment.

If this can be done using some form of Preprocessing, then, a detailed example of how to do so would be very welcome.
SpiritualMadMan
 
Posts: 20
Joined: Mon Dec 06, 2010 4:02 pm

Return to Phantom

Who is online

Users browsing this forum: No registered users and 1 guest

cron