[OT] Borrowing Your Words - Startup Script

Chipp Walters chipp at chipp.com
Wed Oct 22 17:16:59 EDT 2003


Dan,

This is a very good idea. In fact, Ken Ray already has a great bunch of tips
gleaned from this list over the years at his <www.sonsothunder.com> website.
There are also a couple at my runrev site:
<http://www.altuit.com/webs/altuit2/RunRev/default.htm>

Here's a tip you may want to start with :-)

If you would like to make your Custom RR App run on startup in Windows, just
create a checkbox "Run on Startup" somewhere on your app. Set the script to:

on mouseUp
  SetAppToStartup the hilite of me,the effective filename of me,"myAppName"
end mouseUp

on SetAppToStartup pFlag,pAppFilePath,pAliasName
  put specialFolderPath("Start") into tStartPath
  put pAliasName & ".lnk" into pAliasName
  put tStartPath & "/" & pAliasName into tAliasFilePath
  if pFlag is true then
    if there is not a file tAliasFilePath then
       create alias tAliasFilePath to file pAppFilePath
    end if
  else
     if there is a file tAliasFilePath then
       delete file tAliasFilePath
    end if
  end if
end SetAppToStartup


best,

Chipp



More information about the Use-livecode mailing list