Write a file with info about which items were dragged and dropped?

Jun 04, 2017

I asked this question about populating a PDF with drag and drop info:

https://community.articulate.com/discussions/articulate-storyline/how-to-save-results-of-drag-and-drop

but nobody replied.  That makes me think it is not possible with Articulate.  If that is true, is there any way to populate any kind of file with information about which items were dragged and dropped from a previous slide?  I have triggers that change the state if an item is selected, but that's it.  Is this possible?  Thanks

6 Replies
Phil Mayor

Finding out which object is dropped can be difficult as the built in drop correct and incorrect states can often not update when you move them after dropping them once.

You could add triggers to change the state of an object when it is dropped, and then use this to change the value of a variable. I don't think it will be 100% accurate.

The variable data could then be used to generate a html page that can be printed or saved to pdf (if the OS supports this).

Frank Siegel

I'm getting somewhere.  I've got some variables (corresponding text box near picture) and if something is dragged and dropped, I write a text file based on the variables' values.  But you can only write text files with ActiveX, and I want to use all browsers, not just IE.  So what is the normal Articulate way of doing this?  Ideally I would like to use a blank pdf and write to it.  I know is there is a pdfmake library out there.  Is that the best way?  Basically, after the guy drags and drops and hits a button, I want a file to come up with info about which things were dragged.  I don't really care what format the file is in.  Thanks

Frank Siegel

Also posted this answer with the other thread:

I actually decided to go with html, as pdfmake wasn't really working for me, and I didn't really care whether my file was a pdf or not. In fact, I really didn't need a file -- just the info. I basically have 2 triggers on each item to be dragged and dropped, and I set a variable when I drop it on the target. I unset the variable when I drag it back. I created a transparent shape over the drop target so that I could tell when something was dragged over it, thus unsetting the variable. Then I just wrote some JavaScript to use the variables, generate an .html file, display it, and print it if I want.

This discussion is closed. You can start a new discussion or contact Articulate Support.