AndreLuiz
(Getting the hang of it)
2015-10-08 10:40 PM
[object]help

Hello I still do not understand how to create an object etc ...
I wanted to understand how I can do what I did in .vbs in KiXtart.

 Quote:

Set Wmp = CreateObject("WMPlayer.OCX")
arquivo = "E:\I Know You Skylar Grey.mp3"
Wmp.URL = (arquivo)
Wmp.Controls.play
do while Wmp.currentmedia.duration = 0
wscript.sleep 100
loop
wscript.sleep (int(Wmp.currentmedia.duration)+1)*1000


Well I do not quite understand about the createobject () and getobject ().
Well thank you now and be in God and even...

Ps:The case you are seeing something very wrong in my text is why I am using the "Google Translator".


LonkeroAdministrator
(KiX Master Guru)
2015-10-09 01:22 AM
Re: [object]help

I don't remember for sure but I think ocx is not a com-object. So it does not work with kixtart.

AndreLuiz
(Getting the hang of it)
2015-10-09 09:32 AM
Re: [object]help

Thanks, I'll seek another way to do this then

BradV
(Seasoned Scripter)
2015-10-09 12:35 PM
Re: [object]help

If you could explain to us what you are trying to accomplish, we might be able to give you other ideas. Also, since activex is a follow-on to OCX and is backward compatible, you should be able to use an activex compliant tool such as Internet Explorer to run the ocx command.

LonkeroAdministrator
(KiX Master Guru)
2015-10-09 01:11 PM
Re: [object]help

Brad, that is clever.

$de=createobject(ie.application)
$de.url=about:blank
$de.document.innerhtml...

yea.
I was thinking yesterday, if all that was needed was playing an mp3, you can use shell.application object, or use a oneliner:
shell "explorer.exe e:\my.mp3"

UDFs for shell:
for shell execute http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=83752
for shell invoke http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=83736

here is a simple starter script for IE:
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Board=8&Number=171493


AndreLuiz
(Getting the hang of it)
2015-10-13 07:25 PM
Re: [object]help

Hello, thank you all, but I preferred to use the wmplayer, used the UDF RunEx and it worked good! Thank you so, but as I said I do not know anything about how to create an object, then I did not understand anything about what you did above, just recently I'm using KiXtart.