Loading ...
Sorry, an error occurred while loading the content.
 

Other ideas for handling ^!Delay problems

Expand Messages
  • Lawrence M Hamilton, Jr.
    Hey Clippers! I am having a problem with the following code (from my Get & Dial Dun clip): ^!ClearVariables ^!Set %TempFile%=^$GetTmpPath$afile.txt ;Give the
    Message 1 of 5 , May 4 6:51 PM
      Hey Clippers!

      I am having a problem with the following code (from my Get & Dial Dun
      clip):

      ^!ClearVariables
      ^!Set %TempFile%=^$GetTmpPath$afile.txt
      ;Give the system time to create the file:
      ;^!Delay 55
      ^!regedit /e ^%TempFile% HKEY_CURRENT_USER\RemoteAccess\Addresses

      I started with a small delay and have increased it to what I have above.
      The first time I run the clip I always get an error. The second time I
      run it it always works. Later in the clip, the file is deleted, so the
      next time I run it, after a successful run, I get an error. The message
      is: "Cannot open file: Windows\Temp\afile.txt."

      I have also tried:

      ^!ClearVariables
      ^!Set %TempFile%=^$GetTmpPath$afile.txt
      ^!IfFileExist "^%TempFile%" NEXT SKIP_-1
      ^!regedit /e ^%TempFile% HKEY_CURRENT_USER\RemoteAccess\Addresses

      Note: the "/e" is a regedit command for export, meaning export to
      afile.txt the given key.

      I also get the same error here, but if I check in the Windows\Temp
      directory, the file is indeed there.

      Any ideas? It must be an issue with the length of the DELAY command.

      Are there any other tricks I could try?

      THANKS!

      Larry Hamilton, Jr. lmhamilton@...
      Hamilton National Genealogical Society, Inc.
      http://www.HamiltonGenSociety.org/
      My Web Site: http://notlimaH.tripod.com
    • Jody
      Hi Lawrence, ... I would put you ^!IfFileExist here. Try this: ^!Delay 5 ^!IfFileExist ^%TempFile% NEXT else SKIP_-1 ^!Delay 10 You had Else missing, but I
      Message 2 of 5 , May 4 8:02 PM
        Hi Lawrence,

        > ^!ClearVariables
        > ^!Set %TempFile%=^$GetTmpPath$afile.txt
        > ;Give the system time to create the file:
        > ;^!Delay 55
        > ^!regedit /e ^%TempFile% HKEY_CURRENT_USER\RemoteAccess\Addresses

        I would put you ^!IfFileExist here. Try this:

        ^!Delay 5
        ^!IfFileExist "^%TempFile%" NEXT else SKIP_-1
        ^!Delay 10

        You had Else missing, but I assume that was a typo in the post.

        I have a similar problem when trying to run Ws_Ftp back to back
        with WinZip via a Clip. It appears WinZip collapses its window
        before the file has completed getting zipped and the result is I
        end up uploading a partial zip file. Weird. Seems like Ws_Ftp
        would err while the file is being built, but it doesn't - just
        uploads what is there at the time it is ready. I don't know if
        your situation is similar, but you might try the type of delay I
        have above. I also run into the problem with my I_View Clip
        sometimes.

        Happy Clip'n!
        Jody

        http://www.sureword.com/notetab

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@...
        mailto:Ntb-Clips-UnSubscribe@...
        http://www.egroups.com/list/ntb-clips
      • Lawrence M Hamilton, Jr.
        Hi Jody, ... Of course! ... I tried it and it just seemed to be in a loop. I increased the first ^!Delay to 15. I have not had time to just let it sit and
        Message 3 of 5 , May 4 9:08 PM
          Hi Jody,

          On Thu, 04 May 2000 22:02:51 -0500 Jody <KJB1611@...> writes:
          > I would put you ^!IfFileExist here. Try this:
          >
          > ^!Delay 5
          > ^!IfFileExist "^%TempFile%" NEXT else SKIP_-1
          > ^!Delay 10
          >
          > You had Else missing, but I assume that was a typo in the post.

          Of course! <g>

          > I have a similar problem when trying to run Ws_Ftp back to back
          > with WinZip via a Clip. It appears WinZip collapses its window
          > before the file has completed getting zipped and the result is I
          > end up uploading a partial zip file. Weird.

          I tried it and it just seemed to be in a loop. I increased the first
          ^!Delay to 15. I have not had time to just let it sit and run, but I
          wonder if there is something else to it. I am running the beta #1, but
          this seems like what it did before.

          I'll keep trying.

          THANKS!

          Larry Hamilton, Jr. lmhamilton@...
          Hamilton National Genealogical Society, Inc.
          http://www.HamiltonGenSociety.org/
          My Web Site: http://notlimaH.tripod.com

          ________________________________________________________________
          YOU'RE PAYING TOO MUCH FOR THE INTERNET!
          Juno now offers FREE Internet Access!
          Try it today - there's no risk! For your FREE software, visit:
          http://dl.www.juno.com/get/tagj.
        • Jody
          Hi Lawrence, ... If it just loops then it is not finding it. Try hard coding the path and also see what the file attributes are. Happy Clip n! Jody
          Message 4 of 5 , May 4 9:22 PM
            Hi Lawrence,

            >> ^!Delay 5
            >> ^!IfFileExist "^%TempFile%" NEXT else SKIP_-1
            >> ^!Delay 10

            > I tried it and it just seemed to be in a loop. I increased the
            > first ^!Delay to 15. I have not had time to just let it sit and
            > run, but I wonder if there is something else to it. I am
            > running the beta #1, but this seems like what it did before.

            If it just loops then it is not finding it. Try hard coding the
            path and also see what the file attributes are.

            Happy Clip'n!
            Jody

            http://www.sureword.com/notetab

            Subscribe, UnSubscribe, Options
            mailto:Ntb-Clips-Subscribe@...
            mailto:Ntb-Clips-UnSubscribe@...
            http://www.egroups.com/list/ntb-clips
          • Lawrence M Hamilton, Jr.
            Hi Jody, ... I finally found out the problem! I kept using the ^!SetDebug On so I could see what was happening. It kept failing when it got to the ^!regedit
            Message 5 of 5 , May 5 6:05 AM
              Hi Jody,

              On Thu, 04 May 2000 23:22:10 -0500 Jody <KJB1611@...> writes:
              > Hi Lawrence,
              >
              > >> ^!Delay 5
              > >> ^!IfFileExist "^%TempFile%" NEXT else SKIP_-1
              > >> ^!Delay 10
              >
              > > I tried it and it just seemed to be in a loop. I increased the
              > > first ^!Delay to 15. I have not had time to just let it sit and
              > > run, but I wonder if there is something else to it. I am
              > > running the beta #1, but this seems like what it did before.
              >
              > If it just loops then it is not finding it. Try hard coding the
              > path and also see what the file attributes are.

              I finally found out the problem! I kept using the ^!SetDebug On so I
              could see what was happening. It kept failing when it got to the
              ^!regedit command. I added a ^!Wait command and that fixed it.

              So anybody using my Get & Dial Dun clip will need to add a ^!Wait after
              the Regedit line, if they are having problems with it.

              I will get aroung to updating it on my web site sometime.....

              Larry Hamilton, Jr. lmhamilton@...
              Hamilton National Genealogical Society, Inc.
              http://www.HamiltonGenSociety.org/
              My Web Site: http://notlimaH.tripod.com

              ________________________________________________________________
              YOU'RE PAYING TOO MUCH FOR THE INTERNET!
              Juno now offers FREE Internet Access!
              Try it today - there's no risk! For your FREE software, visit:
              http://dl.www.juno.com/get/tagj.
            Your message has been successfully submitted and would be delivered to recipients shortly.