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

19722RE: [Clip] Showing messages

Expand Messages
  • John Shotsky
    Sep 29 10:13 AM
      Oh, and by the way ftp.exe exists in Windows 7 and Vista.

      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of John Shotsky
      Sent: Tuesday, September 29, 2009 10:02
      To: ntb-clips@yahoogroups.com
      Subject: RE: [Clip] Showing messages

      Thanks, Lotta,

      That sounds perfect. I'll play around with it to see if I can get exactly what I want.

      From: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> [mailto:ntb-clips@yahoogroups.com
      <mailto:ntb-clips%40yahoogroups.com> ] On Behalf Of loro
      Sent: Tuesday, September 29, 2009 09:05
      To: ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com>
      Subject: RE: [Clip] Showing messages

      John Shotsky wrote:
      >I've written several .hta files now, and they are working out just fine.
      >However, sometimes a user will not have downloaded one of the files,
      >so I'd like to create a message with a link to my
      >FTP site so they can download the missing files. This would only be
      >invoked if the subject .hta file was not present on
      >the user's computer in the designated folder (Notetab's
      >Libraries\Info folder). If possible, I'd further like it to
      >automatically log into the FTP site so they can just click on the
      >appropriate file, or even automatically send the FTP
      >site the correct command to download the appropriate
      >file. Anonymous FTP is not supported on my site to keep looky-loos
      >out, so a user name and password need to be sent to the site. If
      >login is not possible, I'll just include the username
      >and password in the message.

      It seems ^!IfError works with ^!Shell, so that's a starting point.
      Just to demonstrate..

      ^!Shell bla.exe
      ^!IfError next else end
      ^!Info ERROR!

      You'll get the Windows error first and when that's clicked away the
      info box will pop up. If you replace 'bla.exe. with a program that
      does exist, for example 'calc.exe', you'll see that the info box does
      not show up.

      One way to go would be to use ^!Continue (in place of the info box above).

      ^!Continue An info file is missing. Do you want to download it now?

      There's a command line utility called ftp.exe present on all Windows
      system. To be honest, I don't really *know* if it's there on Vista,
      but I hope so. Notetab can work with that.

      If you use the -s flag in the command line, ftp.exe will read
      commands from an external file. Notetab has a directory called
      Scripts with some sample files with the .scr extension that contain
      FTP instructions. I don't think it's necessary to use either that
      location or extension, but I've kept doing so.

      This is what one of my scr files for downloading a certain file looks like.
      open ftp.example.com
      lcd C:\...
      cd some_directory_on_server
      get your_file.hta

      'ftp.example.com', 'user' and 'password' should be replaced with the obvious.
      LCD - here you specify the local directory you want the file to be
      downloaded to. Note, it must be a DOS path, shortname or what's it
      called, this kind of stuff: C:\NOTETA~1\DOCUME~1\
      CD - change directory on the server. You must go to the right
      directory first, then...
      GET - download the specified file

      Then you run it from Notetab like so:
      h="Get HTA from FTP"
      ; Here you enter the DOS path to your -src file
      ^!Set %script%=C:\NOTETA~1\Scripts\FTP_FE~1.SCR

      ^!ShellWait C:\WINNT\System32\FTP.exe -s:^%script%
      ^!Shell C:\Path\To\Where\You\Have\The\whatever.hta

      ^!ShellWait works like ^!Shell, but it halts clip execution until the
      program it runs (ftp.exe) has finished what it's doing. I use this
      because I want to open (run, in this case) the file after it's
      downloaded and don't want to do it prematurely.

      So, combine the above, mix and stir and you are all set. Have fun! :-)


      [Non-text portions of this message have been removed]

      [Non-text portions of this message have been removed]
    • Show all 15 messages in this topic