Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 18

Thread: PDF

  1. #1
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Grin PDF

    I have a project that has 31 PDF files. I have a List Box Oject and under it's properties/on Selection Changed I have:

    %SlectedIndex%=ListBoxObject[Lessions].GetSelected
    %ItemData% = ListBoxObject[Lessions].GetItemData (%SelectedIndex%)
    File.Open (open, "%ItemData%")

    How would I use the AcroRd32.exe that would be on the CD to view my PDFs with out the end user needing to load Acrobat on to their system?

  2. #2
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244

    Re: PDF

    Hi Bruce -

    Here's what yu need:

    You gotta add extra info into the %ItemData% The problem this causes, is the extra info gets 'used' as part of the 'execution'
    So, the first part of %ItemData% is gonna be the address of the AcroRd32.exe file followed by the address of the pdf file
    For now, we're gonna make it all one long line:

    Item 1::%address%\AcroRd32.exe^%address%\filename.pdf

    The reason for ^ in the middle is to seperate the two parts. You can't put another :: in there coz %ItemData% is supposed to fall between :: and :: OR :: and ;; (if that makes sense) so it stops when it gets to the second ::

    With all of it included in %ItemData% we can now break it up into two parts and get each part seperately for the execution. Before we can do this, however, we need a common delimiter so we gotta change ^ back to :: (this is allowed now because since we have already got %ItemData% we can play around with it) so to change it we use:

    %NewString%=String.Replace (changing ^ for :

    <font color=green>
    <IR_ACTIONS_LIST>
    <Action name="Replace">
    <Type>60</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%NewString%</Variable>
    <SearchIn>%ItemData%</SearchIn>
    <SearchFor>^</SearchFor>
    <ReplaceWith>::</ReplaceWith>
    <CaseSensitive>1</CaseSensitive>
    </Action>
    </IR_ACTIONS_LIST>
    </font color=green>

    Now we need to pull out the first part using:

    %NewString2%=String.GetDelimitedString[%NewString% , :: , 0]

    <font color=green>
    <IR_ACTIONS_LIST>
    <Action name="Get Delimited String">
    <Type>64</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%NewString2%</Variable>
    <Source>%NewString%</Source>
    <Delimiter>::</Delimiter>
    <ItemIndex>0</ItemIndex>
    </Action>
    </IR_ACTIONS_LIST>
    </font color=green>

    Then the second part:

    %NewString3%=String.GetDelimitedString[%NewString% , :: , 1]

    <font color=green>
    <IR_ACTIONS_LIST>
    <Action name="Get Delimited String">
    <Type>64</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%NewString3%</Variable>
    <Source>%NewString%</Source>
    <Delimiter>::</Delimiter>
    <ItemIndex>1</ItemIndex>
    </Action>
    </IR_ACTIONS_LIST>
    </font color=green>

    And then execute the file using:

    File.Execute[%NewString2% , %NewString3%]

    <font color=green>
    <IR_ACTIONS_LIST>
    <Action name="Execute">
    <Type>8</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <FileName>%NewString2%</FileName>
    <CommandLine>%NewString3%</CommandLine>
    <WorkingDir/>
    <RunMode>0</RunMode>
    <WaitForReturn>0</WaitForReturn>
    </Action>
    </IR_ACTIONS_LIST>
    </font color=green>
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  3. #3
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Re: PDF

    Ok, I'll try that out thanks...What if I only had one PDF and did not have a List Box just a button to view the PDF. BTW I would still want to use the Acrobat.exe that was on the CD.

    Thaks my man!

  4. #4
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Re: PDF

    Hey Derek-
    I'm really lost here, when you say: "we're gonna make it all one long line:"
    Are you saying:
    Item 1::%address%\AcroRd32.exe^%address%\filename.pdf and %NewString%=String.Replace
    and %NewString2%=String.GetDelimitedString[%NewString% , :: , 0]
    and %NewString3%=String.GetDelimitedString[%NewString% , :: , 1]
    and File.Execute[%NewString2% , %NewString3%] all go together???
    My %ItemData% line looks like this:
    01 The Nature of God::%SrcDir%\Lessions\01 The Nature of God.pdf thirty one times over (different pdfs). Do I need to put your corrections in 31 times?

  5. #5
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244

    Re: PDF

    Hey Bruce - it can get a little confusing, I know. I tried to keep it in some sort of clear oder by having the seperate actions in bold with all info in normal formatting. All the green text is actions yu can copy and paste straight into AMS in appropriate places. You may need to go into it then and adjust it to suit - like the %address%

    Have a go at pasting in the Actions in AMS to see how it's working out. I guess if yu have 31 in yur list box ... then yur gonna have to make the changes 31 times (one of the downsides to changing yur mind half way thru [img]/ubbthreads/images/icons/frown.gif[/img]).

    You can load the list from a text file at runtime with a few adjustments:

    this post may give yu some idea of how to set that up [img]/ubbthreads/images/icons/smile.gif[/img]
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  6. #6
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Re: PDF

    Thanks Derek I'll give it a try!

  7. #7
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Re: PDF

    What if I only had one PDF and did not have a List Box just a button to view the PDF. BTW I would still want to use the Acrobat.exe that was on the CD.

  8. #8
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244

    Re: PDF

    Then on MouseClick yu could use File.Execute pointing to the AcroRd32.exe and have the address of the pdf file as the argument
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  9. #9
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Re: PDF

    You are the poop buddy! LOL

    Thanks

    Bruce

  10. #10
    Join Date
    Aug 2002
    Location
    Silicon Valley, USA
    Posts
    31

    Re: PDF

    RE:
    Then on MouseClick yu could use File.Execute pointing to the AcroRd32.exe and have the address of the pdf file as the argument
    ----------------------------------------------------------

    Hey Derek:

    Thanks...this just gave me an idea for dealing with a Flash Projector .exe file :-) I assume the same action would work.

    Eric

  11. #11
    Join Date
    Aug 2002
    Posts
    5

    Re: PDF

    I do wish the "help" section of AMS4.0 was more robust. It is very topical in content.

    Is there anyway to get better documentation on this application with more examples (preferable with screenshots)?

    Thank you in advance

  12. #12
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Re: PDF

    Derek- OH MY GOD! WHAT A PITA! I'm just not getting it!!! First it might help to understand... What type of programming is this???? Shed your all knowing light on this will ya? LOL.

    Ok I feel better, here is one of the 31 PDFs I have in my "list" how should it read if I'm using the Reader\AcroRd.exe on the CD?

    01 The Nature of God::%SrcDir%\Lessions\01 The Nature of God.pdf

    IndigoRose... we REALLY need to gear something toward the true beginner this can't be another 3.0.

    Luv-in you!

    Oh, thanks Derek!

    Bruce

  13. #13
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244

    Re: PDF

    Export the page with the list box to a PG4 file and attach it to a post (just the page ... dont need any other files). I'll take a look at it. (Or email it to me if you don't want to post it in public.)
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  14. #14
    nagad Guest

    Grin putting AcroRd32.exe on a CD

    Hi, Bruce

    I was reading about list box object when I saw what you wrote about the AcroRd32.exe being on a CD. Can you, please explain how you put this program on a CD without installing it. I tried to see if this is possible by copying the AcroRd32.exe to a different folder and drive, and run it from there. I did opened, but without "file", "edit", "document", "tools", etc. This question has nothing to do with your question about PDF and AMS4. I am just curious. Thank you.

  15. #15
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Re: putting AcroRd32.exe on a CD

    Hey nagad-
    Sure! You place a folder called Acrobat with all your Acrobat files in it. The AcroRd32.exe must be in the Acrobat folder not in any other folder that resides within the Acrobat folder. LOL does that make sence? Ok… now add this to your list box’s actions (assuming that your files are in a file called Lessons). I didn't write this but Derek did. Very, very kind of him don't you think? Give it a try.

    <IR_ACTIONS_LIST>
    <Action name="Get Selected">
    <Type>126</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <TargetListBox>Lessions</TargetListBox>
    <Variable>%SelectedIndex%</Variable>
    <VariableDelimiter>;;</VariableDelimiter>
    </Action>
    <Action name="Get Item Data">
    <Type>121</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <TargetListBox>Lessions</TargetListBox>
    <Index>%SelectedIndex%</Index>
    <Variable>%ItemData%</Variable>
    </Action>
    <Action name="Replace">
    <Type>60</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%NewString%</Variable>
    <SearchIn>%ItemData%</SearchIn>
    <SearchFor>^</SearchFor>
    <ReplaceWith>::</ReplaceWith>
    <CaseSensitive>1</CaseSensitive>
    </Action>
    <Action name="Get Delimited String">
    <Type>64</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%NewString2%</Variable>
    <Source>%NewString%</Source>
    <Delimiter>::</Delimiter>
    <ItemIndex>0</ItemIndex>
    </Action>
    <Action name="Get Delimited String">
    <Type>64</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%NewString3%</Variable>
    <Source>%NewString%</Source>
    <Delimiter>::</Delimiter>
    <ItemIndex>1</ItemIndex>
    </Action>
    <Action name="Execute">
    <Type>8</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <FileName>%NewString2%</FileName>
    <CommandLine>%NewString3%</CommandLine>
    <WorkingDir/>
    <RunMode>0</RunMode>
    <WaitForReturn>0</WaitForReturn>
    </Action>
    </IR_ACTIONS_LIST>

Page 1 of 2 1 2 LastLast

Posting Permissions

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