Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Plugins Page: 1 2  Previous   Next
Rs232 calling for cx777 executable
Author Message
DVD Profiler Unlimited Registrantmb2009
I think I can, I think
Registered: July 24, 2009
Posts: 20
Posted:
PM this userDirect link to this postReply with quote
Ohh happy day!

I will try, but I really really don't know what I am doing. - I don't understand how to call a bat file from within a bat file.  What to put where etc.  If you could doctor up my bat & then I try it, that would be helpful - sorry for lack of knowledge - never been exposed to any of this.

Agrare, thanks for your input - I hate to keep asking mediadogg. -  but we are on a roll here & now could you explain further.

Thanks much.
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,402
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting mb2009:
Quote:
Ohh happy day!

I will try, but I really really don't know what I am doing. - I don't understand how to call a bat file from within a bat file.  What to put where etc.  If you could doctor up my bat & then I try it, that would be helpful - sorry for lack of knowledge - never been exposed to any of this.

Agrare, thanks for your input - I hate to keep asking mediadogg. -  but we are on a roll here & now could you explain further.

Thanks much.

You will need a block of code like this for each parameter (%4, %8, %9) - I will do the one for %4:

Just clone it for %8 and %9 - (change :NEXTNUMP4 to :NEXTNUMP8 or :NEXTNUMP9 ...)

rem send slot# -------------------------------------------------------------------------------------------------------
SET myNumber=%4
:NEXTNUMP4

set onenum=%myNumber:~0,1%
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 %onenum%
@ping 127.0.0.1 -n 2 >null

SET myNumber=%myNumber:~1%
IF NOT [%myNumber%]==[] GOTO :NEXTNUMP4
rem -----------------------------------------------------------------------------------------------------------------------

I thiink this is close to being correct. Maybe Agrare can take a look ...
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Desktop and Mobile RegistrantAgrare
Registered: May 22, 2007
Reputation: High Rating
United States Posts: 1,033
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
that is basically what I was gonna post except it probably explains it better than I would have

-Agrare
DVD Profiler Desktop and Mobile RegistrantAgrare
Registered: May 22, 2007
Reputation: High Rating
United States Posts: 1,033
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
posting a second reply because I have a slightly more complicated way to do it (which eliminates needing to have the block of code multiple times. If this confuses you just ignore it and use what mediadogg posted (but those that understand it will hopefully find it interesting)

All the should be : P with no space

ECHO OFF

SET COUNT=0

"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 1 >null
SET myNumber=%4
GOTO ARSENUM
:RETURN1
@ping 127.0.0.1 -n 2 >null
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 1 >null
SET myNumber=%8
GOTO ARSENUM
:RETURN2
@ping 127.0.0.1 -n 2 >null
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 1 >null
SET myNumber=%9
GOTO ARSENUM
:RETURN3
@ping 127.0.0.1 -n 2 >null
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
pause
GOTO :EOF

REM parsenum block acting as a function
ARSNUM

:NEXTNUM
set onenum=%myNumber:~0,1%
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 %onenum%

SET myNumber=%myNumber:~1%
IF NOT [%myNumber%]==[] GOTO :NEXTNUM
set /a count = %count% + 1

GOTO :RETURN%count%
REM -------------------------------


so basically for each time you want to call it you put

SET myNumber=%4
GOTO ARSENUM
:RETURN1

replacing the %4 with the parameter you wish to call
each time you use it the :RETURN# goes up one number (so first time its :RETURN1, next time its :RETURN2, and so on and so forth.

it cuts down the size of the file, but not sure on the readability, plus if you have a lot of parameters called you need to make sure the # in :RETURN# matches up to the time you are calling it

-Agrare
 Last edited: by Agrare
DVD Profiler Unlimited Registrantmb2009
I think I can, I think
Registered: July 24, 2009
Posts: 20
Posted:
PM this userDirect link to this postReply with quote
Rockin Robin - Tweak Tweak, Twiddle Dee Tweek
Sorry - yes that is a very old song and the tweet needs some tweaking.

Mediadogg, we have it (didn't try Agrare's since what I have works) except one thing.  It does not know how to handle (dare I say it in this DVD world) a CD, which only has Track #.  When the bat processes the chapter number, which does not exist, then it goes berzerk with instructions.  I have tried " rs232 6 " and also rs232 6 0 " for say track 6.  It still looks for a value for "chapter" and then sends the com1 23 (enter command) which is not needed, since there is no "value" .  Hope that makes sense.
Would need something like:
IF %9 has no value, THEN Nothing - (don't complete string instructions)

I tried:  IF %9=0 THEN %majic% ooof!RETURN ECHO "Wonderous Result"

That didn't work.
Your bat of 8-13-09 9:50 works except as noted above.  And oh by the way, the CD I am trying to cue up is a 5.1 or DTS Suround Sound Adio DVD.  I also have SuperAudio CD that would have same issue - I guess (have not purchased yet, so don't know format structure i.e. track/chapter.
Once again, thanking you in advance for your input.
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,402
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting mb2009:
Quote:
I tried:  IF %9=0 THEN %majic% ooof!RETURN ECHO "Wonderous Result"

Here is an example of how to skip over some commands if a paramter is empty:
--------------------------------------------------------------------------------------------------------------------
if [%9]==[] GOTO :skipp9

"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 %9%
@ping 127.0.0.1 -n 2 >null
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 1 >null

:skipp9
---------------------------------------------------------------------------------------------------------------------

I think you get the idea, right? 

Good work so far. I think we've created a monster!!! 

Two new programming concepts for you:

(1) use "==" to comapre two values, but use "=" to tranfer values between variables. They are different operations.

(2) The %x% variables are "lliteral substitutions." That means that you visualize the result by literally replacing the %x% with the actaul characters that it represents. So, if %x% = hello, then [%x%] = [hello], but if %x% is blank or empty, then [%x%] = [], because the middle part is blank. Got it?
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Unlimited Registrantmb2009
I think I can, I think
Registered: July 24, 2009
Posts: 20
Posted:
PM this userDirect link to this postReply with quote
First of all, i want you to know that I hesitated before sending "Submit" button - It's SATURDAY - you should be clipping hedges, or sitting by the pool with a cool one. So thanks for the reply today.

Secondly, I think your last post was a "test" for me, & I failed.  I tried though.

Here is what I have:

rem send Chapter#
SET myNumber=%9
:NEXTNUMP9

If[%9]==[] GOTO :skipp9
If[%9]==[] GOTO :skippcom1 23

set onenum=%myNumber:~0,1%
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 %9%

SET myNumber=%myNumber:~1%
IF NOT [%myNumber%]==[] GOTO :NEXTNUMP9
rem
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 2 >null

:skipp9
:skippcom1 23
pause

It woks just fine (your version) It loads the track number just fine (even double digit!) but I still have the batch file calling the last com1 23 ("Enter" button command for cx777), which I do not need since there is no track#
I also get the error  "If[1] not recognize as interal or external command" etc etc.  I got this before I added my own "skippcom1 23".  So now I get that message twice when the bat file runs.

Gettin closer! Tankyoubeddymuch
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,402
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting mb2009:
Quote:
Secondly, I think your last post was a "test" for me, & I failed.  I tried though.

Well, no it wasn't a test. It was an example. Frankly, it would be enough for someone more familiar with XP command scripting. Nobody knows it all, but you will benefit from additional experience and knowledge. Some of your experiments could not ever work, but you don't have enough knowledge to know. So, you were smart to encourage my enhanced participation in your project. 

I hope you noticed and are taking advantage of the XP command scripting link that I posted in near the top of the LoadDVD thread. At some point you will need to become more self-sufficient. It probably wouldn't hurt to do some reading or take a course in basic programming concepts - because that what you are trying to do. You can't do it "by example" unless you have a better understanding of the basics.

That being said, here are the problems I see:

(1) For this block of statements, if the first one executes, you will never get to the second one.

If[%9]==[] GOTO :skipp9
If[%9]==[] GOTO :skippcom1 23

(2) The statement  "GOTO :skippcom1 23" is incorrect syntax. You should do some reading.

I am really not trying to test you. But you are a bit naive to think that somehow you can stumble your way through, "by example". You need to study and understand the scripting language so that you will develop an intuition about what makes sense, and what doesn't. For example, you would have known that there must be a space between "if" and the "[", and that is why you got the error message.

I suggest you break away from this project for a day or so and play around with some very simple scripting examples that you can use to learn and run tests without all the extra baggage of LoadDVD.

And, don't worry about how I spend my time. I live a very satisfying and enjoyable life, and I do exactly only what I want to do these days ... I'm very lucky and blessed indeed. That's why I don't mind trying to help others.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Unlimited Registrantmb2009
I think I can, I think
Registered: July 24, 2009
Posts: 20
Posted:
PM this userDirect link to this postReply with quote
Spaalloooshhhhh!
Ahhh a refreshing dip in the pool of knowledge.

Before I go any further, I just want you to know I was not trying to offend regarding your time off - I just wanted you to know I did not expect a response on a weekend.  Also, very nice that you recognize your blessings - we can all take a lesson from that.

All that said, LET'S PARTY!  It works!  I now have a Sony MegaDisc DVD Jukebox.  No more FBI WARNINGS between disc changes during the party.  Just music, sweet music.

During my earlier trials (and errors) I had mistakenly left some entires in the location field for a CD and I did not correct them.  Once corrected - the batch works flawlessly for DVD's CD's and Audio DVD which the machine recognizes as a CD.

Thank you Mediadogg for your support - and on to phase II of my project.

For those interested, her is my .bat file for Windows XP (non-professional version)

rem @echo off
rem %1 DescriptionSideA
rem %2 profileid    - this is usually the UPS code
rem %3 disc#
rem %4 slot#
rem %5 LabelSideA
rem %6 filepath
rem %7 and thereafter - remainder of Location field
rem echo %1 %2 %3 %4 %5 %6 %7 %8 %9
rem pause

@echo off
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 2 >null

rem send slot#
SET myNumber=%4
:NEXTNUMP4

set onenum=%myNumber:~0,1%
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 %onenum%
@ping 127.0.0.1 -n 1 >null

SET myNumber=%myNumber:~1%
IF NOT [%myNumber%]==[] GOTO :NEXTNUMP4
rem
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 2 >null

rem send track#
SET myNumber=%8
:NEXTNUMP8

set onenum=%myNumber:~0,1%
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 %onenum%
@ping 127.0.0.1 -n 1 >null

SET myNumber=%myNumber:~1%
IF NOT [%myNumber%]==[] GOTO :NEXTNUMP8
rem
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 2 >null

rem send Chapter#
SET myNumber=%9
:NEXTNUMP9

If [%9]==[] GOTO :skipp9

set onenum=%myNumber:~0,1%
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 %onenum%
@ping 127.0.0.1 -n 2 >null

SET myNumber=%myNumber:~1%
IF NOT [%myNumber%]==[] GOTO :NEXTNUMP9
rem
"C:\Program Files\DVD Profiler\Plugins\LoadDVD\cx777.exe" com1 23
@ping 127.0.0.1 -n 2 >null

:skipp9
pause
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,402
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
I'm in total awe. Up from the ashes of despair, a mighty champion has arisen! 

Congratulations. Good work. You seem to have a whole bunch of perserverance, a healthy tolerance for the grumblings of an old fart such as me, and a learning curve just short of miraculous.

Keep us posted on your jouney to Phase II, and thanks for sharing the results of your efforts. 

@Agrare: Bet you also got a nice warm feeling too ... Thanks for your important contributions. 
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Desktop and Mobile RegistrantAgrare
Registered: May 22, 2007
Reputation: High Rating
United States Posts: 1,033
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting mediadogg:
Quote:
@Agrare: Bet you also got a nice warm feeling too ... Thanks for your important contributions. 


yup, always nice to see someone be able to benefit\use something you did.

I actually like trying to do those advanced\complicated things with batch files. It's amazing what you can accomplish with batch programming and I enjoy a little challenge to push the limits of my batch programming ability

-Agrare
DVD Profiler Unlimited Registrantmb2009
I think I can, I think
Registered: July 24, 2009
Posts: 20
Posted:
PM this userDirect link to this postReply with quote
Quoting Agrare:
Quote:
Quoting mediadogg:
Quote:
@Agrare: Bet you also got a nice warm feeling too ... Thanks for your important contributions. 


yup, always nice to see someone be able to benefit\use something you did.

I actually like trying to do those advanced\complicated things with batch files. It's amazing what you can accomplish with batch programming and I enjoy a little challenge to push the limits of my batch programming ability

-Agrare



Agrare:

Thanks for your contribution - I have much more I would like to be able to do as far as automating DVDProfiler.  I hope you keep an eye out for myy stumblings - I know I can't expect Mediadogg to come up with all solutions.  I really do think others might like what I am trying to dfo, so all f my questions are broughtforth with others in mind.
    Invelos Forums->DVD Profiler: Plugins Page: 1 2  Previous   Next