Source language: Translate to:

How to stop or cancel a script

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Postby Wrangler » Sat Dec 10, 2011 9:10 am

If you need help with code, it is always very helpful to others if you post the code here. Then we can look at it to arrive at a solution.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby chromebandit » Sat Dec 10, 2011 2:12 pm

Hi there, i think may HPWAutoit can help you out

http://www.hpwsoft.de/

Regards
User avatar
chromebandit
 
Posts: 283
Joined: Wed Nov 24, 2010 5:00 pm

Postby HPW » Sat Dec 10, 2011 4:50 pm

Hello,

I do not think that Autoit will help here.
At least you will have a relativ long running code in your page enter code section to get into such a need.
And I am not sure if neobook will react on a button click when the page enter code.
If the button work, it could set up a stop-flag, which get read in your long runing page enter code to break out the code.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Neosoft Support » Tue Dec 13, 2011 11:27 am

It depends on how your page enter script is structured, but you can check the contents of a variable periodically and break out of the script if needed. For example:

SetVar "[AllStop]" "False"
.code
.code
.code
If "[AllStop]" "=" "True"
Return
EndIf
.code
.code
.code

Then in your stop button do this:

SetVar "[AllStop]" "True"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Neosoft Support » Thu Dec 15, 2011 11:29 am

Can you post a copy of your script? There may be a better option, but without seeing what your script does it's difficult to make specific recommendations.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Wrangler » Thu Dec 15, 2011 12:24 pm

Not sure without seeing what you've coded, but you could try putting:

If "[cancel_var]" "=" "yes"
GoToPage "Cancelled"
GoToLine "1000"
setvar "[cancel_var]" "no"
EndIf

in a timer to check the status of [cancel_var] every few seconds. Add reset the var to "no" after GoToLine "1000".
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest