English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 06 August 2009, 18:50   #1
olesio
Registered User
 
Join Date: Apr 2007
Location: Poland
Posts: 337
RequestChoice without quit button.

Hello. I have following code in my WinUAE hdf diskfile on S:startup-sequence file. And it
works ofcourse. But is any way to hide quit button from RequestChoice Window, I found
few RequestChoice replacer on Aminet, but I do not found hide close button feature. Is it
possible to hide this button? I'm asking because when user close this Window next code
is not executed I tryed compare Choice variable with "" or add >Nil: to RequestChoice but
nothing help. Please give me some solution if exist or answer also if there is no solution.
And sorry for my bad english.
Code:
run >nil: CentreQuest CX_PRIORITY=1 AUTOQUIT=NO CENTRE=SCREEN TEST=NO
setenv Choice `RequestChoice "Superfrog" "Run game intro?" "Yes|No"`
If $Choice eq "1" 
cd dh0:Superfrog 
c:whdload slave=SuperfrogIntro.slave PRELOAD
EndIf
cd dh0:Superfrog 
c:whdload slave=Superfrog.slave PRELOAD
reboot
olesio is offline  
AdSense AdSense  
Old 06 August 2009, 18:57   #2
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,542
The normal RequestChoice requester does not have a close button. This means you have installed a patch which *adds* the close button to the window. Just remove that patch to get the original window without close button.
thomas is offline  
Old 06 August 2009, 19:50   #3
olesio
Registered User
 
Join Date: Apr 2007
Location: Poland
Posts: 337
As close button I mean a button on right top of Window, which after click hide the Window.
And I don't get it what patch? Here is my whole startup-sequence file I do not load any path
in it. Can you explain what patch you mean and how to remove it? Anyway, maybe I used
wrong woirds to descibe this button. Under Workbench this button in top right of window,
just hide the whole window and leave only title bar as I tested. Thanks in advice for reply.
Code:
assign ENV: RAM:
assign T: RAM:
cls
run >nil: CentreQuest CX_PRIORITY=1 AUTOQUIT=NO CENTRE=SCREEN TEST=NO
setenv Choice `RequestChoice "Superfrog" "Run game intro?" "Yes|No"`
If $Choice eq "1" 
cd dh0:Superfrog 
c:whdload slave=SuperfrogIntro.slave PRELOAD
EndIf
cd dh0:Superfrog 
c:whdload slave=Superfrog.slave PRELOAD
reboot
olesio is offline  
Old 06 August 2009, 20:55   #4
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,542
Quote:
As close button I mean a button on right top of Window, which after click hide the Window.
Sorry, this was not clear. The button on the right is the depth gadget. It moves the window behind all other windows. I don't know of any tool which can remove the depth gadget from a window.


Quote:
Under Workbench this button in top right of window,
just hide the whole window and leave only title bar as I tested.
This is yet another button. It's not the rightmost but the second from the right. It it's called "zip" and switches the window between two sizes. The RequestChoice window does not have such a button.

Edit: added screenshot
Attached Thumbnails
Click image for larger version

Name:	window_explained.png
Views:	138
Size:	803 Bytes
ID:	22284  

Last edited by thomas; 06 August 2009 at 21:16.
thomas is offline  
Old 06 August 2009, 21: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  
Old 06 August 2009, 23:16   #6
rare_j
Zone Friend

rare_j's Avatar
 
Join Date: Apr 2005
Location: London
Posts: 752
Have a look at requestlist11.lha on Aminet.
It is a slightly different type of requester, but you do get a return code from the close button. This might help you.
rare_j is offline  
Old 07 August 2009, 00:03   #7
olesio
Registered User
 
Join Date: Apr 2007
Location: Poland
Posts: 337
rare_j: thank you for sugesstion, but requestlist display items in other way (on list) and do not
return nothing if a button Zip is clicked because under CLI Window is hidden by system and no
future operation can be done by user except enter command in cli prompt. But I solved my
problem in following way, because probable CustReq have bug which request program to
use empty "" as first parameter - and do not work ok in method show as example in docs.
Code:
assign ENV: RAM:
assign T: RAM:
cls
setenv Choice 0
CustReq >nil: "" "SuperFrog|Run game intro?" "Yes" "No" -x -4 -y -4
If WARN
setenv Choice 1
EndIf
If $Choice eq "1" 
echo "you choose yes" 
EndIf
If $Choice eq "0" 
echo "you choose no"
EndIf
olesio is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
I quit EAB Galahad/FLT Amiga scene 88 17 May 2010 21:50
Center RequestChoice window with CentreQuest olesio support.Apps 3 13 August 2008 17:19
Problem restarting after quit jthomas support.WinUAE 4 17 April 2006 15:59
Won't quit Stig support.WinUAE 4 16 July 2005 15:45
Cannot Quit WB @UAE support.Apps 7 12 June 2005 15:49

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:38.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.18265 seconds with 15 queries