Source language: Translate to:

resize question

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

resize question

Postby raja » Sat May 01, 2010 5:37 pm

I have used a pair of containers (one vertical, one horizontal) on the master page to detect when a page is resized, and use the actions area of these containers to run some scripts to handle page resizing.
I have noticed that when moving between pages of the same size, that if a page has a container say at the top, that the resize actions of the master page are triggered even though the actual page size has not changed. It seems to detect that a change in page size has occured because there is a container on the new page.

Is this normal, or is there a way to detect that only the full page size has changed?

I have not used a single container on the master page to detect page size change as this results in two messages if both the width and height of a page has changed in size. Using two containers on the master page lets me detect width and height changes seperately.
raja
 
Posts: 23
Joined: Sun Jul 18, 2010 7:39 am

Postby raja » Sat May 01, 2010 10:35 pm

not waiting for a reply, I have introduced some new variables to store the WindowWidth and WindowHeight in. When a container triggers a resize the script now checks if the WindowWidth or height has changed. If no change then no resize action is taken.
raja
 
Posts: 23
Joined: Sun Jul 18, 2010 7:39 am

Postby Neosoft Support » Mon May 03, 2010 10:04 am

Your method or checking the global [PubWidth] and [PubHeight] variables would be the way to determine if the window's size has changed.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

another resize question

Postby raja » Fri May 07, 2010 5:19 pm

I have another resize question!
I have found using the container resize interrupts the execution of other scripts, sometimes resulting in unwanted settings, and would like to delay the resize action until other scripts have finished running.
Any suggestions would be welcomed.
I have tried the book/actions/idle but it runs repeatedly depending on the time set for idle. I would like the resize script to run only once, but as above after other scripts are finished.
raja
 
Posts: 23
Joined: Sun Jul 18, 2010 7:39 am

Postby Ndzn » Sun May 09, 2010 9:07 am

I haven't tried this in a container resize action but use this method in other objects.


:IMPORTANT SCRIPT
SetVar "[ScriptActive]" "1"
...my important scripting here...
SetVar "[ScriptActive]" ""


:CONTAINER RESIZE ACTION
If "[ScriptActive]" "=" "1"
Return
Else
...resize container actions here...
EndIf


I'm not sure if this will help in your situation but it works for me in WebBrowser actions, etc...
User avatar
Ndzn
 
Posts: 134
Joined: Sun Sep 20, 2009 8:37 am

Postby raja » Sun May 09, 2010 4:05 pm

thanks Ndzn, I will try that.
raja
 
Posts: 23
Joined: Sun Jul 18, 2010 7:39 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests