Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
DirMPEG
Draw a line with lingo
Runtime Debugging Utilities
Which Keys
Animate Text By Font Size
Play different Movies For Different Game Levels
ActiveX Web controler
Side Scroller
Closing a MIAW
MoonRaker
MediaMacros Xtras Mall
 

 

 

Behavior Generic behavior to create a Shortcut

Added on 1/19/2002

 

Compatibilities:
behavior D6_5 D7 D8 D8_5 PC UK US

Required Xtras:
Desktop Xtra

This item has not yet been rated

Author: Shockdev

This behavior allows to create a Shortcut at Startup, Start Menu, Programs Menu or Desktop

Download PC Source
-- Generic behavior to create a Shortcut at Startup, Start Menu, Programs Menu or Desktop
-- Desktop Xtra 1.0 or later required
-- Compatibilities: Director 6.x, 7.x, 8.x, Windows

property Location, AddInfo, ProgramName, Object, Icon, WrkDirectory

on getPropertyDescriptionList
  set description = [:]
  addProp description, #Location, [#default:"Startup", #format:#string, #comment:"Shortcut location:" & RETURN & "(Startup, StartMenu, Programs, Desktop)"]
  addProp description, #AddInfo, [#default:"", #format:#string, #comment:"AddInfo, if Shortcut location = Programs" & RETURN & "(MyCompanyMyProgram...)"]
  addProp description, #ProgramName, [#default:"MyProgramName", #format:#string, #comment:"Shortcut Name"]
  addProp description, #Object, [#default:"C:Program FilesMyProgramMyProgram.exe", #format:#string, #comment:"Program Path"]
  addProp description, #Icon, [#default:"C:Program FilesMyProgramicon.ico", #format:#string, #comment:"Icon Path"]
  addProp description, #WrkDirectory, [#default:"C:Program FilesMyProgram", #format:#string, #comment:"Working Directory"]
  return description
end

on getBehaviorDescription
  return "            " & ¬
  "- -    Generic Shortcut Behavior    - -" & RETURN & ¬
  "Creates shortcut at:" & RETURN & ¬
  "- Startup group;" & RETURN & ¬
  "- Start Menu;" & RETURN & ¬
  "- Programs Menu;" & RETURN & ¬
  "- Desktop."
end

on mouseDown
  newShortcut
end

on newShortcut
  set Shortcut = [Location, AddInfo, ProgramName]
  set Ok = CreateShortcut(Shortcut)
  if getAt(Ok, 1)=0 then
    SetShortcutParameter(Shortcut, "Object", Object)
    SetShortcutParameter(Shortcut, "Icon", Icon)
    SetShortcutParameter(Shortcut, "WrkDirectory", WrkDirectory)
  else
    -- Error
    alert("Error: " & getAt(Ok, 1) & " - base error code")
  end if
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