Go Back   Access World Forums > Apps and Windows > Excel

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-23-2019, 12:05 PM   #46
Gasman
Enthusiastic Amateur
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 3,669
Thanks: 398
Thanked 636 Times in 617 Posts
Gasman has a spectacular aura about Gasman has a spectacular aura about Gasman has a spectacular aura about
Re: get details of song being played

Quote:
Originally Posted by smiler44 View Post

I have no code for the other project as I do not know how to get the title of the song that is being played or the duration of the song being played

smiler44
Neither do I TBH. I would be looking at storing the duration as the files are being selected and summing the duration.

You are already using the duration of the file you are going to play to pause the selection for the next file to play, or so it seems to me.?

You could even write them to the sheet to show a sort of playlist. Excel itself could even add the duration and you would then check that cell.?

However I would take it in small steps and make it fancier after it is all working to your satisfaction.

__________________
Access novice. Sometimes trying to give something back.
Access 2007


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
Old 05-23-2019, 12:06 PM   #47
smiler44
Newly Registered User
 
Join Date: Jul 2008
Location: UK
Posts: 637
Thanks: 13
Thanked 9 Times in 8 Posts
smiler44 is on a distinguished road
Re: get details of song being played

Quote:
Originally Posted by Gasman View Post
OK, I posted for Access, but what it and Excel have in common is VBA, and that is what you are trying to code in.
Look for a book on Excel VBA then.

Post your new project and I will try and assist as to how I would approach it.
I will not write it for you, but point you in what I think is the right direction.

Others will then be able to help as well.

Alternatively try and understand your first project especially the FileInfo sub and take it from there. You will find as you do these projects that some functions will become common to all.

all i want help with is getting the duration of the song being played or the name of the song being played. I think once I have this info I can proceed

smiler44
smiler44 is offline   Reply With Quote
Old 05-23-2019, 12:22 PM   #48
smiler44
Newly Registered User
 
Join Date: Jul 2008
Location: UK
Posts: 637
Thanks: 13
Thanked 9 Times in 8 Posts
smiler44 is on a distinguished road
Re: get details of song being played

Quote:
Originally Posted by Gasman View Post
You have it the wrong way round.
You tell WMP what to play, so at that point YOU know what the filename is.
i do as in me but the macro doesn't and cant hard code the song title as next time i may select different songs .

smiler44

smiler44 is offline   Reply With Quote
Old 05-23-2019, 12:25 PM   #49
smiler44
Newly Registered User
 
Join Date: Jul 2008
Location: UK
Posts: 637
Thanks: 13
Thanked 9 Times in 8 Posts
smiler44 is on a distinguished road
Re: get details of song being played

Quote:
Originally Posted by Gasman View Post
Neither do I TBH. I would be looking at storing the duration as the files are being selected and summing the duration.

You are already using the duration of the file you are going to play to pause the selection for the next file to play, or so it seems to me.?

You could even write them to the sheet to show a sort of playlist. Excel itself could even add the duration and you would then check that cell.?

However I would take it in small steps and make it fancier after it is all working to your satisfaction.
no no no you are thinking of an existing macro that selects a song, i need a new one and this macro will not select any songs, just work out the duration of the song being played or give me the song title of the song being played.

We need to ignore any existing macro and start a fresh

smiler44
smiler44 is offline   Reply With Quote
Old 05-23-2019, 01:37 PM   #50
June7
Newly Registered User
 
June7's Avatar
 
Join Date: Mar 2014
Posts: 1,958
Thanks: 0
Thanked 462 Times in 458 Posts
June7 will become famous soon enough June7 will become famous soon enough
Re: get details of song being played

If you manually open WMP in Windows and select playlist/library/album/artist and then click play, I don't see how you can get file info. Somewhere you must give instruction on what song(s) to send to player.
__________________
Attach File Manager is below Advanced editor window, click Go Advanced below Quick Reply window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by June7; 05-23-2019 at 02:59 PM.
June7 is online now   Reply With Quote
Old 05-23-2019, 10:53 PM   #51
smiler44
Newly Registered User
 
Join Date: Jul 2008
Location: UK
Posts: 637
Thanks: 13
Thanked 9 Times in 8 Posts
smiler44 is on a distinguished road
Re: get details of song being played

Quote:
Originally Posted by June7 View Post
If you manually open WMP in Windows and select playlist/library/album/artist and then click play, I don't see how you can get file info. Somewhere you must give instruction on what song(s) to send to player.
for this project, i dont press the shuffle button, once i have manually selected the songs i press play.
i select windows explorer/documents/directory holding songs/ the songs i want to play/play

smiler44
smiler44 is offline   Reply With Quote
Old 05-23-2019, 11:37 PM   #52
Gasman
Enthusiastic Amateur
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 3,669
Thanks: 398
Thanked 636 Times in 617 Posts
Gasman has a spectacular aura about Gasman has a spectacular aura about Gasman has a spectacular aura about
Re: get details of song being played

Well I think you are trying to run before learning to walk.

Have a look here https://docs.microsoft.com/en-us/win...-for-scripting for info on working with WMP.

Good luck with it regardless.

__________________
Access novice. Sometimes trying to give something back.
Access 2007


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
Old 05-24-2019, 12:01 AM   #53
June7
Newly Registered User
 
June7's Avatar
 
Join Date: Mar 2014
Posts: 1,958
Thanks: 0
Thanked 462 Times in 458 Posts
June7 will become famous soon enough June7 will become famous soon enough
Re: get details of song being played

That link is about the WindowsMediaPlayer ActiveX control that would be embedded on worksheet or Access form. I don't think it pertains to WMP app opened independently. I tried code to address the app, like with Outlook or Excel, and it fails.

Doesn't matter if you select files in Windows Explorer or in the WMP, there is no code managing this process.
__________________
Attach File Manager is below Advanced editor window, click Go Advanced below Quick Reply window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
DEBUG! DEBUG! DEBUG!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
June7 is online now   Reply With Quote
Old 05-24-2019, 12:05 AM   #54
Gasman
Enthusiastic Amateur
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 3,669
Thanks: 398
Thanked 636 Times in 617 Posts
Gasman has a spectacular aura about Gasman has a spectacular aura about Gasman has a spectacular aura about
Re: get details of song being played

June7,
That shows you how far I am out of my depth.

Quote:
Originally Posted by June7 View Post
That link is about the WindowsMediaPlayer ActiveX control that would be embedded on worksheet or Access form. I don't think it pertains to WMP app opened independently. I tried code to address the app, like with Outlook or Excel, and it fails.

Doesn't matter if you select files in Windows Explorer or in the WMP, there is no code managing this process.
__________________
Access novice. Sometimes trying to give something back.
Access 2007


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
Old 05-24-2019, 12:44 PM   #55
smiler44
Newly Registered User
 
Join Date: Jul 2008
Location: UK
Posts: 637
Thanks: 13
Thanked 9 Times in 8 Posts
smiler44 is on a distinguished road
Re: get details of song being played

Quote:
Originally Posted by Gasman View Post
Well I think you are trying to run before learning to walk.

Have a look here https://docs.microsoft.com/en-us/win...-for-scripting for info on working with WMP.

Good luck with it regardless.
thank you very kind.
I will keep trying, I'm of the mindset, it is possible... just I dont know how

smiler44
smiler44 is offline   Reply With Quote
Old 05-24-2019, 01:56 PM   #56
Gasman
Enthusiastic Amateur
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 3,669
Thanks: 398
Thanked 636 Times in 617 Posts
Gasman has a spectacular aura about Gasman has a spectacular aura about Gasman has a spectacular aura about
Re: get details of song being played

Not being condescending, honest, but I speak it as i see it.
What you have achieved with your skill level is impressive.

However you have to know your limits.? The fact that you have had no response other than what has passed, would infer to me that this is new to even the experts?

You already have a method of passing filenames to WMP to play, at the moment it is random, but the same method could be used to play selected files.?

Alternatively June7 states that link I posted works with a WMP activeX control.?
That appears to allow you to add to a playlist, but at the same time the logic is you select the file, and when you do so, you already know how to get the duration.?

So do not stay hard wired on one particular way, but explore other methods.?

Good luck with it regardless.
__________________
Access novice. Sometimes trying to give something back.
Access 2007


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
Old 05-31-2019, 10:55 AM   #57
smiler44
Newly Registered User
 
Join Date: Jul 2008
Location: UK
Posts: 637
Thanks: 13
Thanked 9 Times in 8 Posts
smiler44 is on a distinguished road
Re: get details of song being played

Quote:
Originally Posted by Gasman View Post
Not being condescending, honest, but I speak it as i see it.
What you have achieved with your skill level is impressive.

However you have to know your limits.? The fact that you have had no response other than what has passed, would infer to me that this is new to even the experts?

You already have a method of passing filenames to WMP to play, at the moment it is random, but the same method could be used to play selected files.?

Alternatively June7 states that link I posted works with a WMP activeX control.?
That appears to allow you to add to a playlist, but at the same time the logic is you select the file, and when you do so, you already know how to get the duration.?

So do not stay hard wired on one particular way, but explore other methods.?

Good luck with it regardless.

thank you I'm trying using a media player active x to see where this gets me. I'll have to learn how to use it but time is on my side

smiler44

smiler44 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Song Lyrics NauticalGent The Watercooler 36 10-18-2018 12:10 PM
Song and Band names KenHigg Politics & Current Events 2 12-05-2014 08:51 PM
Add a song to iTunes speakers_86 General 7 02-23-2012 09:03 PM
Well its been a while since I played with Queries so some noob help please. jam Queries 5 06-01-2009 06:23 AM
hymnal and song subform mikevds Forms 2 03-18-2009 09:08 AM




All times are GMT -8. The time now is 03:17 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World