Search the web
Sign In
New User? Sign Up
rxmui · Discussion about RxMUI, the MUI/Guis library for ARexx.
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Aborting script outside Handle_ap   Message List  
Reply | Forward Message #1816 of 1832 |
Re: Aborting script outside Handle_ap

Hoi Andreas,

> 1. I've done a script (the one bekow), that after hiting start does
> some long calculations (could last 5 mins). During that a progress bar
> opens. The problem is that I want to be able to abort this calculation
> with a cancel button in the progress bar window . This will obviously
> not work, because the gui will only accept an input during the
> handle_app procedure.
> Is this even possible?

Using only "Return" and not "ReturnID" my be better:

[...]

/* this will work */
   call Notify("progress","CloseRequest",1,"app","Return","LEAVEME")
   call Notify("cancel","pressed",0,"app","Return","LEAVEME")
 
    return

/* this is the function i want to leave, pressing the button */
lets_go: procedure   
call set('win','Sleep',1)
call set("progress","open",1)

DO cds=1 to 10000

h.NoWait = 1
call NewHandle("APP","H")
if h.event="LEAVEME" then leave

    /* counter for progress bar */
    percent=trunc(cds*100/10000)
    call set("gauge_glob_progress","Current",percent)
    call set("gauge_glob_progress","InfoText",disk_nr" CDs found:" percent||"%")
  call set("gauge_glob_progress","ShowMe",1)

END
call set("progress","open",0)
call set('win','Sleep',0)
return

--
cu, Bernd




Thu Dec 25, 2008 11:31 pm

bgollesch
Offline Offline
Send Email Send Email

Forward
Message #1816 of 1832 |
Expand Messages Author Sort by Date

Hallo everyone, I hope this group is still active. I just started writing scripts with RxMui and I run into some problems. I hope you can help me: 1. I've done...
Andreas
ftruz44gwe
Offline Send Email
Dec 25, 2008
4:39 pm

Hoi Andreas, ... Yes, code after your "not work" follows: [...] /* this will work */ call Notify("progress","CloseRequest",1,"app","ReturnID","QUIT") call...
Bernd Gollesch
bgollesch
Offline Send Email
Dec 26, 2008
12:18 am

Hoi Andreas, ... Using only "Return" and not "ReturnID" my be better: [...] /* this will work */    call...
Bernd Gollesch
bgollesch
Offline Send Email
Dec 26, 2008
12:32 am

Hi Bernd, Thank You, that was easier than I thought....
Andreas
ftruz44gwe
Offline Send Email
Dec 26, 2008
11:12 am

Hi to all, I uploaded the two scripts I asked about to Aminet: http://aminet.net/package/util/conv/ConvertCDID http://aminet.net/package/util/rexx/ARexxShell...
Andreas
ftruz44gwe
Offline Send Email
Dec 29, 2008
1:51 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help