Indigo Rose Software
  #1  
Old 09-29-2005
HumptyDumpty HumptyDumpty is offline
Forum Member
 
Join Date: Sep 2005
Posts: 8
Script Commandline Arguments [CDIMAGE]

Hi Guys,

I am using AMS6 and was wondering if someone could help me out with the correct syntax to get this menu bar action to work correctly.

What I am trying to achieve is to get AMS6 to play nice with cdimage.exe so I can simply make an iso image on the system drive of the users PC, the contents are only a single folder on the DVD.

First line is simply the action for the Menu Bar button

Code:
if e_ID == 201 then
result = File.Run("DATA\\CDIMAGE.EXE", /l"DOCS" ..\DOCS C:\DOCS.ISO,"", SW_SHOWNORMAL, false);
end
Now I know this works perfectly on the command line but adapting it so that AMS6 accepts it is proving hard as I do not have a programming background just know simple dos commandline :(

As you probably guessed the folder I am trying to ISO is <DVD>\DOCS and trying to send this to C:\ but if I could find the right variables would use "/system drive/DOCS.ISO" for overall compatiblity.

I had a quick look and it appears to work correctly using a simple batch file to parse the parameters but was hoping to nut this out and use cdimage with arguements if possible its a cleaner end result

Thanks for your time,
HumptyDumpty.
Reply With Quote
  #2  
Old 09-30-2005
JimS's Avatar
JimS JimS is offline
Forum Member
 
Join Date: May 2003
Location: Pendleton, Oregon
Posts: 911
Remember that backslashes and quotations need to be escaped with backslashes.

For more info, check out the User’s Guide, the chapter called Scripting Guide. Especially Delimiting Statements, and Concatenation.


If exactly this code, works as a batch file:

Code:
"DATA\\CDIMAGE.EXE"  /l"DOCS" ..\DOCS C:\DOCS.ISO

Then I would use this in AMS:

Code:
if e_ID == 201 then
result = File.Run("DATA\\CDIMAGE.EXE", “/l\"DOCS\" ..\\DOCS C:\\DOCS.ISO”,"", SW_SHOWNORMAL, false);
end

Or this:

Code:
if e_ID == 201 then
result = File.Run(_SourceDrive.."\\DATA\\CDIMAGE.EXE", “/l\"DOCS\" ..\\DOCS C:\\DOCS.ISO”,"", SW_SHOWNORMAL, false);
end

Hope that helps.
__________________
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
Visit Acme-Tek
Reply With Quote
  #3  
Old 09-30-2005
HumptyDumpty HumptyDumpty is offline
Forum Member
 
Join Date: Sep 2005
Posts: 8
Hi JimS,

Thanks alot for you comprehensive reply and will look further into it tomrrow as I need to get some rest now

I just did a real quick test and both examples fail with syntax errors

Line=6: unexpected symbol near '"

I will start to read the scripting section of the manual tomorrow and hopefully get something from it

A question also, were you referencing from AMS6 or AMS6, as I've picked up in general reading so far for my cause that scripting has changed quite a bit in the latest verison of AMS.

Thanks again for your reply.

Last edited by HumptyDumpty; 09-30-2005 at 10:57 AM.
Reply With Quote
  #4  
Old 10-01-2005
JimS's Avatar
JimS JimS is offline
Forum Member
 
Join Date: May 2003
Location: Pendleton, Oregon
Posts: 911
I’m not too surprised that it didn’t work. I think that the bat file I started with is malformed. Could you post the exact code you use in the bat file that works? Then show me which parts you want to substitute a variable(s) for.

I have faith that we’ll figure this out.

Actually, the big scripting change for AMS came in changing from version 4 to version 5. The newest version, version 6, uses the same exact scripting engine that version 5 uses. That means any of the version 5 code examples, or other assets, that you find in the forums, can be imported into version 6.

AMS 6 has added new Objects, Actions, and Events. It’s a terrific superset of version 5.
__________________
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
Visit Acme-Tek
Reply With Quote
  #5  
Old 10-01-2005
HumptyDumpty HumptyDumpty is offline
Forum Member
 
Join Date: Sep 2005
Posts: 8
Here is the exact command line required to create a working TEST.ISO with the contents of <CD>\README directory, CDIMAGE.EXE is located in <CD>\DATA\

Code:
CDIMAGE.EXE -lREADME ..\README\ C:\TEST.ISO
Here is information from the help, CDIMAGE.EXE /?

Code:
Usage: CDIMAGE [options] sourceroot targetfile
I only require the Label option, hence using (either "-" or "/" work)

Code:
-l  volume label, no spaces (e.g. -lMYLABEL)
I felt that posting all available parameters wasn't necessary but if you feel that you need them I shall post them for you

Thanks for the information regarding scripting development throughout the versions of AMS.

By the way, now thinking with hindsight I should have just posted with a working commandline in the first place instead of my fumbled example
Reply With Quote
  #6  
Old 10-04-2005
JimS's Avatar
JimS JimS is offline
Forum Member
 
Join Date: May 2003
Location: Pendleton, Oregon
Posts: 911
I’m sorry that I disappeared for a couple of days. A long time friend happened to pass through town, and I got a bit sidetracked.

Try this:

Code:
if e_ID == 201 then
result = File.Run(_SourceDrive.."\\DATA\\CDIMAGE.EXE", "-lREADME ".._SourceDrive.."\\README\\ C:\\TEST.ISO", "", SW_MINIMIZE, false);
end

It worked for me.
__________________
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
Visit Acme-Tek

Last edited by JimS; 10-04-2005 at 05:32 AM.
Reply With Quote
  #7  
Old 10-04-2005
HumptyDumpty HumptyDumpty is offline
Forum Member
 
Join Date: Sep 2005
Posts: 8
Its always good to catch up with old friends, I hope your friendship was revitalised with the passing visit.

Your expertise has come through for me JimS, the process works like a charm using that commandline action and I thank you sincerely for the help

Regards
Humpty-Dumpty
Reply With Quote
  #8  
Old 10-05-2005
JimS's Avatar
JimS JimS is offline
Forum Member
 
Join Date: May 2003
Location: Pendleton, Oregon
Posts: 911
No problem, glad to help, and thanks, I did have a fun visit, lots to catch up on. It was a pleasant surprise.

By the way, welcome to the forums. It’s a pleasure to have the chance to help you out a little, especially because I noticed that within your first couple of posts, you took the time to help another user. That really is the spirit of these forums, members helping members, when they can.
__________________
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
Visit Acme-Tek
Reply With Quote
  #9  
Old 10-05-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Agreed. The real power behind the forum is the stuff you guys contribute.

And of course Desmond's awesome examples...
Reply With Quote
  #10  
Old 10-05-2005
JimS's Avatar
JimS JimS is offline
Forum Member
 
Join Date: May 2003
Location: Pendleton, Oregon
Posts: 911
You have that right Corey. Lately, Desmond has been even more amazing than he normally is. He has really cranked out a ton of super valuable examples lately. Three cheers for Desmond.

Three more cheers for new members that ‘pass it forward’.
__________________
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
Visit Acme-Tek
Reply With Quote
  #11  
Old 10-05-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Yep. Desmond's on fire this month. He's ripping up real estate like some sort of real estate ripping machine. And he's cranking out examples like some sort of example cranking machine. Yeah, I got nothing... Arrrr.

Seriously though, those examples are the bee's knees. I visit other software forums and the one thing I have *never* seen, from big to small, is someone from the host company taking the time to generate and post a substantial batch of decent quality example files purely for the sake of giving people some free resources to learn with. I'm mighty fond of that notion. Mighty fond indeed.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script Editor Pane? rraisley AutoPlay Media Studio 6.0 18 09-23-2005 05:08 AM
How can I know the FS Command name of a movie??? yoske AutoPlay Media Studio 5.0 27 01-01-2005 11:39 PM
Script: Enabling Debug Mode Brett Setup Factory 8.0 Examples 0 09-21-2004 04:32 PM
Your opinions on new Indigo Rose script hosting service??? Corey General Chat 2 02-17-2004 07:05 PM
Acrobat Version Checking Script eric_darling AutoPlay Media Studio 4.0 20 10-03-2003 05:41 PM


All times are GMT -6. The time now is 08:15 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software