aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
Post an answer

Thanks for taking the time to write this message.

Your user name :

Your e-mail :

Hide your e-mail address to visitors:      
Note: the e-mail address is protected against SPAM.

Subscribe to this thread :      

You are answering to aldweb who wrote:


Hello Dave,

For sure, I don't want you to get in trouble because of playing Sweeper in a meeting... and I don't want to be fired either when playing your game in a boring meeting too!

So, here is a good way to figure out if the sound should be played or not, the trick is one more time to develop a quick PP applet.
So, please find in preview one of the sample PP applets package that I plan to release pretty soon.

The PP applet itself:
{
SoundPref.pas
'PP applet' for iziBasic
Version 1.0ß1 - November 20, 2006
by Laurent Duveau
Web Site = http://www.aldweb.com


----------------------
What is SoundPref.pas?
----------------------

SoundPref.pas is a fully featured 'PP applet' for iziBasic which
is made to retrieve sound preferences from PalmOS system
preferences.
This applet can easily be extended to retrieve other system
preferences, as all system preferences up to Palm OS version 5.3
are defined.

This 'PP applet' can be used as is in your iziBasic projects.
Please give a look to the SoundPref.ibas sample program source
code to see an example of how to access it.


-------------------------
How to use SoundPref.pas?
-------------------------

SYNTAX

output$ = CALLPP$(100,input$)
input$ : "System" or "Game" or "Alarm"
output$: "0" if sound is Off
"8" if sound is Low
"32" if sound is Medium
"64" if sound is High
"-1" if error


-------------------------------
Parametrization and integration
in an iziBasic project
-------------------------------

Step #1: Replace the 'LDSP' CreatorID in the first line of the
source code below to the CreatorID defined in your
iziBasic source code (see CREATORID compiling directive)
Also replace the 'SoundPref' label in the second line
to the name of your application (the part of the iziBasic
source code file name prior to the '.ibas' extension)

Step #2: Compile your iziBasic project

Step #3: Compile this 'PP applet'
}

{$code appl,LDSP,code,100}
program SoundPref;
type iBasFunType=function(S:string):string;
var iBasCallPP:iBasFunType;

type
SystemPreferencesChoice=(
prefVersion,
prefCountry,
prefDateFormat,
prefLongDateFormat,
prefWeekStartDay,
prefTimeFormat,
prefNumberFormat,
prefAutoOffDuration,
prefSysSoundLevelV20,
prefGameSoundLevelV20,
prefAlarmSoundLevelV20,
prefHidePrivateRecordsV33,
prefDeviceLocked,
prefLocalSyncRequiresPassword,
prefRemoteSyncRequiresPassword,
prefSysBatteryKind,
prefAllowEasterEggs,
prefMinutesWestOfGMT,
prefDaylightSavings,
prefRonamaticChar,
prefHard1CharAppCreator,
prefHard2CharAppCreator,
prefHard3CharAppCreator,
prefHard4CharAppCreator,
prefCalcCharAppCreator,
prefHardCradleCharAppCreator,
prefLauncherAppCreator,
prefSysPrefFlags,
prefHardCradle2CharAppCreator,
prefAnimationLevel,
prefSysSoundVolume,
prefGameSoundVolume,
prefAlarmSoundVolume,
prefBeamReceive,
prefCalibrateDigitizerAtReset,
prefSystemKeyboardID,
prefDefSerialPlugIn,
// Additions for PalmOS 3.1:
prefStayOnWhenPluggedIn,
prefStayLitWhenPluggedIn,
// Additions for PalmOS 3.2:
prefAntennaCharAppCreator,
// Additions for PalmOS 3.3:
prefMeasurementSystem,
// Additions for PalmOS 3.5:
prefShowPrivateRecords,
prefAutoOffDurationSecs,
// Additions for PalmOS 4.0:
prefTimeZone,
prefDaylightSavingAdjustment,
prefAutoLockType,
prefAutoLockTime,
prefAutoLockTimeFlag,
prefLanguage,
prefLocale,
prefTimeZoneCountry,
prefAttentionFlags,
prefDefaultAppCreator,
// Additions for PalmOS 5.0:
prefDefFepPlugInCreator,
// Additions for PalmOS 5.1:
prefColorThemeID,
// Additions for PalmOS 5.3
prefHandednessChoice,
prefHWRCreator);


function PrefGetPreference(whichPref:SystemPreferencesChoice):integer; inline($4E4F,$A2D1);
procedure StrIToA(var S:string;N:integer); inline($4E4F,$A0C9);

function IntToString(i:integer):string;
var
sResult:string;
begin
StrIToA(sResult,i);
IntToString:=sResult;
end;

function CallPP(S:string):string;
var
MySound:integer;
begin
if S='System' then
MySound:=PrefGetPreference(prefSysSoundVolume)
else
if S='Game' then
MySound:=PrefGetPreference(prefGameSoundVolume)
else
if S='Alarm' then
MySound:=PrefGetPreference(prefAlarmSoundVolume)
else
MySound:=-1; // error
CallPP:=IntToString(MySound);
end;

begin
iBasCallPP:=CallPP;
end.



Help :

Code Syntax :

  • <color=CodeHexadecimal></color> enables text colouring.
    Note : Instead of the hexadecimal code (#??????), you can specify the name of the colour(red, yellow, orange, green, blue, etc...). For extra info...
  • <bgcolor=CodeHexadecimal></bgcolor> enables the colored highlighting of a text.
    Note : Instead of the hexadecimal code (#??????), you can specify the name of the colour(red, yellow, orange, green, blue, etc...). For extra info...
  • <b></b> enables the emboldening of a text.
  • <i></i> enables the italicising of a text.
  • <u></u> enables the underlining of a text.
  • <cite></cite> enables quotation inserting.
    Note : You can specify the name of the authors by typing <cite=Author>
  • <code></code> enables code inserting.
    Note : You can specify the language by typing <code=LanguageName>
  • <left></left> enables left align.
  • <center></center> enables center align.
  • <right></right> enables right align.
  • <link></link> enables link inserting.
    Note : You can specify the link URL by typing <link=URL>text</link>. If you do not specify the link URL, the URL will be the one between the two tags.<link>URL</link>
  • <img=SmileyName> enables smiley insertion.
    Note : The names of available basic smileys are : cool, wink, biggrin, smile, frown, eek, mad, confused, rolleyes, tongue, cry. For extra info...

Access keys (under Windows) :

  • Key SHIFT + arrow (right or left) enables text selection
  • Key ALT + 2 enables toolbar selection
  • Key ALT + 3 enables editing zone selection
  • Key ALT + 4 displays Help
  • Key ALT + 5 hides Help
  • Key TAB enables going from one selection to the next
  • Key SHIFT + TAB enables going from one selection to the previous
  • Key ALT + arrow (towards bottom or top) enables folding out of the selected menu
  • Key ALT + arrow (towards bottom or top) enables the folding up of a spread out menu
  • Key arrow (towards bottom or top) enables the browsing through a spread out menu
  • Key ALT + s enables form sending

   |     |  Bold  Italic  Underline  Insert a quotation    Align Left  Center justify  Align Right  Insert a link  Insert Smiley (popup)  Preview (popup)  Display Help   
smiley cool  smiley wink  smiley biggrin  smiley smile  smiley frown  smiley eek  smiley mad  smiley confused  smiley rolleyes  smiley tongue  smiley cry 
Captcha reload
Copy the text:


 
 
^ Top ^