I want to create a popup menu including copy/paste from here.
Our current popup menu uses macro "^INS_SELECT" which doesn't work.
Ctrl-C/Ctrl-V do work, is there a method of using these from a uniface popup menu?
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
I want to create a popup menu including copy/paste from here.
Our current popup menu uses macro "^INS_SELECT" which doesn't work.
Ctrl-C/Ctrl-V do work, is there a method of using these from a uniface popup menu?
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
I hope this helps.
Regards,
Daniel
------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------
I hope this helps.
Regards,
Daniel
------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------
I can’t just replace the contents of the editor, because they will expect the paste to work like Ctrl-V.
Regards,
Iain
I can’t just replace the contents of the editor, because they will expect the paste to work like Ctrl-V.
Regards,
Iain
In that case you should be able to use the Paste plugin of the editor. It has a JavaScript command that seems to allow pasting from the clipboard at (e.g.) the cursor location. You just have to encapsulate the required commands in a JavaScript function that you then call with $widgetoperation.
I hope this helps.
Regards,
Daniel
------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------
In that case you should be able to use the Paste plugin of the editor. It has a JavaScript command that seems to allow pasting from the clipboard at (e.g.) the cursor location. You just have to encapsulate the required commands in a JavaScript function that you then call with $widgetoperation.
I hope this helps.
Regards,
Daniel
------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------
Regards,
Iain
Regards,
Iain
I hope this helps.
Regards,
Daniel
------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------
I want to create a popup menu including copy/paste from here.
Our current popup menu uses macro "^INS_SELECT" which doesn't work.
Ctrl-C/Ctrl-V do work, is there a method of using these from a uniface popup menu?
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
An other solution is to simulate the CTRL+C /CTRL+V keypress.
Declare a signature on user32.dll with an operation on the function keybd_event.
something like :
;define code
#define KEYEVENTF_KEYUP = 2 ; 0x02
#define VK_SHIFT = 16 ; 0x10
#define VK_CONTROL = 17 ; 0x11
#define I_key = 73 ; 0x49
#define C_key = 67
#define V_key = 86
;ctrl+c
newinstance "USER32",user32
activate user32->keybd_event(<VK_CONTROL>, 0, 0, 0)
activate user32->keybd_event(<C_key>, 0, 0, 0)
activate user32->keybd_event(<C_key>, 0, <KEYEVENTF_KEYUP>, 0)
activate user32->keybd_event(<VK_CONTROL>, 0, <KEYEVENTF_KEYUP>, 0)
;ctrl+v
activate user32->keybd_event(<VK_CONTROL>, 0, 0, 0)
activate user32->keybd_event(<V_key>, 0, 0, 0)
activate user32->keybd_event(<V_key>, 0, <KEYEVENTF_KEYUP>, 0)
activate user32->keybd_event(<VK_CONTROL>, 0, <KEYEVENTF_KEYUP>, 0)
------------------------------
Hortion Gilles
Dedalus Healthcare France
Artigues Pres Bordeaux FR
------------------------------
An other solution is to simulate the CTRL+C /CTRL+V keypress.
Declare a signature on user32.dll with an operation on the function keybd_event.
something like :
;define code
#define KEYEVENTF_KEYUP = 2 ; 0x02
#define VK_SHIFT = 16 ; 0x10
#define VK_CONTROL = 17 ; 0x11
#define I_key = 73 ; 0x49
#define C_key = 67
#define V_key = 86
;ctrl+c
newinstance "USER32",user32
activate user32->keybd_event(<VK_CONTROL>, 0, 0, 0)
activate user32->keybd_event(<C_key>, 0, 0, 0)
activate user32->keybd_event(<C_key>, 0, <KEYEVENTF_KEYUP>, 0)
activate user32->keybd_event(<VK_CONTROL>, 0, <KEYEVENTF_KEYUP>, 0)
;ctrl+v
activate user32->keybd_event(<VK_CONTROL>, 0, 0, 0)
activate user32->keybd_event(<V_key>, 0, 0, 0)
activate user32->keybd_event(<V_key>, 0, <KEYEVENTF_KEYUP>, 0)
activate user32->keybd_event(<VK_CONTROL>, 0, <KEYEVENTF_KEYUP>, 0)
------------------------------
Hortion Gilles
Dedalus Healthcare France
Artigues Pres Bordeaux FR
------------------------------
I've tried it with user32 as a handle, or public handle, and using user32->keybd_event and also with user32 as a string and using activate.user32.keybd_event.
I can only think I've defined the signature wrong. I've included it here, any advice?
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
I've tried it with user32 as a handle, or public handle, and using user32->keybd_event and also with user32 as a string and using activate.user32.keybd_event.
I can only think I've defined the signature wrong. I've included it here, any advice?
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
I make an export of our signature.
Cordialy,
------------------------------
Hortion Gilles
Dedalus Healthcare France
Artigues Pres Bordeaux FR
------------------------------
I make an export of our signature.
Cordialy,
------------------------------
Hortion Gilles
Dedalus Healthcare France
Artigues Pres Bordeaux FR
------------------------------
Anyway, I can't see any major differences between the two, but your signature is not giving the error, so there must have been something somewhere.
Long story short, that's working well, thank you.
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.