Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Confine Effect ot Mouse Over-Alphamania
SiteSearch Indexer
File Save Button
Follow the leader
Doutone-Alphamania
Toggle ButtonsEnabled Property of a Flash Sprite
FileFlex
Free Sounds
PrintF in Lingo
Amara Flash News Ticker
MediaMacros Xtras Mall
 

 

 

Behavior Create File Association

Added on 9/16/1999

 

Compatibilities:
D6_5 D7 D8 PC Script

Required Xtras:
Buddy API

This item has not yet been rated

Author: MediaMacros (website)

Associates the projector to a filetype. The other scripts allow the movie to test if they were opened with teh save file, and reads and writes the save data.

--Code by Chuck Neal
--Chuck@mediamacros.coc

on createSaveAssociation  Extension, ProgramPath, FileType, Description
  set shortFileName = baShortFileName(ProgramPath)
  baWriteIni( "Extensions", Extension, shortFileName && "^." & Extension, "win.ini" )
  baSendMsg( 65535, 26, 0, 0, true )
  if the number of chars in Extension <= 3 then    
    baWriteRegString("." & Extension, "", FileType, "HKEY_CLASSES_ROOT" )
    baWriteRegString( FileType & "ShellOpenCommand", "", shortFileName && "%1", "HKEY_CLASSES_ROOT" )
    baWriteRegString( FileType, "", Description, "HKEY_CLASSES_ROOT" )
  end if
end

on checkFileOpen keyList, key
  set fileName = baCommandArgs( )
  set partFile = char 2 to the number of chars in filename of filename
  set driveLetter = baFindDrive( "a", partFile )
  if fileName <> "" then
    set stringList = getFileData (driveLetter & fileName, keyList, key)
    return stringList
  else
    return void
  end if  
end

on saveFile fileName, keyList, valueList, extension, key
  repeat with x = 1 to count(keyList)
    baWriteIni("SaveData", getAt(keyList, x), baEncryptText(getAt(valueList,x), key), fileName & extension)
  end repeat
end

on getFileData whatFile, keyList, key
  set valueList = []
  repeat with x = 1 to count(keyList)
    set value = baDecryptText(baReadIni( "SaveData",  getAt(keyList, x), "Error", whatFile),key)
    add valueList, value
  end repeat
  return valueList
end




 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail