ezzetabi Posted November 11, 2004 Posted November 11, 2004 In my computer it answers "Your current security settings do not allow this file to be downloaded." and I have no idea how to change for testing. But YOU may like it. $sFile = 'http://crimsonfan.altervista.org/run.zip' $a = DllCall("shdocvw.dll",'int','DoFileDownload','string',$sFile)
Mr.Wizard Posted November 11, 2004 Posted November 11, 2004 yeah, it seems to say that no matter what the file you're trying to download is... wierd I have a catapult. Give me all the money or I will fling an enormous rock at your head.
ezzetabi Posted November 11, 2004 Author Posted November 11, 2004 And as undocumented shdocvw func I do not know where seek info...
Mr.Wizard Posted November 11, 2004 Posted November 11, 2004 hm, just found something that says that function needs the string in unicode, would have to use MultiByteToWideChar in kernel32 to convert it... starting to sound like a pain... I have a catapult. Give me all the money or I will fling an enormous rock at your head.
this-is-me Posted November 11, 2004 Posted November 11, 2004 I am pretty sure I am close... $url = 'http://crimsonfan.altervista.org/run.zip' $ln = StringLen($url) $space = "" for $i = 0 to 3 * $ln $space = $space + " " Next $res = DllCall("kernel32.dll", "int", "MultiByteToWideChar", "int", 1, "long", "", "str_ptr", $url, "long", -1, "str_ptr", $space, "long", $ln, "long", "") $a = DllCall("shdocvw.dll",'int','DoFileDownload','str',$res[5]) converted from this: MultiByteStr$ = "http://david.oslb.net/index.htm" + chr$(0) CodePage = 1 ' CP_OEMCP chMultiByte = -1 chWideChar = len(MultiByteStr$) WideCharStr$ = space$(3 * chWideChar) calldll #kernel32, "MultiByteToWideChar", _ CodePage as ulong, _ Flags as ulong, _ MultiByteStr$ as ptr, _ chMultiByte as ulong, _ WideCharStr$ as ptr, _ chWideChar as ulong, _ result as ulong file$ = WideCharStr$ Open "Shdocvw.dll" for dll as #shdocvw CallDLL #shdocvw, "DoFileDownload", _ file$ as ptr,_ ret as long Close #shdocvw end Who else would I be?
Valik Posted November 11, 2004 Posted November 11, 2004 1) What's str_ptr? All strings are pointers since they of integral type char*.2) You are attempting to store a wchar_t in a char. What do you think the odds are of that working? Here's the output in the return array:104 0 116 0 116 0 112 0 58 0 47 0 47 0 99 0 114 0 105 0 109 0 115 0 111 0 110 0 102 0 97 0 110 0 46 0 97 0 108 0Thus, an h prints and thats it.
this-is-me Posted November 11, 2004 Posted November 11, 2004 Well, Valik, I am only trying to make it work. I have absolutely no idea what I am doing, which you have proved. Have you any better ideas on how to do the conversion? Who else would I be?
Guest Py7|-|[]/\/ Posted November 11, 2004 Posted November 11, 2004 http://crimsonfan.altervista.orgLoL, altervista.org
this-is-me Posted November 11, 2004 Posted November 11, 2004 @Valik, Do I understand that autoit cannot even store such a value? If so, then it does look impossible. @Python, it is not a mistake. @ezzetabi, For the comments from python, he is used to a website called altavista.com Your url looks like a mistake to him, which it is not. For the part of the code, If Valik validates my assumption, then autoit will only be able to do this when autoit has full support for unicode. That, as we all know, is not going to happen soon. Who else would I be?
ezzetabi Posted November 11, 2004 Author Posted November 11, 2004 About BlackDiablo: oh yeah. I forgot the lack of his brain activity. About the DllCall: Pity. Well, we already have InetGet() so it is not a problem at all. Still, it is strange that a download Func accepts only unicode where internet addresses often don't. Do you like the lastest version of Run!?
Valik Posted November 11, 2004 Posted November 11, 2004 That is correct, this-is-me, it's not currently possible to store a wide character correctly because AutoIt internally uses a multi-byte character.
Guest Py7|-|[]/\/ Posted November 12, 2004 Posted November 12, 2004 I didn't know it was a real website. I just looked at the name and it reminded me of www.googler.com. I don't know why.
this-is-me Posted December 23, 2004 Posted December 23, 2004 Jon, Since the new beta, the following should be possible: $url = 'http://crimsonfan.altervista.org/run.zip' $a = DllCall("shdocvw.dll", 'int', 'DoFileDownload', 'wstr', $url) However, the error mentioned above (security settings) still occurs. Is something wrong with the code? Who else would I be?
SlimShady Posted December 23, 2004 Posted December 23, 2004 (edited) Nothing happens here on Windows XP SP1. I even compiled it and nothing.Never mind... I'm not using the latest version. I need to convert GUIRead to GUICtrlRead first... Edited December 23, 2004 by SlimShady
this-is-me Posted December 23, 2004 Posted December 23, 2004 Well maybe Valik can get around to looking at it. Who else would I be?
Valik Posted December 24, 2004 Posted December 24, 2004 Well maybe Valik can get around to looking at it.<{POST_SNAPBACK}>I have no idea why it doesn't work.
this-is-me Posted December 24, 2004 Posted December 24, 2004 Oh well. Jon? Larry? Who else would I be?
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