source: branches/v2.9/slide-show/creatobj.CMD@ 222

Last change on this file since 222 was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

File size: 934 bytes
Line 
1/* */
2 call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
3 call SysLoadFuncs
4
5
6parse source . . sourceFile
7
8thedir=FILESPEC('drive', sourcefile)||FILESPEC('path', sourcefile)
9theDir=LEFT(theDir,LENGTH(theDir)-1)
10
11globalData._languagefile=theDir"\lang\lang.ini"
12theLang=getLanguage(globalData._languageFile)
13theTitle=SysIni(globalData._languagefile, thelang, "wpsobject")
14IF theTitle="ERROR:" THEN theTitle="Slide Show"
15rc=SysCreateObject("WPProgram", theTitle, "<WP_DESKTOP>", "EXENAME="||theDir||"\slide-show.exe;OBJECTID=<CW_SLIDESHOW_PGM>", "update" )
16
17EXIT
18
19getLanguage: PROCEDURE
20
21
22theLang=VALUE("LANG",,"OS2ENVIRONMENT")
23if theLang="" then return "EN"
24theLang=LEFT(theLang, 5)
25IF LENGTH(theLang)<2 then return "EN"
26
27theLang=TRANSLATE(RIGHT(theLang,2))
28/* Try to load an entry */
29rc=SysIni(ARG(1), theLang, "installed")
30IF rc="ERROR:" THEN return "EN"
31
32return TRANSLATE(RIGHT(theLang,2))
33
Note: See TracBrowser for help on using the repository browser.