I need different button titles for different users in telegram group - telegram

I'm going to make vote-bot based on Schulze-method, so I need to show individual buttons for every user. Is it possible?

No possible to make different inline keyboard for each user in same chat at this time.
But I think you can use a button with url parameter contain https://t.me/Bot?start=vote_uniqueId, and when user click it, your bot will receive /start vote_uniqueId. And then you can give they different keyboard to vote now. :)

Related

Google Tag Manager - Help setting up tags to track play button clicks and timestamps

Was wondering if someone could help me out or provide some guidance with some things I'm looking to do with Google Tag Manager.
I'm fairly new to GTM but I've already got two basic tags set up:
Track All Page Views
Track all Link Clicks
I've got the above two working and sending data to my Google Analytics account.
What I'm having trouble with is the following:
My website has a bunch of single pages that each have an audio player on them. I would like to track when a user does the following:
Clicks the Play Button
Clicks the Download Button
On top of that, I would like to:
Track the timestamp of the song when a user clicks the Pause Button or exits the page.
Here's an example of one of the pages I would like to implement these tags on: https://www.jimmypressplay.com/mashup-last-friday-night-i-wanna
For #1 and #2, I've tried a bunch of things with no success. I've messed around with the "Click - All Elements" and "Custom Event" Trigger Types and I've set the trigger to fire when the click element matches the div/button class of the play button. I've also messed around with setting up a custom variable (by using either the "Auto-Event Variable" or "DOM element" options). But none of that seems to work (but obviously I am probably doing something wrong).
For #3, I haven't tried tackling that yet, but I've noticed in the code in the "slider slider_is-active" div class it has an element ("aria-valuenow") that keeps track of the current timestamp, so I'm guessing there should be some way to return that timestamp if I am able to set it up as a custom variable somehow.
If anyone has some free time and could take a look and point me in the right direction, that would be great! Or if I need to provide more info, let me know.
Thanks!

How to signalize a customer to click at one button twice?

First I want to make clear that my problem is not a technical question. I want to talk about usability.
In my company we have a function to check if a scale works properly. We have the button you see bellow (1) to start a function named scaleCheck(). During the scale check the weight of the scale is set to 0 and then a specified weight is put on the scale automatically and when the weight matches the number set in a config file the scale is OK. So when you click on the button, it gets the white border (2) and when the check is finished the button turns normal again (3).
This is the automatic process, but not every customer has a scale which can put automatically a weight on it. So in this case the customer has to go to the scale an put a weight on it by his own. In our application the customer can configure, if he wants the process to be manual or automatic and the button will adjust to this. So when the configuration is set on manual we have to interrupt our function an wait for the customer until he is ready. Because we don't know how many time he will need, he has to click on the button again to tell the application that the process can continue. Therefore we changed the button a bit when we are in manual mode. As you can see below the button (1) changes the image, when the customer clicks the first time on it (2), to show that the weight has to be put on the scale. When he clicks the second time the process proceeds (3).
So this is the current state. The automatic mode works how the customers imagine it to be, but in the manual mode many people have problems with it and need a lot of time the recognize that they have to click on the same button again they clicked before.
And here is my question, is there a better way to show the customers that this button should be clicked again. Are there some people who have experiences with a similar kind of functionality? Or is there a better way to do it? I'm open for every idea which comes in.
We ended up with the opinion that it is not a intuitive solution to click twice on the button. We solved it by showing the user a message after the first click on the button, and accepting that message is count as the second click. With usability in mind this i by far a better solution and the customers can handle this situation much better.

How can I make an action for a picture?

In my program, I want the users could touch a picture so that an action will be activated. However, the function IBAction cannot allow me to connect it with the picture. Is there any method that can help me to trigger a function when the users touch the picture? Thank you!
You can activate the User Interaction for that picture, and then detect taps on it and trigger the action based on them.
But the simplest solution would be to just put a button behind it, and connect the IBAction to that button. That's what we do in such cases.

How to dynamically create the same input fields upon user request (clicking Add More button)?

On the Job Positions page, I would like to have 3 groups of input fields which are static so user can enter Job Name, Job Description, etc. respectively.
I'm not sure what the best approach is but I imagine there would be a button at the bottom which says "Add More". When user clicks on this, it would reveal (say 3) more groups of the input fields. And after entering up to 6 groups, the user can still click "Add More" (perhaps as many times as permissible) to bring up 3 more each time it is clicked.
Hope this is clear enough. I'm slowly getting into the AJAX world.
Thank you.
I would recommend using a framework such as jQuery and use a particular function called append, very easy to do and you'll find the framework simplifying alot of thing for you in the future as well

How can I disable an individual item in a combo box in Flex so that it is not clickable?

I want to create a combobox in flex which will take three values, Available, Unavailable, and Busy. The constraint is, I should not allow user to go directly from Unavailable to Busy. So when a User is selected Unavailable, I should keep the Busy item disabled (unselectable), but a user will be able to go directly from Available to Busy. I chouldn't find a straight forward way to disable an item in combobox in Flex. How can I do that?
Have you considered using radio buttons rather than a combo box? It's clear how to do this for radio buttons, for one thing. Also, it can often be friendlier to present the available options without requiring a click to reveal them. (Especially if, as in this case, you are adding the possibility that an option is "available, but not possible for you right now for some reason not shown in this combo-box item").
If you really want a combo-box, you can use the click event to display it in a non-standard fashion by probably changing its style; and then, if clicked anyway, Then, in the selected event, reject the choice (hopefully with an indication of why),
Or, if you want to simply remove it from the list, you can have the click listener event repopulate the source list each time, based on conditions. But that might be confusing to the user, too.
You can also have a look at
www.stoimen.com/blog/2009/03/05/flex-3-combobox-disabled-options/
which references
wmcai.blog.163.com/blog/static/4802420088945053961/
(note for NoScript users you must have 163.com and 126.com at least temporarily allowed to be
able to properly see this page)
it works very well even though I added the code for being able to properly handle keyboard
events in the dropdown list
Full self working example available at
http://olivierbourdon.homedns.org/OpenSource/combos.zip
Thanks again for the good work

Resources