Visual indication for inline buttons - telegram

Is there a way to show some visual indication that the inline button has been pressed in telegram bot.
I have a bit which send inline keyboard, and when I press each buttons it works perfectly fine, but there is a slight delay in getting response from the server. As there is no visual indication to show if a button has been pressed, it is confusing for uses to know if the button was pressed and end up pressing the same button several times.

there are different types of inline buttons in Telegram:
Opens URL (with url).
Forward a message (with switch_inline_query).
Insert query at the chat (with switch_inline_query_current_chat).
Button with action (with callback_data).
I suppose you are refering to the last type of button, in that case, if a user press a button you will get the callback_data via CallbackQuery, and that lets you modify the original message with editMessageText to add something like:
Button TEST pressed.

As an alternative way, after you got the callback response at your server, you can use Emoji for showing feedback to your users. Just edit the inline message and edit some relative emoji to the button text.

Related

Click button on element popup

Okay so I am trying to create an automation to click on a button once it appears. I was able to find the code within a javascript source file in the website's code files that creates the element that contains the button in question, however it is not always there. It is generated once a trigger on a different UI is enabled, then it shows up on my end. I want it to automate clicking the button as soon as it appears.
Is there a way to do this? I am super new to code.
An example of what I am trying to do:
Someone in one UI creates an account that needs to be approved, it pops up an element on my end with an approve or deny button. I want to automatically and basically instantaneously click one of those two buttons any time it appears.
This is not exactly what I am trying to do, but it is similar. I do not own the website I'm trying to go this on*
I have no clue what I'm doing at all....

How to send a command by clicking a button in Telegram

How can I create a ReplyKeyboardButton in telegram with a specified text, which sends a specified command when it is being clicked.
For example the text is "Yes" and when I click yes, it sends /1 as a command. In the documentation creating a button just gets a text as input.
Following picture is from Telegram documentation which demonstrate the idea:
https://core.telegram.org/file/811140184/1/5YJxx-rostA/ad3f74094485fb97bd
If you make it an inline-keyboard, each button can have an associated data-value along with the button text.
At present, regular buttons return their text as the reply value in a return message.
However, If you have a unique text or unique text+emoji as the text for each button, then your command processor code can simple do a switch-case on returned message-text
If you mean that when the user presses the button, the user actually sends a command, it is not possible.
When the user presses a regular button (not inline) he just sends the text inside the button.
So the only way to do this is to write a command in the button or at least a command and parameters.
What you see in the picture is the bot that sends a message where you have to possibility to answer: pressing buttons or pressing commands in the message.
Anyway you can also use the same functions to handle a command and a button.

ASPxTextBox wih NullText loses value when browser window loses focus

I have an ASPxTextBox with a NullText. It is used for a user name. Some users are copying their user name from the registration email into this text box. When they do it via right click and the context menu and go back to their email client to copy the password, the text box gets emptied, i. e. NullText is displayed.
I can reproduce this. However, when using Ctrl+V to paste the user name, it is persistent.
It seems to me that the ASPxTextBox is looking for a keydown event or something similar to decide if the text has changed.
How can I make the text persistent in all cases?
It seems that this behavior is a side effect of the browser/form AutoComplete feature.
Can you try to reproduce this issue with a regular with the placeholder attribute (HTML5)?
If the behavior is the same, see this thread.
I am working around this issue with this jquery plugin:
https://github.com/mathiasbynens/jquery-placeholder

What is the proper name for a multibutton?

I'm trying to design a UI in Qt and I can't find anywhere in the designer a button which can be "droped down" like combobox. What I mean by that is that I would like to have this button with his "default" option choosen so if I like it I would have to just click on it but if I would like to choose different option I would be able to clik the little arrow on the right side of this button and then pick option suitable for me at that moment.
You're looking for a QToolButton that has a set of actions or a menu set on it. From the documentation, the QToolButton::ToolButtonPopupMode...
Describes how a menu should be popped up for tool buttons that has a menu set or contains a list of actions.
Of it's values, the two that I see most frequently are DelayedPopup:
After pressing and holding the tool button down for a certain amount of time (the timeout is style dependant, see QStyle::SH_ToolButton_PopupDelay), the menu is displayed. A typical application example is the "back" button in some web browsers's tool bars. If the user clicks it, the browser simply browses back to the previous page. If the user presses and holds the button down for a while, the tool button shows a menu containing the current history list
And MenuButtonPopup:
In this mode the tool button displays a special arrow to indicate that a menu is present. The menu is displayed when the arrow part of the button is pressed.

Command button requires two clicks (sometimes)

i am using icefaces 1.8.2. For some command buttons, sometimes i need to click the button twice. previously whole applivcation was working fine with single click. after upgrade to 1.8.2,i am facing this problem......Any suggestion,what could be the reason???
Thanks
Maybe some component loses the focus when you click the button. That could cause a partialSubmit and the server sends an update. This update replaces the part of your page containing the button.
But that a total wild guess into the blue.

Resources