Jump to content
Sign in to follow this  

[SOLVED] Transferring data from one script to another

Recommended Posts

Hi, what I need is to pass a window handle from a script to another (no, don't reply with "why not getting the handle directly in the second script...I don't want to do that).

I found the UDFs _AU3COM_SendData and _AU3COM_RecvData on this forum and used them successfully with basic text... but for the handle it only gives the hex string representation (that you can read with Au3Info).. and not the actual 32 bit handle. So I've looked at how was those UDFs working.. and that led to DllStructCreate , apparently this is where is setup the type of data send between the sender and the receiver. In the Helpfile, the DllStructCreate has a lot of datatypes available and I wonder if you would know which one would be the handle one ? And if that would work...

If anyone got another idea to perform what I'm looking for feel free to post ideas.

Edit : after some more researches ,

I found out that handles are of type Pointer (in Autoit) or Ptr in Windows APIs.. so, I have this to modify I guess, to be able to handle (lol) windows handles with that function :

Func _AU3COM_SendData($acsd_InfotoSend, $acsd_RecvWinTitle)

    Local $StructDef_COPYDATA = "dword var1;dword var2;ptr var3";I have changed piccaso's structure

    Local $CDString = DllStructCreate("char var1[256];char var2[256]");the array to hold the string we are sending
    If @error Then SetError(0,@error,0)

but .. I suck, I admit.. with datatypes. What would I need to put instead of 'dword var1' ? 'Pointer var1' ?? .. and "char var1[256]" (no idea..) ?

Help please :)

Nevermind I found myself.. 2 hours to find that Ptr($stringHandle) would convert my variable in an actual Pointer type handle that I can use with my functions..

Edited by MikeP

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...