-
1. Re: getchar() and putchar() in adobe javascript
FrancisFukuyama Dec 17, 2010 8:44 PM (in response to FrancisFukuyama)as a newbie i did lots of search in the sdk and guide before asking this question.
i need acrobat to do events globally irrespective of page based on what key is pressed in certain contexts so it should not interfere with other normal operations.
alternatively, i need three of four modifiers of mouse events but nothing is more convenient on the fingers than pressing a key like y/n for yes/no .
Are there any non-reserved keys or non-reserved clicks events that can be recorded at the global, application or document level, or else be intercepted by a button and then recorded in some kind of file or hidden field for that button and then automatically "recorded or downloaded" into a text file as a data ?
Thanks again for any help.
Francis
-
2. Re: getchar() and putchar() in adobe javascript
George_Johnson Dec 17, 2010 10:03 PM (in response to FrancisFukuyama)You would have to create a custom plug-in to have any hope of accomplishing this. JavaScript cannot do what you describe. You might want to pose this question in the Acrobat SDK forum here if you haven't already.
-
3. Re: getchar() and putchar() in adobe javascript
FrancisFukuyama Dec 17, 2010 11:59 PM (in response to George_Johnson)Gentleman, I posed the question over there, however, you have not indicated what cannot be done. This is because, I have asked for alternative solutions for the accomplishment of my goal such as I have described ...
such as mouse up or down or hover events that can be recognized by certain fields such as buttons.
From one of the posts, I gather that the data can be stored using data objects.
I am sure there have to be some solutions.
Can you indicate how a plugin generally works ?
Thanks
Francis Fukuyama
-
4. Re: getchar() and putchar() in adobe javascript
dying veteran Dec 23, 2010 9:10 PM (in response to FrancisFukuyama)getchar() / putchar() are C functions and even deprecated in C++ or java where cin / cout are preferred.
[signature deleted by host]
-
5. Re: getchar() and putchar() in adobe javascript
maxwyss Dec 19, 2010 12:00 AM (in response to FrancisFukuyama)As it has been said, you will need a plug-in for catching arbitrary keypresses. However, there is an additional issue to keep in mind. Single key presses are already used in Acrobat (Reader), namely in the form of the single key accelerators (which are off by default, but may be turned on by your users). In such a case, you will encounter unpredictiable results.
Acrobat JavaScript supports two modifier keys with mouse clicks. So, you have four distinct clicks available. In order to use them, you would place a transparent button field on top of the area where the user should click, and you would then evaluate the mouseUp event of that field. This is something you can do using JavaScript. Depending on what you intend to do, it will require some planning, but it is feasible.
HTH.
-
6. Re: getchar() and putchar() in adobe javascript
FrancisFukuyama Dec 19, 2010 12:11 AM (in response to maxwyss)I am the user ... I dont care about accelerator issues ... would be nice to learn how to write a plugin ... just some code in pure C that I can compile using gnu compiler like djgpp to try ................ a complete example would elicit much gratefulness.
Acrobat JavaScript supports two modifier keys with mouse clicks. So, you have four distinct clicks available. In order to use them, you would place a transparent button field on top of the area where the user should click, and you would then evaluate the mouseUp event of that field. This is something you can do using JavaScript. Depending on what you intend to do, it will require some planning, but it is feasible.
please elaborate a little
a concrete and relevant minimal example with some illustrative extensions is worth thousand words of abstract theory and advice ...
gratefully,Francis Fukuyama
-
7. Re: getchar() and putchar() in adobe javascript
FrancisFukuyama Dec 21, 2010 11:42 AM (in response to maxwyss)@maxwyss
I am awaiting your detailed suggestions and some example stanzas.
I have explained my goal and i want to know how to go about
intercepting key presses etc. and when the mode is turned on, it
interprets 2 or 3 keys differently ... or the mouse clicks etc.
Pleez suggest solution details.
-
8. Re: getchar() and putchar() in adobe javascript
GKaiseril Dec 21, 2010 5:23 PM (in response to FrancisFukuyama)Plugins are part of the Acrobat SCK forum.
-
9. Re: getchar() and putchar() in adobe javascript
FrancisFukuyama Dec 22, 2010 9:33 PM (in response to GKaiseril)--------> Plugins are part of the Acrobat SCK forum. <----------
Yeah ... if you visit the SDK forum, a post is there waiting for you
to offer help as a starter stanza ...Adobe mail to forum system had clipped all the reply




