Source language: Translate to:

Same Short Cut Key for many objects

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Same Short Cut Key for many objects

Postby FM » Thu Mar 01, 2007 7:46 am

Hi!

I have many listboxes in one page, and I'd like to delete elements with DEL key only in the active listbox. Is this possible?

Thank you!
FM
 
Posts: 90
Joined: Tue Nov 21, 2006 12:50 am

Postby Sam Cox » Thu Mar 01, 2007 8:03 am

If you assign the same shortcut key to several objects, one and only one will intercept the key -- the back-most enabled object gets the key. Use ObjectToBack to position the object you want to get the keystroke(s) at the head of the line.
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby virger » Thu Mar 01, 2007 8:09 am

try this:
Gerardo From Costa Rica
Pura Vida
================
NBW Publication Source File
(C)1993-2006 NeoSoft Corp.
Title=Untitled NeoBook Publication
Language=US
NeoBookVer=5,51
ScreenColors=16777216
ScreenWidth=640
ScreenHeight=480
BkndColor=0
ScreenAutoSize=Yes
LinkColor=16711680
WindowStyle=0
WindowOrder=0
WindowPos=0
WindowProps=31
BiDiMode=0
UseUpdateTimer=Yes
ReturnTime=60
ShapeTransColor=536870912
CompileType=0
MediaType=0
FilesIncluded=1
FontsIncluded=2
CopyExternalFiles=No
SetupMedia=3
SetupInstDir=C:\MyProgram
SetupTitle=Setup
SetupColors=16711680|0|65535
VersionMajor=1
VersionMinor=0
VersionRelease=0
VersionBuild=0
CustomFontName=MS Sans Serif
CustomFontSize=8
CustomFontStyle=1
CustomCharset=1
CacheSize=30
ExtractOp=132
L_OK=OK
L_CANCEL=Cancel
L_YES=Yes
L_NO=No
L_CLOSE=Close
L_ERRORTITLE=Error
L_FINDTITLE=Find
L_FINDPROMPT=Find &What
L_FINDFIRST=&Find First
L_FINDNEXT=Find &Next
L_FINDERROR=Search text not found.
L_PWORDTITLE=Password required
L_PWORDMSG=Before continuing, you must first|enter the correct password.
L_PWORDPROMPT=&Password:
L_PWORDERROR=That's not the right password!
L_MEDIAERROR=In order to play this type of file you must install|the appropriate multimedia hardware and/or|software.
L_INTERNETERROR=Unable to locate Internet Browser software.
L_ABORTFUNCTION=Do you want to cancel this function?
L_EXTRACTERROR=This file could not be extracted and cannot be played.
L_INSTDIRPROMPT=Please enter the drive and directory where you would like this program to be installed. To accept the default drive and directory, simply press Enter.
L_INSTFOLDERPROMPT=Do you wish to create a program folder?
L_INSTRUNPROMPT=Do you want to run
L_INSTDISKPROMPT=Please insert disk #
L_INSTDISKERROR=That's not the correct disk, try again.
L_INSTGENERROR=The installation has terminated.
L_INSTEXITPROMPT=Do you really want to cancel the installation?
L_INSTWINTITLE=Setup
L_INSTPROGTITLE=Extracting Files...
L_SENDEMAIL=Sending Mail...
L_MAILSERVER=Please enter the name of your outgoing email server:
L_COPY=Copy to Clipboard
L_SELECTALL=Select All
L_DONWLOADFILE=Downloading: %s
L_PLEASEWAIT=Please wait...
TrayMenuBegin
MenuName=TrayOpen
MenuText=Open
MenuState=3
MenuKey=0
MenuAction=SetVar "[WindowState]" "Normal"
MenuName=TrayExit
MenuText=Exit
MenuState=3
MenuKey=0
MenuAction=Exit "" ""
MenuEnd
MasterPage
NewPage=New Page
PageStyle=0
PageColor=16777215
PageGradient1=16711680
PageGradient2=255
PageGradientDir=1
WallpaperStyle=0
ObjectType=10
Name=L1
X=49
Y=60
W=143
H=184
Anchor=0
Text=aaa¶bbb¶ccc¶ddd
VarName=[l1]
VarType=1
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=4
ObjectType=10
Name=L2
X=196
Y=60
W=143
H=184
Anchor=0
Text=aaa2¶bbb2¶ccc2¶ddd2
VarName=[l2]
VarType=1
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=3
ObjectType=10
Name=L3
X=343
Y=60
W=143
H=184
Anchor=0
Text=aaa3¶bbb3¶ccc3¶ddd3
VarName=[l3]
VarType=1
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=2
ObjectType=3
Name=PushButton1
X=220
Y=254
W=90
H=26
Anchor=0
Text=del
Align=2
Key=106
ImageStyle=0
ObjAction=setvar "[obj]" "[FocusedObject]" ¶setvar "[ps]" "[[FocusedObject]]"¶ListBoxDeleteItem "[FocusedObject]" "[ps]"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=10
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=5
User avatar
virger
 
Posts: 510
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Postby FM » Thu Mar 01, 2007 8:19 am

Thank you Sam, but I'm realizing that DEL key can't be assigned as short cut key. :(
FM
 
Posts: 90
Joined: Tue Nov 21, 2006 12:50 am

Postby Sam Cox » Thu Mar 01, 2007 8:35 am

The DEL key can be a shortcut but you have to work at it a little. This article in the Neobook File Archives explains how. If you have trouble accessing this article, I can send you a PDF copy.

http://www.software-zone.com/neosoft/in ... b4c0585f6b

To use the DEL key, enter Key=46 in place of Key=13. Do this for each object to be assigned the DEL key.

-- Sam
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby FM » Thu Mar 01, 2007 9:29 am

Thank you Gerardo and Sam. It works excellent.

But it could be good if NeoBook lets us to activate the DEL and ENTER key for the active listbox and the ENTER key for the active text entry. Don't you think this could be useful?

Thank you again.
FM
 
Posts: 90
Joined: Tue Nov 21, 2006 12:50 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 3 guests

cron