Jump to content

Send Dde Execute Help


This topic is 4509 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have created a simple batch file that will allow a user to enter a folder name and then it will export all of the file names into a txt file. the code looks like this:

@echo OFf

c:

set /p name=What is the name of the folder:

cd C:\Documents and Settings\user\Desktop\%name%

dir /s /b >C:\filenames.txt

I am using FMPA 11 and am trying to use Send DDE Execute to run this batch file. Anyone know what I enter into the following fields?

Service Name:

Topic:

Commands:

I am happy to move the commands out of the batch file and into file maker but the topic and commands have me stumped. I continually receive an error code of 3. " Command is unavailable (for example, wrong operating system, wrong mode, etc.) "

Thanks.

Link to comment
Share on other sites

Absolutely no need for DDE execute (in fact, totally forget about it, it's been dead for close to 10 years).

What you're looking for is the Send Event script step.

Here what I suggest:

  1. Store your batch file syntax in a field
  2. use 'export field contents' to export it to a file named "fm.bat", say in the root of the C: drive
  3. then use 'send event' to call the batch file either hard coded or calculated if you're using variables for the export location
You can probably do away with the batch file altogether and just do one Send Event with this command:

cmd /c @echo OFF && c: && set /p name=What is the name of the folder: && cd C:\Documents and Settings\user\Desktop\%name% && dir /s /b >C:\filenames.txt

Haven't tested this so it may need quotes in strategic places.

You can do this with a VBscript instead of a batch file and have more control (including calling a FileMaker import script when you're done). Check out the VBscript repository file on my website: www.connectingdata.com/downloads

Link to comment
Share on other sites

  • Newbies

Perfect thanks!! I did have to change the syntax a bit, but here is what I learned/did.

I took your advice and moved the commands out of the batch file to create a single send event. The final event ended up being:

cmd /c c: && cd $directory && dir /s /b >c:\filenames.txt

Changing /c to /k was really helpful to debug as it kept the command prompt window open.

I then realized that /c is the same as @echo OFF so I removed it.

I also moved the directory question into the filemaker UI.

Link to comment
Share on other sites

  • 11 months later...
  • Newbies

I know this thread is a little old, but I have a similar problem and i'm hoping someone can help.

I'm working with a database where i have paths to wav files. I'm trying to set up a script that will open vlc player then play the file path that is referenced in the file path field.

I've tried Send Event. I can get this to work only sometimes. If i log off, it stops working and i have to recreate the script all over again. With Send Event, I can get it to open the vlc player -- but i can't find the commands or the next script step that will actually play that in the player which has just opened.

I've tried Send DDE Execute to no avail. I can't even get vlc to open with this script step.

I've also tried inserting the path as a Quicktime into a Container field. This is not very preferable as I have over 40K wav files and none of the ways i've been told to automatically insert each file path into the container field works -- so i'd have to copy the path and do this manually. Further, when i do insert it as a quicktime, the "contol bar" disappears. And, frankly, it seems to slow the response down and plays significantly softer than through vlc.

Thoughts? ANyone out there??

Link to comment
Share on other sites

Send Event should work fine.

vlc file://%s vlc://quit

where %s represents the path to the WAV file, URL encoded (this should help remedy any issues related to spaces in the filename). The quit command will close VLC when the playlist completes; that may help with issues upon successive calls. URL encoding of filename can be accomplished with FM's GetAsURLEncoded() function. If you don't want to URL encode the filename, then just put it in quotes, e.g.

Send Event|Calculated:

""" & "C:Program Files (x86)VideoLANVLCvlc.exe" & """ & " " & """ & "C:UsersMedeonDownloadsFat Albert and the Cosby Kids - Vol 1Fat Albert and the Cosby Kids - 01 Lying.avi" & """ & " " & """ & "vlc://quit" & """

is a concrete working example. Note the need to include quotes and spaces, and file extension. Since most filepaths contain spaces, either quoting or URL encoding, may be a must because otherwise DOS interprets that space as a delimiter between successive parameters, splitting the filepath in two and making two unreadable filenames.

Above assumes VLC is in Program Files (X86) which would be the case for a default install in Winblows 7. Remove " (x86)" from path for XP. You should be able to stack multiple A/V files by listing them on command line one after another, with a space between them, each delimited by quotes.

If still experiencing problems, paste command into DOS, and also, turn VLC verbose logging to file on. VLC is a good choice for playback but you can also try Winblows Media Player if it's giving problems.

Link to comment
Share on other sites

  • 2 weeks later...

Adding some perspective here: the DDE Execute script step will only work when you target an application that is a DDE host or server. Very few apps are because DDE is very (VERY) old technology. Most of the Office apps are DDE hosts, or were up to version 2003. Haven't checked versions 2007 and 2010. So you can't expect the DDE Execute to work with things like VLC or even the Windows shell itself.

Ironically, FileMaker Pro itself is not a DDE host, so you can't use DDE commands from outside FMP to make it do things....

Hope this adds some clarity. Forget about DDE.

Link to comment
Share on other sites

This topic is 4509 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.