This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > August 2006 > Maximize





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Maximize
flowe

2006-08-08, 4:10 am

Hi

In Pan Tool Options, there are the 3 icons
- fit Window to Image
- fit Image to Window
- fit Image and Window to Screen
I'm missing
- fit Image to Screen maximized (no Window)
How to script for Windows style "Maximize"?

Thanks - flowe
Trev

2006-08-08, 7:19 am


"flowe" <flowe@void.ch> wrote in message
news:59egd21mj4dpa434vv2bnnqm0m82qqseam@4ax.com...
> Hi
>
> In Pan Tool Options, there are the 3 icons
> - fit Window to Image
> - fit Image to Window
> - fit Image and Window to Screen
> I'm missing
> - fit Image to Screen maximized (no Window)
> How to script for Windows style "Maximize"?
>
> Thanks - flowe


I think you mean"full screen"


flowe

2006-08-08, 7:19 am

"Trev" wrote:

| flowe wrote:
| > In Pan Tool Options, there are the 3 icons
| > - fit Window to Image
| > - fit Image to Window
| > - fit Image and Window to Screen
| > I'm missing
| > - fit Image to Screen maximized (no Window)
| > How to script for Windows style "Maximize"?
| >
| > Thanks - flowe
|
| I think you mean"full screen"

No, I mean PSP working space, as is attained when clicking
in the image's individual window title bar the M$ Windows
"maximize" button - second from rh end.

So the image window framework disappears and the image
lies on its own on the plain PSP working space background.

Idea: less foreign colors, only neutral PSP background.

flowe
Fred Hiltz

2006-08-08, 7:19 am

flowe wrote:
> "Trev" wrote:
>
>
> No, I mean PSP working space, as is attained when clicking
> in the image's individual window title bar the M$ Windows
> "maximize" button - second from rh end.
>
> So the image window framework disappears and the image
> lies on its own on the plain PSP working space background.
>
> Idea: less foreign colors, only neutral PSP background.


I do not know of a PSP command for maximize, but Window > Tabbed
Documents comes close. You can use Customize to add it to any of the
tool bars and to assign it an accelerator key.
--
Fred Hiltz, fhiltz at yahoo dot com

Joske

2006-08-08, 6:49 pm

Fred Hiltz wrote:
> flowe wrote:
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
> I do not know of a PSP command for maximize, but Window > Tabbed
> Documents comes close. You can use Customize to add it to any of
> the tool bars and to assign it an accelerator key.


Unfortunately that's a toggle, so when scripted will depend on
whether it's on or off.

Joske



Fred Hiltz

2006-08-08, 6:49 pm

Joske wrote:
> Fred Hiltz wrote:

[snip]
>
> Unfortunately that's a toggle, so when scripted will depend on
> whether it's on or off.


Ouch! Flowe, are you looking for a button to push or are you
building a script? For the latter we need a way to read the "tabbed"
state before toggling. Now I'm out of my scripting depth. Suz?
Anyone?
--
Fred Hiltz, fhiltz at yahoo dot com

SuzShook

2006-08-08, 6:49 pm

Fred Hiltz wrote:
> Joske wrote:
> [snip]
>
> Ouch! Flowe, are you looking for a button to push or are you
> building a script? For the latter we need a way to read the "tabbed"
> state before toggling. Now I'm out of my scripting depth. Suz?
> Anyone?


You can use the TabbedDocuments command with the TabbedDocumentState
parameter set to 0 - this will put you into the Tabbed Document state if you
are not already there, and do nothing if you're already in that state.
Here's the command:

App.Do( Environment, 'TabbedDocuments' , {
'TabbedDocumentState': 0 ### Turn Tabbed Documents ON
#'TabbedDocumentState': 1 ### Turn Tabbed Documents OFF
#'TabbedDocumentState': 2 ### Toggle Tabbed Documents state
})

Hope this helps. Suz
--
Suz Shook
C-Tech Volunteer




Joske

2006-08-08, 10:49 pm

Fred Hiltz wrote:
> Joske wrote:
[color=darkred]
> [snip]
[color=darkred]
[color=darkred]
> Ouch! Flowe, are you looking for a button to push or are you
> building a script? For the latter we need a way to read the
> "tabbed" state before toggling. Now I'm out of my scripting
> depth. Suz? Anyone?


Should have thought of this straight away... I find I can do the
same for TabbedDocuments as I do for ShowGrid in X:

# TabbedDocuments
App.Do( Environment, 'TabbedDocuments', {
'TabbedDocumentState': App.Constants.Boolean.false,
'GeneralSettings': {
'ExecutionMode':
App.Constants.ExecutionMode.Default,
'AutoActionMode':
App.Constants.AutoActionMode.Match,
'Version': ((10,0,3),1)
}
}

Where 'false' is tabbed and 'true' is not tabbed.

The advantage of this method is that it is independent of whether
TabbedDocuments is on or off before the scripts is run.

As you can see, PSP X has robbed scripters of something that 8 still
did well. Notice the difference, and with that, the option we used
to have:

# TabbedDocuments
App.Do( Environment, 'TabbedDocuments', {
'TabbedDocumentState': App.Constants.OnOff.Toggle,
'GeneralSettings': {
'ExecutionMode':
App.Constants.ExecutionMode.Default,
'AutoActionMode':
App.Constants.AutoActionMode.Match,
'Version': ((10,0,3),1)
}
})

Joske






Joske

2006-08-08, 10:49 pm

underprocessable
SuzShook

2006-08-09, 7:26 pm

Joske wrote:
> Fred Hiltz wrote:
>
>
>
>
> Should have thought of this straight away... I find I can do the
> same for TabbedDocuments as I do for ShowGrid in X:
>
> # TabbedDocuments
> App.Do( Environment, 'TabbedDocuments', {
> 'TabbedDocumentState': App.Constants.Boolean.false,
> 'GeneralSettings': {
> 'ExecutionMode':
> App.Constants.ExecutionMode.Default,
> 'AutoActionMode':
> App.Constants.AutoActionMode.Match,
> 'Version': ((10,0,3),1)
> }
> }
>
> Where 'false' is tabbed and 'true' is not tabbed.
>
> The advantage of this method is that it is independent of whether
> TabbedDocuments is on or off before the scripts is run.
>
> As you can see, PSP X has robbed scripters of something that 8 still
> did well. Notice the difference, and with that, the option we used
> to have:
>
> # TabbedDocuments
> App.Do( Environment, 'TabbedDocuments', {
> 'TabbedDocumentState': App.Constants.OnOff.Toggle,
> 'GeneralSettings': {
> 'ExecutionMode':
> App.Constants.ExecutionMode.Default,
> 'AutoActionMode':
> App.Constants.AutoActionMode.Match,
> 'Version': ((10,0,3),1)
> }
> })
>
> Joske


I don't understand your statement, Joske - what have we been robbed of? You
can still use the toggle method in PSP X, using either:
'TabbedDocumentState': App.Constants.OnOff.Toggle,

or:
'TabbedDocumentState': 2,

So what's missing in PSP X? Suz


Joske

2006-08-09, 7:26 pm

SuzShook wrote:
> Joske wrote:


[color=darkred]
> I don't understand your statement, Joske - what have we been
> robbed of? You can still use the toggle method in PSP X, using
> either: 'TabbedDocumentState': App.Constants.OnOff.Toggle,
> or:
> 'TabbedDocumentState': 2,
> So what's missing in PSP X?


My remark was about recording, not editing: I'd best compare
ShowGrid, where once I had to bring back the 'hard' on/off instead
of dependancy of the state of the toggle.

PSP8: 'ShowGrid': App.Constants.Boolean.false
PSPX: 'ShowGrid': App.Constants.ShowCommands.Toggle

The first will turn on the grid no matter what, the second depends
on the state of the toggle. When scripting for others, the first is
preferable.

When I read the first suggested alternative to flowe's maximize, I
knew I could circumvent the toggle with ShowGrid but could not find
the code to do it for TabbedDocuments. When you posted your
solution, I saw that I didn't know about the part 'State'. Once I
put that in my old recorded 8 code, it worked. Of course your
solution is shorter and recommended.

Joske
--
http://members.home.nl/j.a.c.backer/



SuzShook

2006-08-09, 7:26 pm

Joske wrote:
> SuzShook wrote:
>
>
>
> My remark was about recording, not editing: I'd best compare
> ShowGrid, where once I had to bring back the 'hard' on/off instead
> of dependancy of the state of the toggle.
>
> PSP8: 'ShowGrid': App.Constants.Boolean.false
> PSPX: 'ShowGrid': App.Constants.ShowCommands.Toggle
>
> The first will turn on the grid no matter what, the second depends
> on the state of the toggle. When scripting for others, the first is
> preferable.


I agree here, Joske. Usually, for all these toggles, you want it a certain
way in a script, and the App.Constants.ShowCommands.Toggle, or the
App.Constants.OnOff.Toggle will just toggle the switch, whereas the 0 (of
the App.Constants.Boolean.false) or the 1 (App.Constants.Boolean.true) will
just turn the toggle to the on position, or to the off position,
respectively, no matter what the current position is. Works the same for
all these toggles I believe. Suz
>
> When I read the first suggested alternative to flowe's maximize, I
> knew I could circumvent the toggle with ShowGrid but could not find
> the code to do it for TabbedDocuments. When you posted your
> solution, I saw that I didn't know about the part 'State'. Once I
> put that in my old recorded 8 code, it worked. Of course your
> solution is shorter and recommended.
>
> Joske



Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews