Source language: Translate to:

Drag and drop

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Drag and drop

Postby HackinHoodLogicsTm » Sun Dec 01, 2013 8:03 am

Please i would like to know if there is any script for your application to accept object dragged from desktop. The project is a media player and i want it to accept and play music dragged from desktop. Any help will be appreciated. Thanx :P
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Drag and drop

Postby dec » Sun Dec 01, 2013 8:34 am

Hello,

A possible (and easy) way to do it is using my npDrop plugin.

This plugin allow you to drop files from Windows Explorer onto various NeoBook publication objects, like rectangles, polygons, pictures and more. Also allow you to drop files onto the entire publication.

The plugin allow you to put one or more target objects in the same publication, activate or deactivate this Drop objects, allow or disallow the dropped files, and get all the files and directories finally dropped.


Take a look if you liked. ;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Drag and drop

Postby HackinHoodLogicsTm » Sun Dec 01, 2013 12:14 pm

Yeah, thanx for the reply. It helps
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Drag and drop

Postby dpayer » Wed Dec 04, 2013 8:40 am

HackinHoodLogicsTm wrote:Please i would like to know if there is any script for your application to accept object dragged from desktop. The project is a media player and i want it to accept and play music dragged from desktop. Any help will be appreciated. Thanx :P



David's plugin is more specific to your need but you can also do a drag/drop using WebBrowser windows.

If you set the URL for the window to be: c:\myfolder\files*.mp3 for example it will display a list of mp3 files in that folder. You can drag/drop or cut/paste from another MSIE window (used as a file explorer window) or from the desktop or from a Windows Explorer window.

I was going to paste a sample but I think you can create it faster. Make a new pub with two WebBrowser objects on it. For the URL of each, browse on one to a file on the desktop and select it. Once selected, remove the file name and leave the remaining folder name with the slash. Neobook doesn't like to select folders for this purpose. On the other browser object, select another folder using the same method.

When you run this app, you can drag files from one window to the other.

NOTE: this will MOVE the file between the two locations, not just grab the file name for use or copy the file.

This method is dependent on how the individual user has set up their folder options in windows explorer so some will have list as default, others will have large icons by default.

Still, it is a useful process using built in NB objects for dragging/dropping of files.

David P.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1383
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Drag and drop

Postby mishem » Wed Dec 04, 2013 6:25 pm

mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: Drag and drop

Postby dpayer » Thu Dec 05, 2013 7:51 am

mishem wrote:http://neobooker.ru/_fr/31/ksDrop.rar



Mishem,

I downloaded this and installed the plugin. It appears the plugin is supposed to populate a listbox but it doesn't seem to work. I only get a grey listbox rectangle and a grey picturebox that attempts to dislay a picture named by a variable: [ksDropFile0]

I can drag/drop files into the listbox and their name/path do display but nothing happens after that when I click.

Is that what it is supposed to do?

I can't translate the buttons as they get mangled in NB due to character set issues. (Ðàçðåøèòü ïðè¸ì âíåøíèõ ôàéëîâ) & (Çàïðåòèòü ïðè¸ì âíåøíèõ ôàéëîâ)

David P.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1383
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Drag and drop

Postby mishem » Thu Dec 05, 2013 9:03 am

Hello!

The first button:
Allow receiving external files

The second button:
Disable receiving external files

Push Allow receiving external files

And dragging the image file to Picture1.
In ListBox1 is the full path to the image.
You can drag and drop multiple files. In ListBox1 is a list of paths to these files.
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest