Source language: Translate to:

Dropfile command

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Dropfile command

Postby dpayer » Mon Apr 30, 2012 12:01 pm

I was even unaware of this command until today!

When I attempted to use it I ran into a problem. It works fine with the example of dropping a file onto notepad.exe.

I attempted to drop an XML file onto Internet Explorer. I can do that directly using window file explorer and it will display the XML in the browser as expected. If I attempt doing so with the dropfile command, I get the error:

Error
Application does not accept dropped files.

and then the browser will display its home page.

Is this an error on my behalf or a limitation of the command/and/or the application? This can be duplicated by creating an app with one button and with this action for the button:

Code: Select all
FileOpenBox "Select File" "Any File|*.*" "c:\" "[selectedfile]" ""
DropFile "c:\program files\internet explorer\iexplore.exe" "[selectedfile]"




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

Postby Neosoft Support » Mon Apr 30, 2012 12:05 pm

Microsoft hasn't documented the drop file feature, so it had to be reverse engineered. It may not work with all applications. I can't explain why Microsoft would implement it one way in Notepad and another way in Explorer.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby dec » Mon Apr 30, 2012 12:09 pm

Hi,

Take a look if can be a problem with privileges. You cannot drop files from one program to another if these programs don't have the same running privileges. And I think this cannot be only occur if you run your publication as an admin or the other program as an admin: maybe Internet Explorer (due to this program characteristic) run in certain privileges with not match with other programs like your publication. Of course I'am don't sure if this is the case, but maybe it's.
.
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

Postby dpayer » Mon Apr 30, 2012 1:05 pm

Neosoft Support wrote:Microsoft hasn't documented the drop file feature, so it had to be reverse engineered. It may not work with all applications. I can't explain why Microsoft would implement it one way in Notepad and another way in Explorer.


I wonder if it would be possible to have the dropfile command work like the "send to" menu item in the file explorer. When I added a lnk of Internet Explorer to the "send to" folder (in Win7 it is C:\Users\Username\AppData\Roaming\Microsoft\Windows\SendTo ) and then I sent the same files to the IE via 'Send To' they loaded as expected.

Now all you have to do is reverse engineer how the 'send to' folder works! :)

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

Postby Neosoft Support » Tue May 01, 2012 11:16 am

If the file is associated with the program you want to display it, you can just pass the file name to the Run action. For example:

FileOpenBox "Select File" "Any File|*.*" "c:\" "[selectedfile]" ""
Run "[selectedfile]" "" "Normal"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest