How to implement MOUBTN using RPG III/RPG400

265 pts.
Tags:
AS/400
DSPF
MOUBTN
Mouse
RPG III
RPG/400
We are converting some code in a legacy application and, in its simplest form, want to know that a mouse has been used/clicked rather than ENTER pressed. We are not that familiar with the MOUBTN keyword, which we assume will tell us what we want, and are having trouble getting this to work. Though we've looked through other questions regarding MOUBTN, we obviously haven't found the solution. In the DSPF, at the file level, MOUBTN has been defined as: MOUBTN(*ULD CF09). In the corresponding RPG program, the following has been coded: FFMPKDKAVCF E WORKSTN F KINFDS IOAREA IIOAREA DS I 369 369 @AIDKD C *INKI IFEQ *ON C EXSR C ENDIF We must be missing something since INKI never gets set on when the mouse is used. We have also tried using event indicators (E09), and then comparing @AIDKD to x'79', but failed with this as well. Would appreciate help in getting this to work. Thanks. Zack

Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

MOUBTN(*ULD CF09. Is upper shift left button double press. Make sure you are pressing the correct combination to create the proper event.
Check the valid command key VLDCMDKEY keyword. You can have an indicator on when any command key was pressed. Indicator OFF? Enter was presses
Good luck

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Correction to 'Answer': *ULD is Unshifted Left Double-click. -- Tom
    125,585 pointsBadges:
    report
  • Zack
    Wiki - thank you for your response. According to the documentation, *ULD means "unshifted (not upper shift) left button double click" where we understand that "unshifted" means no use of the shift button. In any case, we've tried both cases - pressing the shift button and not pressing it - and the results are the same. CF09/INKI is not turned on. As for VLDCMDKEY, this would indeed tell us that ENTER was not pressed but it wouldn't indicate that the mouse was used rather than a command key. We could, I suppose, if the indicator for VLDCMDKEY was ON and assuming that the mouse is considered to be a command key, check for all valid command keys (F1-F24) and if no command key was pressed then assume that the mouse was double-clicked. This solution, if it works, is not explicit and leaves open room for error so getting MOUBTN to work is preferable. To reiterate, what we want is to know that on a particular display field the mouse was double-clicked in order to open and display a particular window.
    265 pointsBadges:
    report
  • Zack
    We have checked the VLDCMDKEY indicator with double-click on the mouse and the indicator is not turned on. So even the solution I supposed we could use won't work.
    265 pointsBadges:
    report
  • TomLiotta
    What emulator is used? What version? If it's iSeries Access, what is its service level? -- Tom
    125,585 pointsBadges:
    report
  • Zack
    Tom, we have discovered that the problem indeed appears to be with the emulator (BOSaNova) since we have tested the same process through Client Access and with that there is no problem. We have referred the problem to BOS and await their reply.
    265 pointsBadges:
    report
  • TomLiotta
    First testing of system interfaces should be done through products that are integrated with the system. That helps tell you if you're doing it right or if the feature needs a PTF or similar things. Once you know it's done right, then expend to 3rd-party products. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following