alaa777 Posted May 9, 2010 Share Posted May 9, 2010 Success: True Failure: False and set @error @error: 1 - Unable to Open Clipboard 2 - Unable to Empty Cipboard 3 - GlobalAlloc Failed 4 - GlobalLock Failed 5 - Unable to Create H_DROP 6 - Unable to Update Clipboard 7 - Unable to Close Clipboard 8 - GlobalUnlock Failed there is no information about error =9 Link to comment Share on other sites More sharing options...
somdcomputerguy Posted May 9, 2010 Share Posted May 9, 2010 Maybe it's 8 and 1? - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
alaa777 Posted May 9, 2010 Author Share Posted May 9, 2010 what drive me crazy is it was working yesterday today it is not working i restarted my laptop i made it compatible with windows xp sp 2 even runned it in xp mode :S nothing happened any suggestion? the only thing i done is installing xp mode i don't think installing xp mode is the reason why it doesn't work Link to comment Share on other sites More sharing options...
MHz Posted May 10, 2010 Share Posted May 10, 2010 9 - GlobalFree Failed. It returns a value in @extended returned from _WinAPI_GetLastError() in the _ClipPutFile() UDF. That value may have been more useful to get the error message. Link to comment Share on other sites More sharing options...
alaa777 Posted May 10, 2010 Author Share Posted May 10, 2010 so i need help what should i do to fix this? i did trick to do what i want temporary but it's sick trick i put the file i want in directory then open that directory then use send() the first letter to select the file then send ctrl c but really i need help with that error Link to comment Share on other sites More sharing options...
MHz Posted May 11, 2010 Share Posted May 11, 2010 The question is what needs fixing. Testing tells me that it is a bug by running the code below. #RequireAdmin #include <Misc.au3> #Include <WinAPI.au3> $file = @ScriptDir & "\img24.jpg" $fTest = _ClipPutFile($file) If Not $fTest Then MsgBox(0, '@error = ' & @error & ' @extended = ' & @extended, _WinAPI_GetLastErrorMessage()) Else MsgBox(0, 'No error condition', '$fTest has a value') EndIf I changed the JPG name to suit what I had available at the time. I get an output of: --------------------------- @error = 9 @extended = 0 --------------------------- The operation completed successfully. --------------------------- OK ---------------------------from WinXP SP3 within Virtualbox. @extended tells me 0. I also tried using ClipGet() after _ClipPutFile() which gives me the full path to the file. _ClipBoard_GetData() gives me a empty file if I use FileWrite with the return from it. Searching the forum for "_ClipPutFile()" may give some hint at why others have not had this issue. It is odd why the error of 9 is undocumented so it may have been added later. Link to comment Share on other sites More sharing options...
alaa777 Posted May 11, 2010 Author Share Posted May 11, 2010 the same and working and pressed ctrl v the image pasted i don't know what was wrong thx any way --------------------------- @error = 9 @extended = 0 --------------------------- The operation completed successfully. --------------------------- OK --------------------------- Link to comment Share on other sites More sharing options...
tip Posted May 17, 2010 Share Posted May 17, 2010 (edited) Hi to all, I'm experiencing the very same problem. Does anybody has a solution for this? I'm using this code: $1 = FileOpenDialog("Title",@MyDocumentsDir, "(*.*)", 1 + 4 ) $2 = _ClipPutFile($1) MsgBox(64,"",$2 & @CRLF & @error & @CRLF & @extended & @CRLF & _WinAPI_GetLastErrorMessage() & @CRLF & ClipGet() ) ...and having this as result/error: ClipputFile_Return = False @error = 9 @extended = 0 Win API Last Error = The operation completed successfully. //this is the weird part. When I read clipboard with Clipget() I get this: ocuments and Settings\Administrator\My Documents\Untitled //But when I read $1 it gives a proper file destionation: C:\Documents and Settings\Administrator\My Documents\Untitled-1.odt Note that I added "@error =","ClipPutFile_Return =" etc. to make it easier to understand ... I'm using version 3.3.6.1 and Windows XP 64-bit with SP2 installed. Thank in advance Tip Edited May 17, 2010 by tip [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center] Link to comment Share on other sites More sharing options...
WinkleDoodle Posted November 30, 2011 Share Posted November 30, 2011 (edited) Looks like it was fixed in the beta 3.3.7.x sometime ago. The 9 error is still undocumented... Also not documented: the separator must be a single character. @CRLF is no good. :| Edited November 30, 2011 by WinkleDoodle 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