Invoking script file from song title
Moderators: BTT, andy55, b.dwall, juxtiphi
Invoking script file from song title
My son recently purchased G-Force and I'm helping him with programming. I wrote a script file which works using the keyboard 'Read' command. Documentation indicates two other ways to invoke a script file. I'm interested in using the 'song title' to initiate a script sequence rather than the keyboard. I can find no information as to which file directory to save the script file so it can be read by G-Force on the start of the song being played. Also, what are the naming conventions e.g. should it have an extension of "txt" or "py"?
I need to add additional information.
I did place the script file in the G-Force "scripts" directory with a .txt extension. But on loading the visualizer in Windows 7 Media Player it still wouldn't read the script based on the song title. The file is an MP3 with the name ID the same as the directory file name.
I turned on the G-Force "debug" mode and can see there is no activity being recorded during startup to read the script file. I have a duplicate of the script file attached to key "3" and it runs using the "Read" script method in the Help dialog box.
I did place the script file in the G-Force "scripts" directory with a .txt extension. But on loading the visualizer in Windows 7 Media Player it still wouldn't read the script based on the song title. The file is an MP3 with the name ID the same as the directory file name.
I turned on the G-Force "debug" mode and can see there is no activity being recorded during startup to read the script file. I have a duplicate of the script file attached to key "3" and it runs using the "Read" script method in the Help dialog box.
I haven't played with scripts much, since they have been converted to Python. So the first thing, I ASSume that your script files need to have the '.py' extension.
I believe the script file needs to have the exact same 'base' name as the music file you are trying to play.
That said, the script files, prior to 5.x, were indeed '.txt' files, and I am not completely convinced that all the features that used to work, or were available, still work after the Python re-write. Don't overlook there are TWO script folders (Win7), The global scripts folder:
- C:\Program Files (x86)\SoundSpectrum\G-Force\Scripts
and
- C:\Users\Accountname\AppData\Roaming\SoundSpectrum\G-Force\Scripts
for your personal stuff.
I am NOT the one that is the authority on this subject, but it might give you a few things to try.
luck
(FWIW - I actually spent a few minutes, and I COULDN'T get it to work)
I believe the script file needs to have the exact same 'base' name as the music file you are trying to play.
That said, the script files, prior to 5.x, were indeed '.txt' files, and I am not completely convinced that all the features that used to work, or were available, still work after the Python re-write. Don't overlook there are TWO script folders (Win7), The global scripts folder:
- C:\Program Files (x86)\SoundSpectrum\G-Force\Scripts
and
- C:\Users\Accountname\AppData\Roaming\SoundSpectrum\G-Force\Scripts
for your personal stuff.
I am NOT the one that is the authority on this subject, but it might give you a few things to try.
luck
(FWIW - I actually spent a few minutes, and I COULDN'T get it to work)
Thanks Jerohm for the reply. I actually have three script files with the same song title as the filename in the scripts directory and other pertinent directories (just in case) - one file with no extension, one with "txt" and the other with "py". None of them work.
As indicated before I did turn on the debugger to watch the effect my code has on the visualizer. So far the only success I've had with scripting is to force the visualizer window to go full size on startup.
I used to program in my youth but Python seems very hostile to my sloppy formatting habits.
As indicated before I did turn on the debugger to watch the effect my code has on the visualizer. So far the only success I've had with scripting is to force the visualizer window to go full size on startup.
I used to program in my youth but Python seems very hostile to my sloppy formatting habits.
... which is 'one' of my main beefs with Python, and the whole object paradigm. While is ENFORCES discipline when trying to coordinate a plethora of programmers' efforts, its syntax also adds a level of arcane abstraction, making simple tasks a chore (, saying nothing about its intelligibility to the layman ). Python makes for a crappy 'general purpose' scripting solution PERIOD! (If there is even the least amount of doubt in your mind about this, look at a pre 5.x script, and what it has now morphed into... YOU HAVE GOT TO BE KIDDING
!!!)
but G-Force REMAINS my favorite program EVER!!
People scoff/belittle Perl, but what it 'may' lack in readability, is more than compensated by its ability to address reasonably complex tasks, with minimal effort... but of course, these are just my findings.

File a problem report and get your issue in queue.

but G-Force REMAINS my favorite program EVER!!
People scoff/belittle Perl, but what it 'may' lack in readability, is more than compensated by its ability to address reasonably complex tasks, with minimal effort... but of course, these are just my findings.

File a problem report and get your issue in queue.
Hi Guys,
I see and here you on this issue. Carl, why don't you open up a support query, and we'll work on this together? When we get a solution, we'll post it here.
Jerohm, I'm sorry you don't like our scripting regime, but we wanted to transfer over to something with more support and documentation than we can currently provide. We also wanted something that would be readable. Every language has it's drawbacks, and you're right on the money with your complaints. We'll do our best to address them in the future.
I see and here you on this issue. Carl, why don't you open up a support query, and we'll work on this together? When we get a solution, we'll post it here.
Jerohm, I'm sorry you don't like our scripting regime, but we wanted to transfer over to something with more support and documentation than we can currently provide. We also wanted something that would be readable. Every language has it's drawbacks, and you're right on the money with your complaints. We'll do our best to address them in the future.
I submitted a query to G-Force support and received the following reply "the title track scripting feature was not carried over when we changed to the Python regime."
Following the update to Python this feature was removed but the documentation was not updated. It's unfortunate that song title scripting is no longer available but using keyboard scripting assignment is a good alternate.
Following the update to Python this feature was removed but the documentation was not updated. It's unfortunate that song title scripting is no longer available but using keyboard scripting assignment is a good alternate.