Jump to content

Recommended Posts

Posted

I have a method of a COM object that needs to accept a pointer. (This is an iTunes hotkey program.) How would I do this or is it not possible?

Func VolUp()

Local $volume = DllStructCreate("long");

$itunes.SoundVolume(DllStructGetPtr($volume, 1));

Dim $newvol = DllStructGetData($volume, 1) + 10;

If $newvol > 100 Then $newvol = 100;

MsgBox(0, "", $newvol);

$itunes.SoundVolume($newvol);

$volume = 0;

EndFunc

  • Moderators
Posted

Thank you. I guess SoundVolume should be used like a property.

Your welcome. Yes it would be something like...

$iVolume = $oiTunes.SoundVolume; retrieve the current volume
$oiTunes.SoundVolume = 50; set the volume

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...