Copying text from a text file:

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Copying text from a text file:

    Let's say that I want the end user, while installing any software from a CD made with APMS, when the end user comes to a dialog box, asking him to write a serial number or license number, whatever, all he needs to do is paste.
    What I mean is that while clicking on a button, the serial number (which is written in a text file already placed in the CD) will be copied to the clipboard, and after installing the software from the CD, all the end user needs to do is pasting
    the serial or whatever.
    Thanks ti anyone who can help here.
  • Lorne
    Indigo Rose Staff Member
    • Feb 2001
    • 2729

    #2
    Re: Copying text from a text file:

    Um, if it's all going to be done automatically for them, why even bother asking for a serial number?

    Kind of pointless if you ask me. [img]/ubbthreads/images/icons/smile.gif[/img]
    --[[ Indigo Rose Software Developer ]]

    Comment


    • #3
      Re: Copying text from a text file:

      Thanks for the quick answer.
      Anyway, is there the option to copy a certain line text from a file text. Not copy into variable.
      Thanks again.

      Comment

      • Lorne
        Indigo Rose Staff Member
        • Feb 2001
        • 2729

        #4
        Re: Copying text from a text file:

        No, you can't copy items into the clipboard, except by using a custom DLL, or perhaps a bit of fancy javascript in a dynamically generated HTML file loaded into a Web Browser Object.

        Pretty much anything is possible in AutoPlay...some things, however, are easier than others. [img]/ubbthreads/images/icons/wink.gif[/img]
        --[[ Indigo Rose Software Developer ]]

        Comment

        • Brett
          Indigo Rose Staff Member
          • Jan 2000
          • 2001

          #5
          Re: Copying text from a text file:

          I actually created a DLL for Derek here on the forums a while ago that can copy text to and from AMS40. Click here to see the topic.

          Comment

          • Lorne
            Indigo Rose Staff Member
            • Feb 2001
            • 2729

            #6
            Re: Copying text from a text file:

            Ah, right! How could I forget that. [img]/ubbthreads/images/icons/smile.gif[/img]
            --[[ Indigo Rose Software Developer ]]

            Comment

            • Corey
              Indigo Rose Staff Alumni
              • Aug 2002
              • 9745

              #7
              Re: Copying text from a text file:

              Cool dll remind me to post that in our utilities section once I get the AMS site up...

              Corey Milner
              Creative Director, Indigo Rose Software

              Comment


              • #8
                Re: Copying text from a text file:

                Hi, Brett
                I read What you wrote, downloaded the Dll and the the project you build. Now, when I preview the project you build, it works fine. Now, here is what I did and a question:
                In the page I added an edit field object, in which I wrote a number. Below this edit field I added a text object. I looked carefully at your project and did exactly what you did. Here it is:
                <IR_ACTIONS_LIST>
                <Action name="Get Text">
                <Type>78</Type>
                <Function>0</Function>
                <DTIndentLevel>0</DTIndentLevel>
                <Enabled>1</Enabled>
                <ErrorHandling>
                <UserNotificationMode>2</UserNotificationMode>
                <CustomErrorMessage/>
                <OnErrorAction>0</OnErrorAction>
                <JumpToLabel/>
                </ErrorHandling>
                <Variable>%ObjectText%</Variable>
                <ObjectName>txtToClipboard</ObjectName>
                </Action>
                <Action name="Call DLL Function">
                <Type>143</Type>
                <Function>0</Function>
                <DTIndentLevel>0</DTIndentLevel>
                <Enabled>1</Enabled>
                <ErrorHandling>
                <UserNotificationMode>2</UserNotificationMode>
                <CustomErrorMessage/>
                <OnErrorAction>0</OnErrorAction>
                <JumpToLabel/>
                </ErrorHandling>
                <FileName>%SrcDir%\Distribution\IRClipboardFunctio ns.dll</FileName>
                <FunctionName>CopyTextToClipboard</FunctionName>
                <FunctionParameters>%ObjectText%</FunctionParameters>
                <ReturnType>0</ReturnType>
                <CallingConvention>0</CallingConvention>
                <Variable>%ResultOfCall%</Variable>
                </Action>
                <Action name="IF">
                <Type>200</Type>
                <Function>1</Function>
                <DTIndentLevel>0</DTIndentLevel>
                <Enabled>1</Enabled>
                <ErrorHandling>
                <UserNotificationMode>2</UserNotificationMode>
                <CustomErrorMessage/>
                <OnErrorAction>0</OnErrorAction>
                <JumpToLabel/>
                </ErrorHandling>
                <Condition>%ResultOfCall% = 0</Condition>
                </Action>
                <Action name="Message Box">
                <Type>5</Type>
                <Function>0</Function>
                <DTIndentLevel>1</DTIndentLevel>
                <Enabled>1</Enabled>
                <ErrorHandling>
                <UserNotificationMode>2</UserNotificationMode>
                <CustomErrorMessage/>
                <OnErrorAction>0</OnErrorAction>
                <JumpToLabel/>
                </ErrorHandling>
                <DialogTitle>Failed</DialogTitle>
                <DialogMessage>The text could not be put on the clipboard!</DialogMessage>
                <Icon>2</Icon>
                <Variable>%Result%</Variable>
                <DialogType>0</DialogType>
                <DefaultButton>0</DefaultButton>
                </Action>
                <Action name="END IF">
                <Type>201</Type>
                <Function>1</Function>
                <DTIndentLevel>0</DTIndentLevel>
                <Enabled>1</Enabled>
                <ErrorHandling>
                <UserNotificationMode>2</UserNotificationMode>
                <CustomErrorMessage/>
                <OnErrorAction>0</OnErrorAction>
                <JumpToLabel/>
                </ErrorHandling>
                </Action>
                </IR_ACTIONS_LIST>
                Now my question is:
                When I preview the project, why after clicking on the text object below the edit field object nothing happens, and the preview window closes, and this is odd. All I want to do is, when the end user clicks on the text object the number I wrote in the edit field object will be copied to the clipboard. What I am doing wrong? can you, please, help me with that. Thanks

                Comment

                • Lorne
                  Indigo Rose Staff Member
                  • Feb 2001
                  • 2729

                  #9
                  Re: Copying text from a text file:

                  Not sure if this is the problem, but I notice that your path to the dll is:

                  %SrcDir%\Distribution\IRClipboardFunctions.dll

                  Do you actually have a Distribution subfolder in the folder where your autorun.exe is running from? 'Cause normally it's running from the Distribution folder when you're testing.

                  i.e. do you really have a path like:

                  Distribution\Distribution\IRClipboardFunctions.dll

                  ?
                  --[[ Indigo Rose Software Developer ]]

                  Comment


                  • #10
                    Re: Copying text from a text file:

                    Hi, Lorne

                    Yes, I really have the path you mentioned.

                    you see, what I really need is the second option of this Dll, I mean - copy the text I wrote in the edit field object to the clipboard. and something else that I don't understand is: Why when testing the project, when clicking the objcect (i.e - TextObject) that it's action is to copy the text in the edit field, the preview window shuts down? Can you help me with that?
                    Thanks.

                    Comment


                    • #11
                      Re: Copying text from a text file:

                      hi, Lorne

                      Again with the question I already asked you:
                      (Yes, I really have the path you mentioned.

                      you see, what I really need is the second option of this Dll, I mean - copy the text I wrote in the edit field object to the clipboard. and something else that I don't understand is: Why when testing the project, when clicking the objcect (i.e - TextObject) that it's action is to copy the text in the edit field, the preview window shuts down? Can you help me with that?
                      Thanks.)
                      I realy need help with this, and I hope I'm not nagging you.

                      Comment


                      • #12
                        Re: Copying text from a text file:

                        Hi, Brett

                        can you, please help me with that?

                        I read What you wrote, downloaded the Dll and the the project you build. Now, when I preview the project you build, it works fine. Now, here is what I did and a question:
                        In the page I added an edit field object, in which I wrote a number. Below this edit field I added a text object. I looked carefully at your project and did exactly what you did. Here it is:
                        <IR_ACTIONS_LIST>
                        <Action name="Get Text">
                        <Type>78</Type>
                        <Function>0</Function>
                        <DTIndentLevel>0</DTIndentLevel>
                        <Enabled>1</Enabled>
                        <ErrorHandling>
                        <UserNotificationMode>2</UserNotificationMode>
                        <CustomErrorMessage/>
                        <OnErrorAction>0</OnErrorAction>
                        <JumpToLabel/>
                        </ErrorHandling>
                        <Variable>%ObjectText%</Variable>
                        <ObjectName>txtToClipboard</ObjectName>
                        </Action>
                        <Action name="Call DLL Function">
                        <Type>143</Type>
                        <Function>0</Function>
                        <DTIndentLevel>0</DTIndentLevel>
                        <Enabled>1</Enabled>
                        <ErrorHandling>
                        <UserNotificationMode>2</UserNotificationMode>
                        <CustomErrorMessage/>
                        <OnErrorAction>0</OnErrorAction>
                        <JumpToLabel/>
                        </ErrorHandling>
                        <FileName>%SrcDir%\Distribution\IRClipboardFunctio ns.dll</FileName>
                        <FunctionName>CopyTextToClipboard</FunctionName>
                        <FunctionParameters>%ObjectText%</FunctionParameters>
                        <ReturnType>0</ReturnType>
                        <CallingConvention>0</CallingConvention>
                        <Variable>%ResultOfCall%</Variable>
                        </Action>
                        <Action name="IF">
                        <Type>200</Type>
                        <Function>1</Function>
                        <DTIndentLevel>0</DTIndentLevel>
                        <Enabled>1</Enabled>
                        <ErrorHandling>
                        <UserNotificationMode>2</UserNotificationMode>
                        <CustomErrorMessage/>
                        <OnErrorAction>0</OnErrorAction>
                        <JumpToLabel/>
                        </ErrorHandling>
                        <Condition>%ResultOfCall% = 0</Condition>
                        </Action>
                        <Action name="Message Box">
                        <Type>5</Type>
                        <Function>0</Function>
                        <DTIndentLevel>1</DTIndentLevel>
                        <Enabled>1</Enabled>
                        <ErrorHandling>
                        <UserNotificationMode>2</UserNotificationMode>
                        <CustomErrorMessage/>
                        <OnErrorAction>0</OnErrorAction>
                        <JumpToLabel/>
                        </ErrorHandling>
                        <DialogTitle>Failed</DialogTitle>
                        <DialogMessage>The text could not be put on the clipboard!</DialogMessage>
                        <Icon>2</Icon>
                        <Variable>%Result%</Variable>
                        <DialogType>0</DialogType>
                        <DefaultButton>0</DefaultButton>
                        </Action>
                        <Action name="END IF">
                        <Type>201</Type>
                        <Function>1</Function>
                        <DTIndentLevel>0</DTIndentLevel>
                        <Enabled>1</Enabled>
                        <ErrorHandling>
                        <UserNotificationMode>2</UserNotificationMode>
                        <CustomErrorMessage/>
                        <OnErrorAction>0</OnErrorAction>
                        <JumpToLabel/>
                        </ErrorHandling>
                        </Action>
                        </IR_ACTIONS_LIST>
                        Now my question is:
                        When I preview the project, why after clicking on the text object below the edit field object nothing happens, and the preview window shuts down. All I want to do is, when the end user clicks on the text object, the number I wrote in the edit field object will be copied to the clipboard. What I am doing wrong? I mean, that what I need is the second function of this dll (copy text from edit field object to the clipboard).
                        When I make a preview from your project "10644-ClipboardTestDLL", everything works fine. But in my project I can't copy the text from the edit field object, and as I mentioned, when I click (in the preview window) on the text object that it's action is to call the dll and to copy the text, the preview window shuts down. Can you, please help me with that. Hope I don't bother you. Thanks

                        Comment

                        • Lorne
                          Indigo Rose Staff Member
                          • Feb 2001
                          • 2729

                          #13
                          Re: Copying text from a text file:

                          There doesn't seem to be anything wrong with those actions at all. It's probably something else entirely. Do you have any other objects that might be overlapping the text object? Do you have any other actions assigned to other events?
                          --[[ Indigo Rose Software Developer ]]

                          Comment


                          • #14
                            Re: Copying text from a text file:

                            You are the man Lorne

                            I checked what you said, "about other objects that might be overlapping the text object", and I got it. Now it works exactly the way I want it to work. Thanks, Thanks, Thanks.
                            Now I can go and purchase the software. Not that this was depend only on this function, but seriously, for my projects reasons, this function is very important to me.

                            Comment

                            Working...
                            X