AutoHotkey Community

It is currently May 27th, 2012, 10:20 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: July 10th, 2007, 4:04 pm 
Offline

Joined: May 20th, 2007, 7:48 pm
Posts: 48
Sean wrote:
Actually, I've been very tempted to update CoHelper.ahk itself, with the one I'm currently using, however, it'll break all the COM scripts posted in the forum by myself.
Would you please post it? Perhaps using a different name, e.g. CoHelper_v2.ahk, so existing scripts continue to work while new ones can take advantage of the improvements. Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 12:11 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
tfcahm wrote:
Sean wrote:
Actually, I've been very tempted to update CoHelper.ahk itself, with the one I'm currently using, however, it'll break all the COM scripts posted in the forum by myself.
Would you please post it? Perhaps using a different name, e.g. CoHelper_v2.ahk, so existing scripts continue to work while new ones can take advantage of the improvements. Thanks!

No new functions, except for Ansi4Unicode & Unicode4Ansi.
Just elliminated ByRef parameters whenever possible, in favor of plain parameters or just pointers.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 6:29 am 
ah, that was not a typo!
I tried your new invoke but got an error "Unicode4Ansi non-existent call"


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 7:07 am 
Offline

Joined: May 20th, 2007, 7:48 pm
Posts: 48
Sean wrote:
No new functions, except for Ansi4Unicode & Unicode4Ansi.
Just elliminated ByRef parameters whenever possible, in favor of plain parameters or just pointers.
Thanks Sean.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 10:49 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
ABCyourway wrote:
I tried your new invoke but got an error "Unicode4Ansi non-existent call"

Oops, sorry. I changed it to Ansi2Unicode, so it'll work now with the official CoHelper.ahk.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 11:11 am 
Quote:
I changed it to Ansi2Unicode, so it'll work now with the official CoHelper.ahk


When I got an erro, I already tested that way(changing it to Ansi2Unicode)
And when I was about to post the result, I saw your post and guessed it was not yet implemented.

Here is the test result with your original WMPlayer script.

1)

original cohelpr & original wmpEmbedding script's working(accordingly, original invoke, nothing edited)

Code:
iret := Invoke(pwmp, "URL", DispParams(varg, 8, Ansi2Unicode(sUrl, wUrl)), 4)
msgbox, %iret%

(iret = 0 and works OK)




2)

I thought it's just a typo, edited it to "Unicode2Ansi", and then got no error but seems to be doing nothing.
So I also changed it to Ansi2Unicode, but the same result.

Code:
iret := Invoke(pwmp, "URL=", sUrl)
msgbox, %iret%

(iret = -215124 and notghing happens)


I don't remember exactly the return value but maybe always the same negative number whenver excuted
twice tested with "Unicode4ansi to Unicode2Ansi" and "Unicode4Ansi to Ansi2Unicode" before you change it.

I don't know if I get the wrong idea about the new invoke's usage.
Can you check it out with new invoke function?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 11:45 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
ABCyourWay wrote:
When I got an erro, I already tested that way(changing it to Ansi2Unicode)

Changing only the function name isn't enough, have to switch the parameters too:

Code:
Unicode4Ansi(ByRef wideString, ansiString)
Ansi2Unicode(ByRef ansiString, ByRef wideString)

Anyway, it worked fine in my test.

Code:
Invoke(pwmp, "URL=", sUrl)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 12:54 pm 
Code:
Anyway, it worked fine in my test.

Good to know. That means I'm doing something wrong here.

This is what I did.

1) copy the original "cohelper.ahk" directly from the Cohelper post.
It means the newest script.
2) and then replace original invoke in cohelper.ahk with New substitute Invoke and save cohelper.ahk file.
3) and then use "Invoke(pwmp, "URL=", sUrl)"

something different from what you did?

and I don't understand this part

Code:
Unicode4Ansi(ByRef wideString, ansiString)
Ansi2Unicode(ByRef ansiString, ByRef wideString)


Does that mean do I have to edit something myself or you had already done in new invoke function?

Thanks for reply.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 1:03 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
ABCYourWay wrote:
This is what I did.

How about posting the full script you used?

Quote:
Does that mean do I have to edit something myself or you had already done in new invoke function?

All were done already.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2007, 2:11 pm 
I read this post again from Top to down.
Well, I have to say "REALLY, REALLY SORRY."
It was my fault.

you explicitly mentioned, invoke(pObj, "Functionname", params)
so that's why my script worked in some cases(invoke property is the same syntax as easycom) but failed in other cases(invoke functions, easycom use "functionname()". errr.....

I just edited invokeS to invoke in my script.
That was silly!
Thanks again.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2008, 10:49 am 
Offline

Joined: July 21st, 2006, 12:26 am
Posts: 223
Question:
I've researched at http://msdn.microsoft.com/en-us/library/bb249349(VS.85).aspx
I can't figure out how to retrieve the buffer status. Can someone show me how to?

My situation:
I'm using it to streaming, for other parts in the gui: tic's GDI+ and heresy memory flusher. When I try to close it when the buffer is still loading, the script memory leaks resulting in a instant call for a debugger.

I've first thought it was a conflict with heresy code, but I had disabled it and the script still was leaking. So, I suppose, somehow, tic's lib plus sean's code are generating this odd problem. Note that sean's code in stand alone mode works flawlessy.

Idea:
To write code checking buffer status and waiting till it ends, so maybe it can avoid the memory leakage.

any other suggestions? comments?
thanks in advance

_________________
                                  [ profile | ahk.net | ahk.talk ]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2008, 11:34 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2250
Location: switzerland
I've tried to see TV YOUTUBE VIDEO URL embedded
small script:
http://www.autohotkey.com/forum/topic31285.html

http://www.autohotkey.com/forum/viewtop ... highlight=


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2008, 3:03 pm 
Offline

Joined: July 17th, 2008, 9:46 am
Posts: 225
HI AutoHotkey-User.
Is it possible, to embed WMP in MiniMode to an AHK Gui ?
IF yes, how can i embed it?
thanks in advance
Greets,
DHMH


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2008, 11:00 pm 
Offline

Joined: July 21st, 2006, 12:26 am
Posts: 223
DHMH wrote:
Is it possible, to embed WMP in MiniMode to an AHK Gui ?
IF yes, how can i embed it?


according to http://msdn.microsoft.com/en-us/library/bb249370(VS.85).asp

add the following code before Invoke(pwmp, "Play")
Code:
Invoke(pwmp, "uiMode=", "mini")

_________________
                                  [ profile | ahk.net | ahk.talk ]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 19th, 2008, 12:17 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
k3ph wrote:
I can't figure out how to retrieve the buffer status. Can someone show me how to?

It's a COM event. I'll demonstrate using COM.ahk.
Code:
...
COM_Init()
pwmp := COM_CreateObject("WMPlayer.OCX")
psink:= COM_ConnectObject(pwmp, "WMP_")
...
Return

WMP_Buffering(prms)
{
    If    COM_DispGetParam(prms)  ; can be -1 or 0
    ...
}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: specter333, XX0 and 26 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group