Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 8:26 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Closing Windows with script
PostPosted: July 24th, 2007, 12:09 pm 
Offline

Joined: January 10th, 2005, 11:08 am
Posts: 63
Location: Birmingham, United Kingdom
Opus: All between ver Pro XE 4.5 and Ver 9.62
OS: Windows XP Pro SP3
System: Intel Core2 Duo 2.67Ghz, Matrox Millennium G550 dual head graphics card
As the title suggests, is there a way of closing a window using script??
I am opening a window by using the GotoPage() command but am having to close it using action 'Close the window <WINDOWNAME>'
I note that there is a View command but cannot seem to get it to work.
Anyone got any good ideas
Thanks in anticipation

_________________
Andy Thompson
Opus Pro XE 4.5, Pro 5.5, Ver 6, Ver 7, Ver 8.6, Ver 9.62
Windows XP Pro on an Intel Core2 Duo 2.67Ghz with a Matrox Millennium G550 LP PCIe dual-head card.


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 24th, 2007, 12:45 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
If you have only one window open then you could do the following. What I did was I have a Chapter opening in another window. You did not specify whether this was an open Opus window or some other type of window. Then I have a button in the main window, but I suppose you could put it anywhere, that has the following script action tied to it.

var view = GetViewAt(1);
view.Close();

So I have two views. The main window would be 0 and the floating window would be 1. I get it and then close it.

Is this what you were looking to do? If not, could you provide a little more detail?

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 24th, 2007, 12:54 pm 
Offline

Joined: January 10th, 2005, 11:08 am
Posts: 63
Location: Birmingham, United Kingdom
Opus: All between ver Pro XE 4.5 and Ver 9.62
OS: Windows XP Pro SP3
System: Intel Core2 Duo 2.67Ghz, Matrox Millennium G550 dual head graphics card
Excellent...just what I wanted.
I think where I was going wrong was I was using
var win=GetFirstView();
win.Close()

Thanks very much for the prompt reply.

_________________
Andy Thompson
Opus Pro XE 4.5, Pro 5.5, Ver 6, Ver 7, Ver 8.6, Ver 9.62
Windows XP Pro on an Intel Core2 Duo 2.67Ghz with a Matrox Millennium G550 LP PCIe dual-head card.


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 29th, 2007, 7:56 am 
Offline

Joined: November 17th, 2004, 3:31 pm
Posts: 25
Location: Lagos Nigeria
Quote:
You did not specify whether this was an open Opus window or some other type of window.

bwpatric, What will the script be? if it is some other type of window(like that from another programm) that has to be checked whether it is opened or not and the window can be closed from OPUS Pub.

Thanks for great effort and assistance

_________________
Opus Pro XE 5.5
(1) Windows XP Pro SP2


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 29th, 2007, 5:28 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
If it's another window, you would probably have to use some windows manager software that could run command line and then run a command from Opus to the windows manager to close the other program window. I would do a search for freeware windows manager and command line and see what comes up, then see it this would work for you.

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 30th, 2007, 11:22 am 
Offline

Joined: November 17th, 2004, 3:31 pm
Posts: 25
Location: Lagos Nigeria
bwpatricThanks as I await the outcome of your search.

_________________
Opus Pro XE 5.5
(1) Windows XP Pro SP2


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 30th, 2007, 12:58 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
You can use this program at this link: http://www.esanu.name/programs/CloseApplication.html

to terminate an application. You would need to know the .exe name of the application (i.e., notepad.exe, wordpad.exe, psp.exe) but it will terminate it. You will see a DOS window popup briefly, so don't know whether that would work for you and don't know whether that would work on Vista.

You call it via a Launch file action.

Launch this file: closeapp.exe
with option/parameter... PROGRAMNAME.EXE terminate
This file will be found at this location: <SYSTEM_PUBLICATION_DIR>

The file is 230K

That's about the best I can do.

You can also check this thread (http://www.digitalgrapevine.info/viewtopic.php?p=10399) for additional help.

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 35 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group