Fill form field in other application from delphi program - delphi

I'm working on a simple delphi program that will get the data from a RS232 barcode reader and copy it to wherever the cursor currently is (if it's an editable field). Specifically I will have to make this work with a web broser to fill a form.
The barcode reading part is ok, I get the numeric data back, but I'm stuck on how to find the correct place to paste it. How can i get the current cursor position and send the data there?
Thanks!
Edit: the user will open a form inside a webpage where one of the fields (<input type="text">) is for the barcode. When they pull the trigger on the reader I would like to have the field filled

Related

updating/dismissing message after dialog submitted

Is there a way to do any of the following:
a. Update a chat message that initiated a dialog.
b. Store "hidden" fields in a dialog.
Basically, I have a bot message that opens from a button on a message attachment. I know when the user clicks the button, I get the ts of the message and at that time I could alter it. However, the workflow is not complete until the user has submitted the dialog, but the submit on the dialog loses all the original_message stuff and the ts of the dialog being submitted no longer corresponds with the original, calling message.
If there was a mechanism to store hiddens, I could stash the original ts or the response url on the form itself.
Thanks! This is my first slack workflow, so any advise is appreciated as usual!
.....
The suggested duplicate answer refers to an interactive message, which I'm using to call the dialog already.
However, that isn't where my problem is, it is the dialog submission.
You don't have any access to the button elements on a dialog and the dialog element can only have 5 elements of type: text, select, text area. Plus it's a bit overkill considering that a action invocation from an interactive message actually includes the original message in the post back to your server.
So slack dev support got back to me:
Thanks for writing in, this is a great question!
You can use the callback_id parameter when calling dialog.open to store a string that will help your app locate the message. This callback_id will be returned to you in the dialog submission.
In your case, you could store the original message's ts and channel_id so that > you can locate the message to update.
I hope this helps! Let me know if you have any further questions!
So, it's a bit hacky (imo), but i did get it to work so I thought I'd close this question in case anyone else ran into this.
I'm just parsing the original ts value inside the callback w/ some other data i can use when the form submits. The only limitation to this is that it only stores 200 characters but that should be sufficient considering that is in addition to the 5 fields you have on the dialog and the other stuff slack gives you in the post (user, channel, etc).

App uses Core Data - how to implement a "print report" feature?

My app uses Core Data to store 6 attributes for each entry as well as an image. I have several users asking for a feature where they can print out what they've entered. I can export the core data entries to a .csv file, but what about the images? cvs isn't pretty for the common user. They'd have to pull it into a spreadsheet app (if they have one) and play around with it to make it usable. But there's no way to export images into a .csv file.
What I'd really like is a way to push a button and have the app generate a report or a .pdf or something that they can email to themselves, or pull out of iTunes and it'll be formatted in rows with the entries, attributes and the images.
Any ideas? Can anyone point me to something that I can pass my core data attributes (6 text strings and an image) and output them to a pretty .pdf or webpage?
For this requirement, it should be fairly easy to create your own extremely simple HTML templating method.
Pick one sample entity and create a HTML page that formats it the way you want. Replace the actual data from the entity with placeholder text strings that you can search for at run time. Copy this template into your project. When the user presses the button, open the template, merge in the actual data, and save the result as a new HTML file or mail message.
If you want something more flexible, try searching GitHub for "HTML templating" or look at http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa/

Data Entry for iPad Help Needed

I am searching for a way to take the current text written in a text box and transfer that to a list, and after the list is full, send that list to an e-mail.
To make better sense of this, I'll explain. I help out at a youth ministry where the kids are required to check-in at the door. Instead of writing names down on paper, I have been tasked with designing an app so they can just type the name on an iPad. Once the kid hits "Submit" button, I would like their first and last name (different text boxes, but could conjoin if easier to code) to be added to a never-ending rtf file or something of the sorts. This rtf file would then be e-mailed to me so I could keep an online roster.
I have all the buttons and fields in place, I just cannot figure out how to code the submit button to handle the function of placing the current text from the linked boxes in a separate file. If it can't be rtf, I don't really care. Just wanting something I can e-mail back to my Mac to save time. If anyone knows how to do this, or somehow finds a site that I missed during my continued scouring of the Internet, please let me know your solutions.
Blessings,
Kyle Baity
You can have an NSMutableArray to which you add new name strings as they are submitted, you can then make this into a string list using componentsSeparatedByString:. This allows you to sort and count the names easily if you want to add more features later on.
It's not clear how you want the email to be sent, but MFMailComposeViewController would be a good start, using your list string as the message body.

Instantly update a textbox in InfoPath 2007

I'm trying to create an input form similar to a text message. I have a large textbox for the message, and I have a small textbox that is read-only that I want to show the character count.
I got this to work by setting the default value of the small textbook to the string length of the large textbox. This works correctly, but I would like to update the small textbox every time a character is entered into the large textbox, not every time I click off of the large textbox.
Any help would be much appreciated.
Note: It's been several months, so since I found an answer to this question, I'll post it to help anyone else looking for the same thing.
This is not possible using the default controls and properties in InfoPath 2007. In general, InfoPath can only respond to events when a field's value is finished being modified. It may be possible to do this with a custom ActiveX control.

Assigning Fogbugz cases programmatically

I want to write an application that assigns Fogbugz cases programmatically, how would I accomplish this? Is it possible to achieve this given any of the following scenarios:
The user enters text in my
application's input field and the
Fogbugz report is opened in the
browser where the "note" field is
populated with the text from the user
input
The fogbugz report is assigned to the
specified user in the application
without the browser even being opened
i.e. the report is stored directly in
the DB.
I'm planning to add default values to the other fields as well so I would assume the process would be the same for adding text to the "note" field.
You can do this with the Fogbugz API. See the heading "Editing Cases" for the specifics on how to edit a case (which includes creating a new one). It's a little complicated (or perhaps just oddly designed) but, as I remember, you basically have to call cmd=new if you want to create a new case, supply your text in the 's' parameter and set the ixPersonAssignedTo to the correct person. For an existing case, use cmd=edit.
This is possible both with a regular form posted to your Fogbugz installation and some server side code that calls the API.
You might want to write a plugin for FB and allow others to use it. (share it or sell it)

Resources