User imput in Startup-sequence

jcarvalho

Member
AmiBayer
Joined
Jul 29, 2011
Posts
906
Country
Portugal
Region
Oporto
Hi guys... I need to know what is the command in startup-sequence to get an user imput.
What I need is to be asked if I want to load workbench or load the xbench launcher for whdload. something like this:

echo "Type 1 to load WorkBench \n Type 2 to load XBench"

IF answer EQ 1
LoadWB
Else
execute sistema:xbench/xbench.exe
EndIF

Thanks!
Jorge
 
This is in classic workbench start-up. could be useful ?

C:GetMouseInput LOCAL


IF $MouseInput EQ 1
Unset MouseInput
C:SetPatch QUIET
C:Assign >NIL: ENV: RAM:
C:Assign >NIL: T: RAM:
C:Execute S:Maxmem-Sequence
EndCLI >NIL:
EndIF


IF $MouseInput EQ 2
Unset MouseInput
C:Execute S:Bootmenu-Sequence
EndCLI >NIL:
EndIF


Unset MouseInput
 
Yes my friend!!! Thank you!!! Will try it... I will change the message to "left click to Workbench, right mouse click to xbench" Its better than typing "1" or "2" on keyboard! Thank you very much... Couldn't find any ref. to keyboard press in AmigaOS manuals that I have searched... This will do very well... A million thanks!!
Cheers,
Jorge
 
Last edited:
Just one thing I noticed... Imput is correctly spelled 'input'.

Typos are often a nuisance and I didn't want you tearing your hair out as to why IF $MouseImput EQ 1 never evaluated to true.
 
Last edited by a moderator:
Just one thing I noticed... Imput is correctly spelled 'input'.

Typos are often a nuisance and I didn't want you tearing your hair out as to why IF $MouseImput EQ 1 never evaluated to true.

??

am i going blind ??
i dont see iMput anywhere
 
am i going blind ??
i dont see iMput anywhere

Anywhere, except for in the title and in the posts ...everywhere.

It's obvious why too.

Jorge is obviously bilingual and learned the spelling of input incorrectly, that's all.

No biggy, unless it causes a bug in the startup-sequence, which is the last thing they need.

Afterall, m is awfully similar to n in appearance.
 
Last edited by a moderator:
The other way to do so is using the command "ASK":

Ask
Format: Ask Prompt/A
Purpose: To ask a user a question in a script (reply y/n). Use IF WARN to test for a yes.
Parameters: Prompt = Text to be displayed.
Example: Ask "Are you sure? Y/N"
 
Last edited:
You could use a program called 'CheckKey'. It only needs one input to change to either Workbench or xbench.

For example, if you make Workbench the default loader then you only press a key on startup if you want to load xbench.

CheckKey 50 ;(F1 key)
IF WARN
(your stuff here)
ENDIF
 
You are right :) I am bilingual... In Portuguese, there is a rule that we learn in elementary school "Before p or b it is always an m"... This messed up my "input" writing :huh: turned it in "imput"... but typed in correct way on Amiga startup
I managed to get a selection using ASK
the strange thing is that this command didnt worked: execute DH0:xbench/xbench.exe :picard:picard:picard
but
dh0:
cd xbench
execute xbench.exe
worked fine... strange :huh:

am i going blind ??
i dont see iMput anywhere

Anywhere, except for in the title and in the posts ...everywhere.

It's obvious why too.

Jorge is obviously bilingual and learned the spelling of input incorrectly, that's all.

No biggy, unless it causes a bug in the startup-sequence, which is the last thing they need.

Afterall, m is awfully similar to n in appearance.
 
Back
Top Bottom