Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
107 user(s) are online (95 user(s) are browsing Forums)

Members: 0
Guests: 107

more...

Support us!

Headlines






Arexx question - getting user responses from REQUESTFILE, REQUESTSTRING [Solved]
Just popping in
Joined:
2008/10/18 11:25
From Auckland, New Zealand
Posts: 116
Hi,

I am trying to put together an arexx script with no luck. I want to use REQUESTSTRING and REQUESTFILE to ask the user for input. However, I'm having trouble getting the result into a variable.

Here's what I've got:

/* Download URL */

OPTIONS RESULTS
address command 

'c:requeststring title "URL Downloader" body "Enter URL to download" to t:dlurl'
dlurl result

'c:requestfile savemode title "Enter download filename" noicons >nil:'
dlfile result


But it doesn't do anything, the two variables just read as RESULT.

Can anyone point me in the right direction?

Thank-you.


Edited by daveyw on 2019/12/15 19:08:14
   Report Go to top

Re: Arexx question
Just popping in
Joined:
2017/5/18 11:12
From Audruicq, France
Posts: 70
@daveyw

I'm not at home and can't check if this works, but what is the result if you define the variable like this :

dlurl 'c:requeststring title "URL Downloader" body "Enter URL to download" to t:dlurl'
dlfile 'c:requestfile savemode title "Enter download filename" noicons >nil:'


Regards,
Petrol

   Report Go to top

Re: Arexx question
Not too shy to talk
Joined:
2006/12/2 1:41
From VA, USA
Posts: 260
Hi DaveyW,

While I know there are shorterhand ways of doing this, the
longhand way always worked for me...

/* Ask User Choice & Print Out
*/
TitleBarTxt = 'Test Requester'
BodyTxt = 'Pick something!'
ButtonsTxt = '"Yes" "Umm" "No"'
ReqType = 'INFO'
cline = 'c:requestchoice "' || (TitleBarTxt) || '" "' || BodyTxt || '" ' || (ButtonsTxt) || ' TYPE ' || (ReqType) || ' TO T:response.txt'
address command cline
MyReturnCode = RC
if exists('T:response.txt') then
if open(ReqF,'T:response.txt','r') then do
pick = strip(readln(ReqF),'B','"')
bs = close(ReqF)
address command 'c:delete T:response.txt'
say 'response >' pick '<'
end
else
say 'Couldn''t open Requester output file'

Fundamentally, you've have to read the output file from the
Req... command.

Good luck,

PJS

   Report Go to top

Re: Arexx question
Just can't stay away
Joined:
2008/1/6 17:56
From Pennsylvania, USA
Posts: 1342
@daveyw

Here's solutions I found in an ARexx guide:

OPTIONS RESULTS
ADDRESS COMMAND
rxset reqres '`requeststring title "URL Downloader" body "Enter URL to download"`'
myresult=getclip(reqres)
call setclip(reqres,'')
say myresult

rxset reqres '`c:requestfile SAVEMODE NOICONS TITLE "Enter download filename"`'
myresult=getclip(reqres)
call setclip(reqres,'')
say myresult

NOTE:
rxset is an external arexx utility in C: (Included in the OS)
The scripts contain backward quotes produced by the keyboard key below "Esc". They are easily confused with the single quote.

_________________
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

   Report Go to top

Re: Arexx question
Just popping in
Joined:
2008/10/18 11:25
From Auckland, New Zealand
Posts: 116
@xenic

Thanks xenic, that did the trick.

   Report Go to top





[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project