Subscribe Bookmark RSS Feed

Hiding window right after opening...

razmah

Community Trekker

Joined:

Jul 20, 2015

I need to hide a my data table after opening but my table doesn't have a specific name, so I cannot use invisible command.

I'm using following script but it doesn't work. I appreciate any suggestion. Thanks

dt=Open();

dt << show window(0);

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

if you're using open() to get a generic file you can just use pick file() to get a name of it so you can still assign invisible.

file = pick file();

dt = open(file, invisible);

7 REPLIES
hlrauch

Community Trekker

Joined:

Sep 19, 2014

Your script works fine for me. I'm able to use it to open a data table that is invisible.

When you say the script "doesn't work" do you mean that the data table remains visible, or does it not appear at all (even in the window list)? Is it possible that, if the table is very large or if the table is open from a remote location, the script needs to pause to let the table open completely? In that case, I'm guessing that inserting a Wait(1.0); command between your two lines of code could help. Otherwise, check for typos.

Howard

razmah

Community Trekker

Joined:

Jul 20, 2015

I mean the window is still visible for me.

you said "I'm able to use it to open a data table that is invisible" but  my purpose for using it is to HIDE a table that newly opened and visible. do I use a wrong command?

hlrauch

Community Trekker

Joined:

Sep 19, 2014

I should clarify: I'm able to use your script to open a table, and the table BECOMES invisible immediately.

If the table is already open and visible, and it is currently your active table, you can "name" the table and make it invisible as follows:

cdt = Current Data Table();

cdt << Show Window(0);

Howard

razmah

Community Trekker

Joined:

Jul 20, 2015

It's still visible for me!!!

hlrauch

Community Trekker

Joined:

Sep 19, 2014

I don't know why it's still visible for you. However, as you see, Vince's solution should definitely do the trick for you.

Howard

Solution

if you're using open() to get a generic file you can just use pick file() to get a name of it so you can still assign invisible.

file = pick file();

dt = open(file, invisible);

razmah

Community Trekker

Joined:

Jul 20, 2015

Thanks a lot