Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    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.

  2. #2
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    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

  3. #3
    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 09:57 AM.

  4. #4
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    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

  5. #5
    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

  6. #6
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    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.
    Last edited by JimS; 10-04-2005 at 04:32 AM.
    Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
    Visit Acme-Tek

  7. #7
    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

  8. #8
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    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

  9. #9
    Corey is offline Indigo Rose Staff Alumni
    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...

  10. #10
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    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

  11. #11
    Corey is offline Indigo Rose Staff Alumni
    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.

Similar Threads

  1. Script Editor Pane?
    By rraisley in forum AutoPlay Media Studio 6.0
    Replies: 18
    Last Post: 09-23-2005, 04:08 AM
  2. How can I know the FS Command name of a movie???
    By yoske in forum AutoPlay Media Studio 5.0
    Replies: 27
    Last Post: 01-01-2005, 10:39 PM
  3. Script: Enabling Debug Mode
    By Brett in forum Setup Factory 8.0 Examples
    Replies: 0
    Last Post: 09-21-2004, 03:32 PM
  4. Acrobat Version Checking Script
    By eric_darling in forum AutoPlay Media Studio 4.0
    Replies: 20
    Last Post: 10-03-2003, 04:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts