Jump to content

Help with DDE


 Share

Recommended Posts

Hello,

i'm having trouble with DDE (Dynamic Data Exchange)

i've read on the AutoIt Help thing about COM and using ObjCreate.. but i still don't get it!

well, i want to, just like autoit that it would run a certain program when opening a file.

i know how that works (open a map -> goto Folder Options -> Tab File Types -> add new one etc.)

but if i want the fileNAME of the file that i want to check... how do i do that?

like:

<right-click on a file> --> <run> --> <scan the selected file using fileNAME?> --> <done>

get it :)?

well please reply quikly or reply anything...

thanks

- me

Link to comment
Share on other sites

Someone correct me if I am wrong, but the following should work:

1. Open the registry with regedit.

2. Find your extension as '.ext' in HKEY_CLASSES_ROOT. i.e. HKEY_CLASSES_ROOT\.au3

3. Note the default parameter value of this key i.e. AutoIt3Script

4. Find the key named with the value noted above in HKEY_CLASSES_ROOT. i.e. HKEY_CLASSES_ROOT\AutoIt3Script

5. The shell key gives the default application. i.e. HKEY_CLASSES_ROOT\AutoIt3Script\Shell = "Run"

Once you know where to look, you can use the registry read functions.

There may also be a UDF to do this on the forums. If not, as this is Windows functionality, not AutoIt's, search the internet, not just this forum.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

Someone correct me if I am wrong, but the following should work:

1. Open the registry with regedit.

2. Find your extension as '.ext' in HKEY_CLASSES_ROOT. i.e. HKEY_CLASSES_ROOT\.au3

3. Note the default parameter value of this key i.e. AutoIt3Script

4. Find the key named with the value noted above in HKEY_CLASSES_ROOT. i.e. HKEY_CLASSES_ROOT\AutoIt3Script

5. The shell key gives the default application. i.e. HKEY_CLASSES_ROOT\AutoIt3Script\Shell = "Run"

Once you know where to look, you can use the registry read functions.

There may also be a UDF to do this on the forums. If not, as this is Windows functionality, not AutoIt's, search the internet, not just this forum.

damn... i don't get it... :)

i have done everything what you said, but how can i get the filename of the targeted running file and give it to my autoit program?

Edited by Immense
Link to comment
Share on other sites

... Nobody that knows..?? i thought u guys were smart :)

A few of the guys are, most of us are just hardworking dedicated ant's..:D

i'm having trouble with DDE (Dynamic Data Exchange)

Your topic title probably did put people off. DDE is a freeking Norwegian pop band. Most of the people here have newer heard about them. I bet... Oh, Dynamic Data Exchange.... Thats probably not a pop band after all...

i've read on the AutoIt Help thing about COM and using ObjCreate.. but i still don't get it!

well, i want to, just like autoit that it would run a certain program when opening a file.

i know how that works (open a map -> goto Folder Options -> Tab File Types -> add new one etc.)

but if i want the fileNAME of the file that i want to check... how do i do that?

like:

<right-click on a file> --> <run> --> <scan the selected file using fileNAME?> --> <done>

get it :D?

well please reply quikly or reply anything...

thanks

- me

If fileNAME in this case is your autoit prog then the stuff posted by @stumpii should work. Or you could take a look at this

And at last does you script check $CmdLine[] array?

Now the big question why do you want DDE?

Link to comment
Share on other sites

A few of the guys are, most of us are just hardworking dedicated ant's..:)

Your topic title probably did put people off. DDE is a freeking Norwegian pop band. Most of the people here have newer heard about them. I bet... Oh, Dynamic Data Exchange.... Thats probably not a pop band after all...

If fileNAME in this case is your autoit prog then the stuff posted by @stumpii should work. Or you could take a look at this

And at last does you script check $CmdLine[] array?

Now the big question why do you want DDE?

hmmm im now looking at the code you gave me,

but i want the DDE (not neccessary actually) to give the filename..

you can use DDE to make an object and there's some command that gives you the filename.. but i dont know which or maybe it DOESNT exists...

well, you can refind the DDE it @:

[open: My Computer] --> [Menu: Tools] --> [Folder Options] --> [Tab: File Types]

When you do this, you can create extra file TYPES. So i had created a new file TYPE named [.prg]

@Advanced, you can add new events, i've added an event and want to use a certain program.

my event was called [Run Script] with my self-made autoit program.

If u cross the [use DDE], u can use the DDE thing to give certain information about the file, but how do i get it!!!?

i can't be more exact, but i'm checking the script you gave me.. maybe it will help i'll see

- me

Link to comment
Share on other sites

  • 9 months later...

I've just finished a generic UDF library for Windows DDE (client and server).

Here: DDEML.

Edited by doudou

UDFS & Apps:

Spoiler

DDEML.au3 - DDE Client + Server
Localization.au3 - localize your scripts
TLI.au3 - type information on COM objects (TLBINF emulation)
TLBAutoEnum.au3 - auto-import of COM constants (enums)
AU3Automation - export AU3 scripts via COM interfaces
TypeLibInspector - OleView was yesterday

Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCE 

Link to comment
Share on other sites

@Immense

At my opinion your are not looking for DDE ?!

DDE is like loulou has stated in his script meant for data exchange. Meaning that when you drag a file to an Application it would open up that applocation and run the file. This is only 1 example DDE is of course more complex than that.

What kind of information are you looking for I can't see that in you post actually.

This will return the current association type linked to your ".prg"

File Associations

regards

ptrex

Edited by ptrex
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...