View Single Post
Old 06 August 2009, 20:32   #5
olesio
Registered User
 
Join Date: Apr 2007
Location: Poland
Posts: 337
So I want to get rid with Zip button but probable this is not possible to do in easy way.
But I found CustReq dialog at http://aminet.net/util/batch/CustReq.lha it is nice black
Window Withour any tittle bar, but I have problem to get return values of it. In docs:
Code:
  If the positive option is chosen, a returncode of 5 (WARN) is generated,
otherwise 0 is generated. The Y key has the same effect as the positive gadget,
and the N key has the same effect as the negative gadget. You can also press
the key corresponding to the first letter of the desired gadget.

An example usage of CustReq is:

  CustReq "Do you want to load Workbench?|If you select Load, Workbench will
be loaded.|If you select Don't Load, you will be|left with a CLI window."
"Load" "Don't load" -d 1 -t 5
  If WARN
    LoadWb
    Echo "Workbench loaded"
  EndIf
So I make following script, but when I press Yes it always shows me both texts:
echo "you choosed yes" and echo "you choosed no". How to handle the return
value correctly? I want different reaction for "Yes" button and different for "No"?

Code:
assign ENV: RAM:
assign T: RAM:
cls
CustReq >nil: "" "SuperFrog|Run game intro?" "Yes" "No" -x -4 -y -4
If WARN
echo "you choosed yes"
EndIf
if NOT WARN
echo "you choosed no"
EndIf
olesio is offline  
 
Page generated in 0.04831 seconds with 9 queries