Indigo Rose Software
  #1  
Old 08-26-2002
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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?
__________________
Unconventional photos and video to conventional media outlets.
www.newsmediasource.com
  #2  
Old 08-26-2002
Derek's Avatar
Derek Derek is online now
Indigo Rose Customer
 
Join Date: May 2001
Location: 51.501296|-2.700963
Posts: 1,205
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]

IR WebHelp: AMS6 SUF7 VP2 TU2
  #3  
Old 08-30-2002
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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!
__________________
Unconventional photos and video to conventional media outlets.
www.newsmediasource.com
  #4  
Old 08-30-2002
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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?
__________________
Unconventional photos and video to conventional media outlets.
www.newsmediasource.com
  #5  
Old 08-30-2002
Derek's Avatar
Derek Derek is online now
Indigo Rose Customer
 
Join Date: May 2001
Location: 51.501296|-2.700963
Posts: 1,205
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]

IR WebHelp: AMS6 SUF7 VP2 TU2
  #6  
Old 08-30-2002
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
Re: PDF

Thanks Derek I'll give it a try!
__________________
Unconventional photos and video to conventional media outlets.
www.newsmediasource.com
  #7  
Old 08-30-2002
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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.
__________________
Unconventional photos and video to conventional media outlets.
www.newsmediasource.com
  #8  
Old 08-30-2002
Derek's Avatar
Derek Derek is online now
Indigo Rose Customer
 
Join Date: May 2001
Location: 51.501296|-2.700963
Posts: 1,205
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]

IR WebHelp: AMS6 SUF7 VP2 TU2
  #9  
Old 08-31-2002
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
Re: PDF

You are the poop buddy! LOL

Thanks

Bruce
__________________
Unconventional photos and video to conventional media outlets.
www.newsmediasource.com
  #10  
Old 09-01-2002
Eric Eric is offline
Forum Member
 
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  
Old 09-02-2002
StandardMan StandardMan is offline
Forum Member
 
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  
Old 09-03-2002
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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
__________________
Unconventional photos and video to conventional media outlets.
www.newsmediasource.com
  #13  
Old 09-04-2002
Derek's Avatar
Derek Derek is online now
Indigo Rose Customer
 
Join Date: May 2001
Location: 51.501296|-2.700963
Posts: 1,205
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]

IR WebHelp: AMS6 SUF7 VP2 TU2
  #14  
Old 10-01-2002
nagad
Guest
 
Posts: n/a
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  
Old 10-02-2002
Bruce's Avatar
Bruce Bruce is offline
Indigo Rose Customer
 
Join Date: Jun 2001
Location: California
Posts: 1,769
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>
__________________
Unconventional photos and video to conventional media outlets.
www.newsmediasource.com
 

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



All times are GMT -6. The time now is 04:50 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