T.R | Title | User | Personal Name | Date | Lines |
---|
500.1 | Facts, humor, and a script | BUFFER::VICKERS | If it helps a customer, DO IT | Thu Apr 16 1992 00:23 | 53 |
| I'm not sure what Q4 has to do with much in this topic. Until the
company gets rid of the many thousands of bozos in middle management
who place numbers and their careers ahead of the customers' interests
then there is little point in worrying about survival. Afterall, we
have the BO types to worry about numbers, right? :')
Anyway, back to our story. Following the <ff> is a crude script that
does what you seem to want.
I hope that it helps.
Keep the faith,
don
! FORWARD_LAST.SCP Forward last attachment of current message
!
! Save the current message context
get #EM_CURMES = oa$curmes
GET #ATTFILE = ''
FOR CAB$ATTACH DO GET #ATTFILE = .VALUE
.IF #ATTFILE EQS '' THEN .GOTO NO_ATTACH
!
! We now have the pointer to the last attachment - file it
!
GET #FOLDER = "DELETE THIS SUCKER"
GET #TITLE = "DELETE ME TOO!"
CABINET FILE_ATTACHMENT ,#ATTFILE,#FOLDER,#TITLE
.IF OA$STATUS NE 1 THEN .GOTO FILE_FAILED
GET #TMPDOC = OA$CURDOC
!
! Make it the message, forward it, and blow it (away)
MAIL GET #TMPDOC
MAIL FORWARD
CABINET DELETE_DOCUMENT #TMPDOC
.GOTO FINI
!
! Error messages
!
.LABEL NO_ATTACH
DISPLAY There are no attachments to this message
.GOTO FINI
.LABEL FILE_FAILED
DISPLAY Unable to file the message
!
.LABEL FINI
MAIL GET #EM_CURMES
.EXIT
!
! [End]
|
500.2 | Nothing happens...? | YUPPY::MOYES | Working in Finance <> Making Money | Thu Apr 16 1992 13:07 | 10 |
| Thanks for the prompt response.
On invoking the script (I put it into a UDP) I get the display:
"Invoking UDP......." but then the cursor returns to the CHOICE field
and nothing else happens.
Am I missing something ? (I am calling the UDP from the EMC form)
Martin
|
500.3 | | IOSG::MAURICE | IOSG ain't a place to raise a kid | Thu Apr 16 1992 13:21 | 22 |
| That's because Don gave you a DO script and UDPs are SCRIPT scripts!
Far from obvious!!
Anyway to circumvent the problem delete your UDP and make another one
which has one line:
.fx do forward_last
In SCRIPT scripts the processor is expecting to simulate what the user
types in. But there is special processing of lines beiginning with
script directives such as .FX (they all begin with .)
The .fx tells the script processor to execute the rest of the line as
an ALL-IN-1 function. DO is an ALL-IN-1 function that will execute a DO
script, such as Don's forward_last.
I hope this will be beginning of many happy hours of ALL-IN-1
programming for you, rather than having put you off for life!
Cheers
Stuart
|
500.4 | Navigation during a Read | IOSG::NEWLAND | Richard Newland, IOSG, REO1-D/4A | Thu Apr 16 1992 14:34 | 63 |
| I agree that it is best to forward only the relevant attachments but when
this isn't done do you fully utilize the navigation facilities available
during a Read?
In ALL-IN-1 V2.4 these are:
DOWN ARROW move forward one line
UP ARROW move backward one line
NEXT SCREEN move forward one screen
PREV SCREEN move backward one screen
GOLD DOWN ARROW move forward to next page
GOLD UP ARROW move backward to previous page (or top of current
page)
NA move forward to next attachment
PA move backward to previous attachment (or top of
current attachment)
GOLD T Move to top of message
GOLD B Move to bottom of last attachment
Therefore to move quickly to the last attachment you only need to type:
GOLD B to move to the bottom of the last attachment, and
PA to move to the top of this attachment
ALL-IN-1 V3.0 has all the V2.4 options plus:
NSC move forward one screen [same as NEXT SCREEN]
PSC move backward one screen [same as PREV SCREEN]
NP move forward to next page [same as GOLD DOWN ARROW]
PP move backward to previous page (or top of current
page) [same as GOLD UP ARROW]
ALL-IN-1 V3.0 allows a replication count to be specified. For example,
typing 5 NEXT-SCREEN will move forward by 5 screens.
ALL-IN-1 V3.0 supports searching for text strings with the following
options:
FIND or TS Displays a menu to specify the search text and
direction
<text>FIND Allows a short text string to be specified without
displaying the menu - the search is performed in
the current direction
GOLD FIND or CTS Searches for the current text in the current
direction
Richard
|
500.5 | What .0 originally said | AIMTEC::WICKS_A | More Ship dates than actual Ships | Thu Apr 16 1992 21:13 | 7 |
| For those confused by Don's humour in .1 - I have since changed the
note title of the base note from "need help surviving Q4" or something
like that.
Regards,
Andrew.D.Wicks
|
500.6 | And the script goes where ? | YUPPY::MOYES | Working in Finance <> Making Money | Fri Apr 17 1992 12:10 | 7 |
| And a final question....where do I put the script file itself ?
BTW, I DO use all the short cuts mentioned - I still actually spend
more time going through the "pre-reading" than reading the useful text,
in a significant proportion of messages.
Happy Easter !
|
500.7 | Put it your [.A1] or whatever it's called... | HYTIDE::CREAMER | Keep a low profile | Fri Apr 17 1992 14:51 | 14 |
|
Martin,
>> -< And the script goes where ? >-
----------------------------------------------------------------------------
>> And a final question....where do I put the script file itself ?
The script file would go in your ALL-IN-1 directory...
HETYT - That's "Happy Easter To You Too"!!,
Jack
|
500.8 | It works ! | YUPPY::MOYES | Working in Finance <> Making Money | Wed Apr 22 1992 22:04 | 4 |
| Just to finish this note properly, the script in 500.1 actually works
(thanks Don !). I don't mean it just forwards the last attachment, I
mean it is saving me and my colleagues a significant amount of time in
our daily work. Good value ! :-}
|