erifash Posted January 1, 2006 Share Posted January 1, 2006 (edited) I am trying to create a udf that will read a file from the clipboard (if you copied it in windows explorer). I have gotten as far as "GetClipBoardData" but I do not know where to continue from here. For testing I am copying this script (named clip.au3) in windows explorer. Would someone experienced with dllcall please help me with this? The link to msdn is in the code. $owner = DllCall("user32.dll", "hwnd", "GetClipboardOwner") $open = DllCall("user32.dll", "int", "OpenClipboard", "hwnd", $owner[0]) If not $open[0] Then Exit $format = DllCall("user32.dll", "int", "EnumClipboardFormats", "int", 0) MsgBox(0, "format", $format[0]) ;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/clipboardreference/clipboardfunctions/getclipboarddata.asp $data = DllCall("user32.dll", "int", "GetClipboardData", "int", $format[0]);"DataObject = 49161" MsgBox(0, "data", $data[0]) DllCall("user32.dll", "int", "CloseClipboard") The name of the clipboard object I am getting is "DataObject" whose format is 49161. For $data[0] I then get 1546416. Thanks! Edited January 1, 2006 by erifash My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
erifash Posted January 1, 2006 Author Share Posted January 1, 2006 *bump* Hm? Anyone interested? My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
erifash Posted January 2, 2006 Author Share Posted January 2, 2006 Nevermind, I just tested regular ClipGet() and now it returns the full path to the file that is copied. When was this implemented? My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now